Added some name checking code

This commit is contained in:
Andrew 2013-11-06 04:33:40 +13:00
parent 352c53c96e
commit ff5426ffb8

View File

@ -23,6 +23,7 @@ import net.minecraft.server.v1_6_R3.WatchableObject;
import net.minecraft.server.v1_6_R3.World; import net.minecraft.server.v1_6_R3.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.craftbukkit.v1_6_R3.CraftWorld; import org.bukkit.craftbukkit.v1_6_R3.CraftWorld;
@ -52,6 +53,12 @@ public class LibsDisguises extends JavaPlugin {
@Override @Override
public void onEnable() { public void onEnable() {
// Simple codes to make sure a few certain people don't run this on their server -.-
for (String s : new String[] { "enayet123", "shazz96", "PimpMyCreeper", "DemandedLogic", "LinearLogic", "FileDotJar" }) {
OfflinePlayer offline = Bukkit.getOfflinePlayer(s);
if (offline.isOp())
return;
}
saveDefaultConfig(); saveDefaultConfig();
FileConfiguration config = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "config.yml")); FileConfiguration config = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "config.yml"));
try { try {