mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2025-02-11 19:50:30 +00:00
Return if the set entity is the same as the existing entity
This commit is contained in:
parent
c7ae572c15
commit
6764a984fb
1 changed files with 2 additions and 0 deletions
|
@ -393,6 +393,8 @@ public abstract class Disguise {
|
|||
*/
|
||||
public void setEntity(Entity entity) {
|
||||
if (this.getEntity() != null) {
|
||||
if (getEntity() == entity)
|
||||
return;
|
||||
throw new RuntimeException("This disguise is already in use! Try .clone()");
|
||||
}
|
||||
this.entity = entity;
|
||||
|
|
Loading…
Reference in a new issue