mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-30 14:13:35 +01:00
Remove commented code
This commit is contained in:
parent
b2b65710b1
commit
410d07a64c
@ -36,7 +36,6 @@ import org.bukkit.event.block.SignChangeEvent;
|
|||||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||||
import org.bukkit.event.inventory.InventoryOpenEvent;
|
import org.bukkit.event.inventory.InventoryOpenEvent;
|
||||||
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
|
||||||
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
|
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
|
||||||
import org.bukkit.event.player.PlayerBedEnterEvent;
|
import org.bukkit.event.player.PlayerBedEnterEvent;
|
||||||
import org.bukkit.event.player.PlayerChatEvent;
|
import org.bukkit.event.player.PlayerChatEvent;
|
||||||
@ -93,26 +92,6 @@ public class AuthMePlayerListener implements Listener {
|
|||||||
@Inject
|
@Inject
|
||||||
private ValidationService validationService;
|
private ValidationService validationService;
|
||||||
|
|
||||||
/*
|
|
||||||
private void handleChat(AsyncPlayerChatEvent event) {
|
|
||||||
if (settings.getProperty(RestrictionSettings.ALLOW_CHAT)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
final Player player = event.getPlayer();
|
|
||||||
if (shouldCancelEvent(player)) {
|
|
||||||
event.setCancelled(true);
|
|
||||||
sendLoginOrRegisterMessage(player);
|
|
||||||
} else if (settings.getProperty(RestrictionSettings.HIDE_CHAT)) {
|
|
||||||
for (Player p : bukkitService.getOnlinePlayers()) {
|
|
||||||
if (!PlayerCache.getInstance().isAuthenticated(p.getName())) {
|
|
||||||
event.getRecipients().remove(p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
private void sendLoginOrRegisterMessage(final Player player) {
|
private void sendLoginOrRegisterMessage(final Player player) {
|
||||||
bukkitService.runTaskAsynchronously(new Runnable() {
|
bukkitService.runTaskAsynchronously(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@ -176,33 +155,6 @@ public class AuthMePlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.NORMAL)
|
|
||||||
public void onPlayerNormalChat(AsyncPlayerChatEvent event) {
|
|
||||||
handleChat(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH)
|
|
||||||
public void onPlayerHighChat(AsyncPlayerChatEvent event) {
|
|
||||||
handleChat(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
|
|
||||||
public void onPlayerHighestChat(AsyncPlayerChatEvent event) {
|
|
||||||
handleChat(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)
|
|
||||||
public void onPlayerEarlyChat(AsyncPlayerChatEvent event) {
|
|
||||||
handleChat(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOW)
|
|
||||||
public void onPlayerLowChat(AsyncPlayerChatEvent event) {
|
|
||||||
handleChat(event);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
|
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
|
||||||
public void onPlayerMove(PlayerMoveEvent event) {
|
public void onPlayerMove(PlayerMoveEvent event) {
|
||||||
if (settings.getProperty(ALLOW_UNAUTHED_MOVEMENT) && settings.getProperty(ALLOWED_MOVEMENT_RADIUS) <= 0) {
|
if (settings.getProperty(ALLOW_UNAUTHED_MOVEMENT) && settings.getProperty(ALLOWED_MOVEMENT_RADIUS) <= 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user