use of net.dzikoysk.funnyguilds.command.ExcPlayer in project FunnyGuilds by FunnyGuilds.
the class EntityInteract method onInteract.
@EventHandler
public void onInteract(PlayerInteractEntityEvent event) {
PluginConfig config = Settings.getConfig();
Player eventCaller = event.getPlayer();
Entity clickedEntity = event.getRightClicked();
if (clickedEntity instanceof Player) {
Player clickedPlayer = (Player) clickedEntity;
if (!config.infoPlayerEnabled || (config.infoPlayerSneaking && !eventCaller.isSneaking()) || informationMessageCooldowns.cooldown(eventCaller, TimeUnit.SECONDS, config.infoPlayerCooldown)) {
return;
}
new ExcPlayer().execute(eventCaller, new String[] { clickedPlayer.getName() });
}
}
Aggregations