mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2025-03-12 14:39:14 +01:00
Removed the admin shop message, since it is no longer necessary
This commit is contained in:
parent
39213b2be1
commit
4d5f568e1f
@ -1,33 +1,14 @@
|
|||||||
package com.Acrobot.ChestShop.Listeners.Player;
|
package com.Acrobot.ChestShop.Listeners.Player;
|
||||||
|
|
||||||
import com.Acrobot.ChestShop.ChestShop;
|
|
||||||
import com.Acrobot.ChestShop.Permission;
|
|
||||||
import com.Acrobot.ChestShop.Signs.ChestShopSign;
|
|
||||||
import com.Acrobot.ChestShop.UUIDs.NameManager;
|
import com.Acrobot.ChestShop.UUIDs.NameManager;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
import org.bukkit.event.player.PlayerLoginEvent;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Acrobot
|
* @author Acrobot
|
||||||
*/
|
*/
|
||||||
public class PlayerConnect implements Listener {
|
public class PlayerConnect implements Listener {
|
||||||
@EventHandler
|
|
||||||
public static void onPlayerJoin(PlayerLoginEvent event) {
|
|
||||||
String name = event.getPlayer().getName();
|
|
||||||
|
|
||||||
if (name != null && ChestShopSign.isAdminShop(name)) {
|
|
||||||
if (Permission.has(event.getPlayer(), Permission.ADMIN)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "Oh no you don't. (ChestShop logged your IP to server log!)");
|
|
||||||
|
|
||||||
ChestShop.getBukkitLogger().severe(event.getAddress() + " tried to log in on Admin Shop's account!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public static void onPlayerConnect(PlayerJoinEvent event) {
|
public static void onPlayerConnect(PlayerJoinEvent event) {
|
||||||
NameManager.storeUsername(event.getPlayer());
|
NameManager.storeUsername(event.getPlayer());
|
||||||
|
Loading…
Reference in New Issue
Block a user