mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-28 11:28:11 +01:00
Minor changes to logging
This commit is contained in:
parent
274dc260e2
commit
f338325bd9
@ -332,6 +332,7 @@ public class MovingCheck {
|
|||||||
event.getPlayer().teleportTo(data.movingSetBackPoint);
|
event.getPlayer().teleportTo(data.movingSetBackPoint);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
// Lets try it that way. Maybe now people don't "disappear" any longer
|
||||||
event.setFrom(event.getFrom());
|
event.setFrom(event.getFrom());
|
||||||
event.setTo(event.getFrom().clone());
|
event.setTo(event.getFrom().clone());
|
||||||
event.getPlayer().teleportTo(event.getFrom());
|
event.getPlayer().teleportTo(event.getFrom());
|
||||||
|
@ -3,11 +3,9 @@ package cc.co.evenprime.bukkit.nocheat;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.bukkit.Server;
|
|
||||||
import org.bukkit.event.Event.Priority;
|
import org.bukkit.event.Event.Priority;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
import org.bukkit.plugin.PluginDescriptionFile;
|
import org.bukkit.plugin.PluginDescriptionFile;
|
||||||
import org.bukkit.plugin.PluginLoader;
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
|
|
||||||
@ -31,31 +29,30 @@ public class NoCheatPlugin extends JavaPlugin {
|
|||||||
public static Logger log;
|
public static Logger log;
|
||||||
public static PermissionHandler Permissions = null;
|
public static PermissionHandler Permissions = null;
|
||||||
|
|
||||||
public NoCheatPlugin(PluginLoader pluginLoader, Server instance, PluginDescriptionFile desc, File folder, File plugin, ClassLoader cLoader) {
|
public NoCheatPlugin() {
|
||||||
super(pluginLoader, instance, desc, folder, plugin, cLoader);
|
|
||||||
|
|
||||||
playerListener = new NoCheatPluginPlayerListener(this);
|
playerListener = new NoCheatPluginPlayerListener(this);
|
||||||
vehicleListener = new NoCheatPluginVehicleListener(this, playerListener);
|
vehicleListener = new NoCheatPluginVehicleListener(this, playerListener);
|
||||||
|
|
||||||
log = NoCheatConfiguration.logger;
|
log = NoCheatConfiguration.logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
|
||||||
PluginManager pm = getServer().getPluginManager();
|
PluginManager pm = getServer().getPluginManager();
|
||||||
pm.registerEvent(Event.Type.PLAYER_MOVE, playerListener, Priority.Lowest, this);
|
pm.registerEvent(Event.Type.PLAYER_MOVE, playerListener, Priority.Lowest, this);
|
||||||
pm.registerEvent(Event.Type.PLAYER_QUIT, playerListener, Priority.Monitor, this);
|
pm.registerEvent(Event.Type.PLAYER_QUIT, playerListener, Priority.Monitor, this);
|
||||||
pm.registerEvent(Event.Type.VEHICLE_EXIT, vehicleListener, Priority.Monitor, this);
|
pm.registerEvent(Event.Type.VEHICLE_EXIT, vehicleListener, Priority.Monitor, this);
|
||||||
pm.registerEvent(Event.Type.VEHICLE_DAMAGE, vehicleListener, Priority.Monitor, this);
|
pm.registerEvent(Event.Type.VEHICLE_DAMAGE, vehicleListener, Priority.Monitor, this);
|
||||||
|
|
||||||
PluginDescriptionFile pdfFile = this.getDescription();
|
PluginDescriptionFile pdfFile = this.getDescription();
|
||||||
Logger.getLogger("Minecraft").info( "NoCheat version " + pdfFile.getVersion() + " is enabled!" );
|
Logger.getLogger("Minecraft").info( "NoCheat version " + pdfFile.getVersion() + " is enabled!" );
|
||||||
|
|
||||||
setupPermissions();
|
setupPermissions();
|
||||||
setupConfig();
|
setupConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setupPermissions() {
|
public void setupPermissions() {
|
||||||
@ -63,12 +60,12 @@ public class NoCheatPlugin extends JavaPlugin {
|
|||||||
|
|
||||||
|
|
||||||
if(Permissions == null) {
|
if(Permissions == null) {
|
||||||
if(test != null) {
|
if(test != null) {
|
||||||
Permissions = ((Permissions)test).getHandler();
|
Permissions = ((Permissions)test).getHandler();
|
||||||
} else {
|
} else {
|
||||||
log.info("Nocheat couldn't find Permissions plugin. Fallback to OP -> all allowed.");
|
log.info("Nocheat couldn't find Permissions plugin. Fallback to OP -> all allowed.");
|
||||||
this.getServer().getPluginManager().disablePlugin(this);
|
this.getServer().getPluginManager().disablePlugin(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user