2012-04-26 23:36:43 +02:00
|
|
|
package fr.neatmonster.nocheatplus;
|
2012-04-05 18:24:39 +02:00
|
|
|
|
2012-08-21 02:49:14 +02:00
|
|
|
import java.io.BufferedReader;
|
2012-09-04 08:42:26 +02:00
|
|
|
import java.io.IOException;
|
2012-08-21 02:49:14 +02:00
|
|
|
import java.io.InputStreamReader;
|
|
|
|
import java.net.URL;
|
2012-08-22 02:41:28 +02:00
|
|
|
import java.net.URLConnection;
|
2012-04-05 18:24:39 +02:00
|
|
|
import java.util.ArrayList;
|
2012-09-04 06:48:21 +02:00
|
|
|
import java.util.LinkedList;
|
2012-04-05 18:24:39 +02:00
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import org.bukkit.Bukkit;
|
2012-08-21 02:49:14 +02:00
|
|
|
import org.bukkit.ChatColor;
|
2012-04-05 18:24:39 +02:00
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
import org.bukkit.event.EventHandler;
|
|
|
|
import org.bukkit.event.EventPriority;
|
|
|
|
import org.bukkit.event.Listener;
|
|
|
|
import org.bukkit.event.player.PlayerJoinEvent;
|
|
|
|
import org.bukkit.plugin.PluginDescriptionFile;
|
|
|
|
import org.bukkit.plugin.java.JavaPlugin;
|
|
|
|
|
2012-08-20 19:40:00 +02:00
|
|
|
import fr.neatmonster.nocheatplus.checks.CheckType;
|
2012-08-08 20:07:13 +02:00
|
|
|
import fr.neatmonster.nocheatplus.checks.ExecuteActionsEvent;
|
2012-08-03 16:48:06 +02:00
|
|
|
import fr.neatmonster.nocheatplus.checks.Workarounds;
|
2012-04-26 23:36:43 +02:00
|
|
|
import fr.neatmonster.nocheatplus.checks.blockbreak.BlockBreakListener;
|
2012-08-06 02:43:01 +02:00
|
|
|
import fr.neatmonster.nocheatplus.checks.blockinteract.BlockInteractListener;
|
2012-04-26 23:36:43 +02:00
|
|
|
import fr.neatmonster.nocheatplus.checks.blockplace.BlockPlaceListener;
|
|
|
|
import fr.neatmonster.nocheatplus.checks.chat.ChatListener;
|
2012-08-05 13:09:57 +02:00
|
|
|
import fr.neatmonster.nocheatplus.checks.fight.FightListener;
|
2012-08-05 20:00:05 +02:00
|
|
|
import fr.neatmonster.nocheatplus.checks.inventory.InventoryListener;
|
2012-04-26 23:36:43 +02:00
|
|
|
import fr.neatmonster.nocheatplus.checks.moving.MovingListener;
|
2012-08-29 06:50:26 +02:00
|
|
|
import fr.neatmonster.nocheatplus.command.CommandHandler;
|
2012-09-04 06:48:21 +02:00
|
|
|
import fr.neatmonster.nocheatplus.command.INotifyReload;
|
2012-04-26 23:36:43 +02:00
|
|
|
import fr.neatmonster.nocheatplus.config.ConfPaths;
|
2012-08-24 14:52:24 +02:00
|
|
|
import fr.neatmonster.nocheatplus.config.ConfigFile;
|
2012-04-26 23:36:43 +02:00
|
|
|
import fr.neatmonster.nocheatplus.config.ConfigManager;
|
2012-08-20 19:40:00 +02:00
|
|
|
import fr.neatmonster.nocheatplus.metrics.Metrics;
|
|
|
|
import fr.neatmonster.nocheatplus.metrics.Metrics.Graph;
|
|
|
|
import fr.neatmonster.nocheatplus.metrics.Metrics.Plotter;
|
|
|
|
import fr.neatmonster.nocheatplus.metrics.MetricsData;
|
2012-08-03 16:48:06 +02:00
|
|
|
import fr.neatmonster.nocheatplus.players.Permissions;
|
2012-04-26 23:36:43 +02:00
|
|
|
import fr.neatmonster.nocheatplus.utilities.LagMeasureTask;
|
2012-04-05 18:24:39 +02:00
|
|
|
|
2012-08-03 16:48:06 +02:00
|
|
|
/*
|
|
|
|
* M"""""""`YM MM'""""'YMM dP dP MM"""""""`YM dP
|
|
|
|
* M mmmm. M M' .mmm. `M 88 88 MM mmmmm M 88
|
|
|
|
* M MMMMM M .d8888b. M MMMMMooM 88d888b. .d8888b. .d8888b. d8888P M' .M 88 dP dP .d8888b.
|
|
|
|
* M MMMMM M 88' `88 M MMMMMMMM 88' `88 88ooood8 88' `88 88 MM MMMMMMMM 88 88 88 Y8ooooo.
|
|
|
|
* M MMMMM M 88. .88 M. `MMM' .M 88 88 88. ... 88. .88 88 MM MMMMMMMM 88 88. .88 88
|
|
|
|
* M MMMMM M `88888P' MM. .dM dP dP `88888P' `88888P8 dP MM MMMMMMMM dP `88888P' `88888P'
|
|
|
|
* MMMMMMMMMMM MMMMMMMMMMM MMMMMMMMMMMM
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* This is the main class of NoCheatPlus. The commands, events listeners and tasks are registered here.
|
|
|
|
*/
|
2012-04-26 23:36:43 +02:00
|
|
|
public class NoCheatPlus extends JavaPlugin implements Listener {
|
2012-08-18 15:28:30 +02:00
|
|
|
|
2012-08-22 02:41:28 +02:00
|
|
|
/** The event listeners. */
|
|
|
|
private final List<Listener> listeners = new ArrayList<Listener>();
|
2012-09-04 06:48:21 +02:00
|
|
|
|
|
|
|
/** Components that need notification on reloading.
|
|
|
|
* (Kept here, for if during runtime some might get added.)*/
|
|
|
|
private final List<INotifyReload> notifyReload = new LinkedList<INotifyReload>();
|
2012-08-03 17:34:52 +02:00
|
|
|
|
2012-08-22 02:41:28 +02:00
|
|
|
/** Is the configuration outdated? */
|
|
|
|
private boolean configOutdated = false;
|
2012-08-21 02:49:14 +02:00
|
|
|
|
2012-08-22 02:41:28 +02:00
|
|
|
/** Is a new update available? */
|
|
|
|
private boolean updateAvailable = false;
|
2012-09-04 06:48:21 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Convenience method to add to listeners and notifyReload lists.
|
|
|
|
* @param listener
|
|
|
|
*/
|
|
|
|
private void addListener(final Listener listener){
|
2012-09-04 08:52:03 +02:00
|
|
|
Bukkit.getPluginManager().registerEvents(listener, this);
|
2012-09-04 06:48:21 +02:00
|
|
|
listeners.add(listener);
|
|
|
|
if (listener instanceof INotifyReload){
|
|
|
|
notifyReload.add((INotifyReload) listener);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-08-03 16:48:06 +02:00
|
|
|
/* (non-Javadoc)
|
|
|
|
* @see org.bukkit.plugin.java.JavaPlugin#onDisable()
|
|
|
|
*/
|
2012-04-05 18:24:39 +02:00
|
|
|
@Override
|
|
|
|
public void onDisable() {
|
2012-08-24 14:52:24 +02:00
|
|
|
/*
|
|
|
|
* ____ _ _ _
|
|
|
|
* | _ \(_)___ __ _| |__ | | ___
|
|
|
|
* | | | | / __|/ _` | '_ \| |/ _ \
|
|
|
|
* | |_| | \__ \ (_| | |_) | | __/
|
|
|
|
* |____/|_|___/\__,_|_.__/|_|\___|
|
|
|
|
*/
|
2012-04-05 18:24:39 +02:00
|
|
|
final PluginDescriptionFile pdfFile = getDescription();
|
2012-09-04 08:52:03 +02:00
|
|
|
|
|
|
|
// Just to be sure nothing gets left out.
|
|
|
|
getServer().getScheduler().cancelTasks(this);
|
2012-04-05 18:24:39 +02:00
|
|
|
|
2012-08-03 16:48:06 +02:00
|
|
|
// Stop the lag measuring task.
|
|
|
|
LagMeasureTask.cancel();
|
2012-04-05 18:24:39 +02:00
|
|
|
|
2012-09-04 06:48:21 +02:00
|
|
|
// Remove listeners.
|
|
|
|
listeners.clear();
|
|
|
|
|
|
|
|
// Remove config listeners.
|
|
|
|
notifyReload.clear();
|
|
|
|
|
2012-08-03 16:48:06 +02:00
|
|
|
// Cleanup the configuration manager.
|
2012-04-26 23:36:43 +02:00
|
|
|
ConfigManager.cleanup();
|
2012-04-05 18:24:39 +02:00
|
|
|
|
2012-08-03 16:48:06 +02:00
|
|
|
// Tell the server administrator the we finished unloading NoCheatPlus.
|
|
|
|
System.out.println("[NoCheatPlus] Version " + pdfFile.getVersion() + " is disabled.");
|
2012-04-05 18:24:39 +02:00
|
|
|
}
|
|
|
|
|
2012-08-03 16:48:06 +02:00
|
|
|
/* (non-Javadoc)
|
|
|
|
* @see org.bukkit.plugin.java.JavaPlugin#onEnable()
|
|
|
|
*/
|
2012-04-05 18:24:39 +02:00
|
|
|
@Override
|
|
|
|
public void onEnable() {
|
2012-08-24 14:52:24 +02:00
|
|
|
/*
|
|
|
|
* _____ _ _
|
|
|
|
* | ____|_ __ __ _| |__ | | ___
|
|
|
|
* | _| | '_ \ / _` | '_ \| |/ _ \
|
|
|
|
* | |___| | | | (_| | |_) | | __/
|
|
|
|
* |_____|_| |_|\__,_|_.__/|_|\___|
|
|
|
|
*/
|
2012-09-04 08:52:03 +02:00
|
|
|
|
2012-08-03 16:48:06 +02:00
|
|
|
// Read the configuration files.
|
|
|
|
ConfigManager.init(this);
|
2012-04-05 18:24:39 +02:00
|
|
|
|
2012-09-04 08:52:03 +02:00
|
|
|
// List the events listeners and register.
|
|
|
|
Bukkit.getPluginManager().registerEvents(this, this);
|
2012-09-04 06:48:21 +02:00
|
|
|
for (final Listener listener : new Listener[]{
|
|
|
|
new BlockBreakListener(),
|
|
|
|
new BlockInteractListener(),
|
|
|
|
new BlockPlaceListener(),
|
|
|
|
new ChatListener(),
|
|
|
|
new FightListener(),
|
|
|
|
new InventoryListener(),
|
|
|
|
new MovingListener(),
|
|
|
|
new Workarounds(),
|
|
|
|
}){
|
|
|
|
addListener(listener);
|
|
|
|
}
|
2012-09-04 08:52:03 +02:00
|
|
|
|
|
|
|
// Register the commands handler.
|
|
|
|
getCommand("nocheatplus").setExecutor(new CommandHandler(this, notifyReload));
|
2012-04-05 18:24:39 +02:00
|
|
|
|
2012-08-03 16:48:06 +02:00
|
|
|
// Set up a task to monitor server lag.
|
|
|
|
LagMeasureTask.start(this);
|
2012-04-05 18:24:39 +02:00
|
|
|
|
2012-09-03 10:18:16 +02:00
|
|
|
ConfigFile config = ConfigManager.getConfigFile();
|
|
|
|
|
2012-08-22 02:41:28 +02:00
|
|
|
// Setup the graphs, plotters and start Metrics.
|
2012-09-03 10:18:16 +02:00
|
|
|
if (config.getBoolean(ConfPaths.MISCELLANEOUS_REPORTTOMETRICS)) {
|
2012-08-24 22:02:38 +02:00
|
|
|
MetricsData.initialize();
|
2012-08-24 14:52:24 +02:00
|
|
|
try {
|
|
|
|
final Metrics metrics = new Metrics(this);
|
|
|
|
final Graph checksFailed = metrics.createGraph("Checks Failed");
|
|
|
|
for (final CheckType type : CheckType.values())
|
2012-08-24 22:02:38 +02:00
|
|
|
if (type.getParent() != null)
|
2012-08-24 14:52:24 +02:00
|
|
|
checksFailed.addPlotter(new Plotter(type.name()) {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getValue() {
|
2012-08-24 22:02:38 +02:00
|
|
|
return MetricsData.getFailed(type);
|
2012-08-24 14:52:24 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
final Graph serverTicks = metrics.createGraph("Server Ticks");
|
2012-08-24 22:02:38 +02:00
|
|
|
final int[] ticksArray = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
|
|
|
|
19, 20};
|
|
|
|
for (final int ticks : ticksArray)
|
|
|
|
serverTicks.addPlotter(new Plotter(ticks + " tick(s)") {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getValue() {
|
|
|
|
return MetricsData.getTicks(ticks);
|
|
|
|
}
|
|
|
|
});
|
2012-08-24 14:52:24 +02:00
|
|
|
metrics.start();
|
|
|
|
} catch (final Exception e) {}
|
2012-08-24 22:02:38 +02:00
|
|
|
}
|
2012-08-20 19:40:00 +02:00
|
|
|
|
2012-09-03 10:18:16 +02:00
|
|
|
if (config.getBoolean(ConfPaths.MISCELLANEOUS_CHECKFORUPDATES)){
|
|
|
|
// Is a new update available?
|
2012-09-04 08:42:26 +02:00
|
|
|
BufferedReader bufferedReader = null;
|
|
|
|
updateAvailable = false;
|
2012-09-03 10:18:16 +02:00
|
|
|
try {
|
|
|
|
final int currentVersion = Integer.parseInt(getDescription().getVersion().split("-b")[1]);
|
|
|
|
final URL url = new URL("http://nocheatplus.org:8080/job/NoCheatPlus/lastSuccessfulBuild/api/json");
|
|
|
|
final URLConnection connection = url.openConnection();
|
|
|
|
connection.setReadTimeout(config.getInt(ConfPaths.MISCELLANEOUS_READTIMEOUT, 4) * 1000);
|
2012-09-04 08:42:26 +02:00
|
|
|
bufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
|
|
|
|
String line, content = "";
|
2012-09-03 10:18:16 +02:00
|
|
|
while ((line = bufferedReader.readLine()) != null)
|
|
|
|
content += line;
|
|
|
|
final int jenkinsVersion = Integer.parseInt(content.split("\"number\":")[1].split(",")[0]);
|
|
|
|
updateAvailable = currentVersion < jenkinsVersion;
|
|
|
|
} catch (final Exception e) {}
|
2012-09-04 08:42:26 +02:00
|
|
|
finally{
|
|
|
|
if (bufferedReader != null) try{bufferedReader.close();}catch (IOException e){};
|
|
|
|
}
|
2012-09-03 10:18:16 +02:00
|
|
|
}
|
2012-08-22 02:41:28 +02:00
|
|
|
|
|
|
|
// Is the configuration outdated?
|
|
|
|
try {
|
|
|
|
final int currentVersion = Integer.parseInt(getDescription().getVersion().split("-b")[1]);
|
2012-09-04 08:42:26 +02:00
|
|
|
final int configurationVersion = Integer.parseInt(
|
|
|
|
config.options().header().split("-b")[1].split("\\.")[0]);
|
2012-08-22 02:41:28 +02:00
|
|
|
if (currentVersion > configurationVersion)
|
|
|
|
configOutdated = true;
|
2012-08-21 02:49:14 +02:00
|
|
|
} catch (final Exception e) {}
|
2012-08-22 02:41:28 +02:00
|
|
|
|
|
|
|
// Tell the server administrator that we finished loading NoCheatPlus now.
|
|
|
|
System.out.println("[NoCheatPlus] Version " + getDescription().getVersion() + " is enabled.");
|
2012-04-05 18:24:39 +02:00
|
|
|
}
|
|
|
|
|
2012-08-11 02:36:46 +02:00
|
|
|
/**
|
|
|
|
* This event handler is used to execute the actions when a violation is detected.
|
|
|
|
*
|
|
|
|
* @param event
|
|
|
|
* the event handled
|
|
|
|
*/
|
|
|
|
@EventHandler(
|
|
|
|
priority = EventPriority.LOWEST)
|
|
|
|
final void onExecuteActions(final ExecuteActionsEvent event) {
|
2012-08-24 14:52:24 +02:00
|
|
|
/*
|
|
|
|
* _____ _ _ _ _
|
|
|
|
* | ____|_ _____ ___ _ _| |_ ___ / \ ___| |_(_) ___ _ __ ___
|
|
|
|
* | _| \ \/ / _ \/ __| | | | __/ _ \ / _ \ / __| __| |/ _ \| '_ \/ __|
|
|
|
|
* | |___ > < __/ (__| |_| | || __/ / ___ \ (__| |_| | (_) | | | \__ \
|
|
|
|
* |_____/_/\_\___|\___|\__,_|\__\___| /_/ \_\___|\__|_|\___/|_| |_|___/
|
|
|
|
*/
|
2012-08-11 02:36:46 +02:00
|
|
|
event.executeActions();
|
|
|
|
}
|
|
|
|
|
2012-08-24 14:52:24 +02:00
|
|
|
public void onPlayerJoinLow(final PlayerJoinEvent event) {
|
|
|
|
/*
|
|
|
|
* ____ _ _ _
|
|
|
|
* | _ \| | __ _ _ _ ___ _ __ | | ___ (_)_ __
|
|
|
|
* | |_) | |/ _` | | | |/ _ \ '__| _ | |/ _ \| | '_ \
|
|
|
|
* | __/| | (_| | |_| | __/ | | |_| | (_) | | | | |
|
|
|
|
* |_| |_|\__,_|\__, |\___|_| \___/ \___/|_|_| |_|
|
|
|
|
* |___/
|
|
|
|
*/
|
|
|
|
// Change the NetServerHandler of the player if requested in the configuration.
|
|
|
|
final ConfigFile configFile = ConfigManager.getConfigFile();
|
|
|
|
if (configFile.getBoolean(ConfPaths.MISCELLANEOUS_NOMOVEDTOOQUICKLY_ENABLED))
|
|
|
|
NCPNetServerHandler.changeNetServerHandler(event.getPlayer(),
|
|
|
|
configFile.getBoolean(ConfPaths.MISCELLANEOUS_NOMOVEDTOOQUICKLY_USEPROXY));
|
|
|
|
}
|
|
|
|
|
2012-08-03 16:48:06 +02:00
|
|
|
/**
|
|
|
|
* This event handler is used to send all the disabling messages to the client.
|
|
|
|
*
|
|
|
|
* @param event
|
|
|
|
* the event handled
|
|
|
|
*/
|
2012-04-05 18:24:39 +02:00
|
|
|
@EventHandler(
|
2012-08-11 02:36:46 +02:00
|
|
|
priority = EventPriority.MONITOR)
|
2012-08-24 14:52:24 +02:00
|
|
|
public void onPlayerJoinMonitor(final PlayerJoinEvent event) {
|
|
|
|
/*
|
|
|
|
* ____ _ _ _
|
|
|
|
* | _ \| | __ _ _ _ ___ _ __ | | ___ (_)_ __
|
|
|
|
* | |_) | |/ _` | | | |/ _ \ '__| _ | |/ _ \| | '_ \
|
|
|
|
* | __/| | (_| | |_| | __/ | | |_| | (_) | | | | |
|
|
|
|
* |_| |_|\__,_|\__, |\___|_| \___/ \___/|_|_| |_|
|
|
|
|
* |___/
|
|
|
|
*/
|
2012-08-18 22:56:35 +02:00
|
|
|
final Player player = event.getPlayer();
|
|
|
|
|
2012-08-22 02:41:28 +02:00
|
|
|
// Send a message to the player if a new update is available.
|
|
|
|
if (updateAvailable && player.hasPermission(Permissions.ADMINISTRATION_NOTIFY))
|
|
|
|
player.sendMessage(ChatColor.RED + "NCP: " + ChatColor.WHITE
|
|
|
|
+ "A new update of NoCheatPlus is available.\n" + "Download it at http://nocheatplus.org/update.");
|
|
|
|
|
|
|
|
// Send a message to the player if the configuration is outdated.
|
|
|
|
if (configOutdated && player.hasPermission(Permissions.ADMINISTRATION_NOTIFY))
|
|
|
|
player.sendMessage(ChatColor.RED + "NCP: " + ChatColor.WHITE + "Your configuration file is outdated.\n"
|
|
|
|
+ "Some settings might have changed, you should regenerate it!");
|
|
|
|
|
|
|
|
String message = "";
|
2012-08-21 02:49:14 +02:00
|
|
|
|
2012-08-03 16:48:06 +02:00
|
|
|
// Check if we allow all the client mods.
|
|
|
|
final boolean allowAll = ConfigManager.getConfigFile().getBoolean(ConfPaths.MISCELLANEOUS_ALLOWCLIENTMODS);
|
|
|
|
|
|
|
|
// Allow Rei's Minimap's cave mode.
|
|
|
|
if (allowAll || player.hasPermission(Permissions.REI_CAVE))
|
2012-08-21 02:49:14 +02:00
|
|
|
message += "§0§0§1§e§f";
|
2012-08-03 16:48:06 +02:00
|
|
|
|
|
|
|
// Allow Rei's Minimap's radar.
|
|
|
|
if (allowAll || player.hasPermission(Permissions.REI_RADAR))
|
2012-08-21 02:49:14 +02:00
|
|
|
message += "§0§0§2§3§4§5§6§7§e§f";
|
2012-08-03 16:48:06 +02:00
|
|
|
|
|
|
|
// If all the client mods are allowed, no need to go any further.
|
2012-08-21 02:49:14 +02:00
|
|
|
if (allowAll) {
|
|
|
|
if (!message.equals(""))
|
|
|
|
player.sendMessage(message);
|
2012-08-03 16:48:06 +02:00
|
|
|
return;
|
2012-08-21 02:49:14 +02:00
|
|
|
}
|
2012-08-03 16:48:06 +02:00
|
|
|
|
|
|
|
// Disable Zombe's fly mod.
|
|
|
|
if (!player.hasPermission(Permissions.ZOMBE_FLY))
|
2012-08-21 02:49:14 +02:00
|
|
|
message += "§f §f §1 §0 §2 §4";
|
2012-08-03 16:48:06 +02:00
|
|
|
|
|
|
|
// Disable Zombe's noclip.
|
|
|
|
if (!player.hasPermission(Permissions.ZOMBE_NOCLIP))
|
2012-08-21 02:49:14 +02:00
|
|
|
message += "§f §f §4 §0 §9 §6";
|
2012-08-03 16:48:06 +02:00
|
|
|
|
|
|
|
// Disable Zombe's cheat.
|
|
|
|
if (!player.hasPermission(Permissions.ZOMBE_CHEAT))
|
2012-08-21 02:49:14 +02:00
|
|
|
message += "§f §f §2 §0 §4 §8";
|
2012-08-03 16:48:06 +02:00
|
|
|
|
|
|
|
// Disable CJB's fly mod.
|
|
|
|
if (!player.hasPermission(Permissions.CJB_FLY))
|
2012-08-21 02:49:14 +02:00
|
|
|
message += "§3 §9 §2 §0 §0 §1";
|
2012-08-03 16:48:06 +02:00
|
|
|
|
|
|
|
// Disable CJB's xray.
|
|
|
|
if (!player.hasPermission(Permissions.CJB_XRAY))
|
2012-08-21 02:49:14 +02:00
|
|
|
message += "§3 §9 §2 §0 §0 §2";
|
2012-08-03 16:48:06 +02:00
|
|
|
|
|
|
|
// Disable CJB's radar.
|
|
|
|
if (!player.hasPermission(Permissions.CJB_RADAR))
|
2012-08-21 02:49:14 +02:00
|
|
|
message += "§3 §9 §2 §0 §0 §3";
|
2012-08-03 16:48:06 +02:00
|
|
|
|
|
|
|
// Disable Minecraft AutoMap's ores.
|
|
|
|
if (!player.hasPermission(Permissions.MINECRAFTAUTOMAP_ORES))
|
2012-08-21 02:49:14 +02:00
|
|
|
message += "§0§0§1§f§e";
|
2012-08-03 16:48:06 +02:00
|
|
|
|
|
|
|
// Disable Minecraft AutoMap's cave mode.
|
|
|
|
if (!player.hasPermission(Permissions.MINECRAFTAUTOMAP_CAVE))
|
2012-08-21 02:49:14 +02:00
|
|
|
message += "§0§0§2§f§e";
|
2012-08-03 16:48:06 +02:00
|
|
|
|
|
|
|
// Disable Minecraft AutoMap's radar.
|
|
|
|
if (!player.hasPermission(Permissions.MINECRAFTAUTOMAP_RADAR))
|
2012-08-21 02:49:14 +02:00
|
|
|
message += "§0§0§3§4§5§6§7§8§f§e";
|
2012-08-03 16:48:06 +02:00
|
|
|
|
|
|
|
// Disable Smart Moving's climbing.
|
|
|
|
if (!player.hasPermission(Permissions.SMARTMOVING_CLIMBING))
|
2012-08-21 02:49:14 +02:00
|
|
|
message += "§0§1§0§1§2§f§f";
|
2012-08-03 16:48:06 +02:00
|
|
|
|
|
|
|
// Disable Smart Moving's climbing.
|
|
|
|
if (!player.hasPermission(Permissions.SMARTMOVING_SWIMMING))
|
2012-08-21 02:49:14 +02:00
|
|
|
message += "§0§1§3§4§f§f";
|
2012-08-03 16:48:06 +02:00
|
|
|
|
|
|
|
// Disable Smart Moving's climbing.
|
|
|
|
if (!player.hasPermission(Permissions.SMARTMOVING_CRAWLING))
|
2012-08-21 02:49:14 +02:00
|
|
|
message += "§0§1§5§f§f";
|
2012-08-03 16:48:06 +02:00
|
|
|
|
|
|
|
// Disable Smart Moving's climbing.
|
|
|
|
if (!player.hasPermission(Permissions.SMARTMOVING_SLIDING))
|
2012-08-21 02:49:14 +02:00
|
|
|
message += "§0§1§6§f§f";
|
2012-08-03 16:48:06 +02:00
|
|
|
|
|
|
|
// Disable Smart Moving's climbing.
|
|
|
|
if (!player.hasPermission(Permissions.SMARTMOVING_JUMPING))
|
2012-08-21 02:49:14 +02:00
|
|
|
message += "§0§1§8§9§a§b§f§f";
|
2012-08-03 16:48:06 +02:00
|
|
|
|
|
|
|
// Disable Smart Moving's climbing.
|
|
|
|
if (!player.hasPermission(Permissions.SMARTMOVING_FLYING))
|
2012-08-21 02:49:14 +02:00
|
|
|
message += "§0§1§7§f§f";
|
2012-08-03 16:48:06 +02:00
|
|
|
|
2012-08-21 02:49:14 +02:00
|
|
|
if (!message.equals(""))
|
|
|
|
player.sendMessage(message);
|
2012-04-05 18:24:39 +02:00
|
|
|
}
|
2012-09-04 06:48:21 +02:00
|
|
|
|
2012-04-05 18:24:39 +02:00
|
|
|
}
|