mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-10 21:11:07 +01:00
parent
e4a8222d48
commit
05400429db
@ -198,4 +198,14 @@ public class EssentialsEntityListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
||||||
|
public void onEntityTarget(EntityTargetEvent event) {
|
||||||
|
if (event.getTarget() instanceof Player) {
|
||||||
|
final User user = ess.getUser((Player) event.getTarget());
|
||||||
|
if (user.isVanished()) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user