fix: PlayerLoginListener naming scheme

This commit is contained in:
Simon Giesel 2020-05-09 15:54:47 +02:00
parent 143476ec9f
commit e0f71c6a6c
2 changed files with 5 additions and 5 deletions

View file

@ -17,7 +17,7 @@ import de.cliffbreak.varo.listeners.EntityRegainHealthListener;
import de.cliffbreak.varo.listeners.PlayerClientOptionsChangeListener; import de.cliffbreak.varo.listeners.PlayerClientOptionsChangeListener;
import de.cliffbreak.varo.listeners.PlayerDeathListener; import de.cliffbreak.varo.listeners.PlayerDeathListener;
import de.cliffbreak.varo.listeners.PlayerJoinQuitListener; import de.cliffbreak.varo.listeners.PlayerJoinQuitListener;
import de.cliffbreak.varo.listeners.PlayerPreLoginListener; import de.cliffbreak.varo.listeners.PlayerLoginListener;
import de.cliffbreak.varo.managers.NPCManager; import de.cliffbreak.varo.managers.NPCManager;
import de.cliffbreak.varo.uitls.BanUtils; import de.cliffbreak.varo.uitls.BanUtils;
import de.cliffbreak.varo.uitls.PlayerCache; import de.cliffbreak.varo.uitls.PlayerCache;
@ -53,7 +53,7 @@ public class Varo extends JavaPlugin {
this.config.options().copyDefaults(true); this.config.options().copyDefaults(true);
this.saveConfig(); this.saveConfig();
this.getServer().getPluginManager().registerEvents(new PlayerPreLoginListener(this), this); this.getServer().getPluginManager().registerEvents(new PlayerLoginListener(this), this);
this.getServer().getPluginManager().registerEvents(new PlayerJoinQuitListener(this), this); this.getServer().getPluginManager().registerEvents(new PlayerJoinQuitListener(this), this);
this.getServer().getPluginManager().registerEvents(new PlayerClientOptionsChangeListener(this), this); this.getServer().getPluginManager().registerEvents(new PlayerClientOptionsChangeListener(this), this);
this.getServer().getPluginManager().registerEvents(new ChatListener(), this); this.getServer().getPluginManager().registerEvents(new ChatListener(), this);

View file

@ -7,16 +7,16 @@ import org.bukkit.event.player.PlayerLoginEvent.Result;
import de.cliffbreak.varo.Varo; import de.cliffbreak.varo.Varo;
public class PlayerPreLoginListener implements Listener { public class PlayerLoginListener implements Listener {
private final Varo plugin; private final Varo plugin;
public PlayerPreLoginListener(final Varo plugin) { public PlayerLoginListener(final Varo plugin) {
this.plugin = plugin; this.plugin = plugin;
} }
@EventHandler @EventHandler
public void onPlayerPreLogin(final PlayerLoginEvent e) { public void onPlayerLogin(final PlayerLoginEvent e) {
if (this.plugin.getBanUtils().isBanned(e.getPlayer().getUniqueId())) { if (this.plugin.getBanUtils().isBanned(e.getPlayer().getUniqueId())) {
e.disallow(Result.KICK_BANNED, "§4Du bist gestorben.\n \n§cDamit bist du aus §eVaro§c ausgeschieden."); e.disallow(Result.KICK_BANNED, "§4Du bist gestorben.\n \n§cDamit bist du aus §eVaro§c ausgeschieden.");
} }