mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 10:05:59 +00:00
Removed DisguiseCraft support.
This commit is contained in:
parent
183277db21
commit
75b296496e
@ -49,7 +49,6 @@ jar.compress=false
|
|||||||
jar.index=${jnlp.enabled}
|
jar.index=${jnlp.enabled}
|
||||||
javac.classpath=\
|
javac.classpath=\
|
||||||
${libs.WorldEdit.classpath}:\
|
${libs.WorldEdit.classpath}:\
|
||||||
${libs.DisguiseCraft.classpath}:\
|
|
||||||
${libs.Essentials.classpath}:\
|
${libs.Essentials.classpath}:\
|
||||||
${libs.BukkitTelnet.classpath}:\
|
${libs.BukkitTelnet.classpath}:\
|
||||||
${libs.CraftBukkit.classpath}
|
${libs.CraftBukkit.classpath}
|
||||||
|
@ -74,7 +74,6 @@ explosive_radius: 4.0
|
|||||||
blocked_commands:
|
blocked_commands:
|
||||||
# Disabled commands
|
# Disabled commands
|
||||||
- 'n:b:/time:Server-side time changing is disabled. Please use /ptime to set your own personal time.'
|
- 'n:b:/time:Server-side time changing is disabled. Please use /ptime to set your own personal time.'
|
||||||
- 'n:b:/md:This server now uses DisguiseCraft instead of MobDisguise. Type /d to disguise and /u to undisguise.'
|
|
||||||
- 'n:b:/gamemode:Use /creative and /survival to set your gamemode.'
|
- 'n:b:/gamemode:Use /creative and /survival to set your gamemode.'
|
||||||
- 'n:b:/gamerule:_'
|
- 'n:b:/gamerule:_'
|
||||||
- 'n:b:/ban:_'
|
- 'n:b:/ban:_'
|
||||||
|
@ -1,76 +0,0 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Bridge;
|
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Log;
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import pgDev.bukkit.DisguiseCraft.DisguiseCraft;
|
|
||||||
import pgDev.bukkit.DisguiseCraft.api.DisguiseCraftAPI;
|
|
||||||
|
|
||||||
public class TFM_DisguiseCraftBridge
|
|
||||||
{
|
|
||||||
private TFM_DisguiseCraftBridge()
|
|
||||||
{
|
|
||||||
throw new AssertionError();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean undisguisePlayer(Player player)
|
|
||||||
{
|
|
||||||
if (!disguiseCraftEnabled())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
DisguiseCraftAPI api = DisguiseCraft.getAPI();
|
|
||||||
if (api != null)
|
|
||||||
{
|
|
||||||
return api.undisguisePlayer(player);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
TFM_Log.severe(ex);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void undisguiseAllPlayers()
|
|
||||||
{
|
|
||||||
if (!disguiseCraftEnabled())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
DisguiseCraftAPI api = DisguiseCraft.getAPI();
|
|
||||||
if (api != null)
|
|
||||||
{
|
|
||||||
Player[] players = Bukkit.getOnlinePlayers();
|
|
||||||
for (Player player : players)
|
|
||||||
{
|
|
||||||
api.undisguisePlayer(player);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
TFM_Log.severe(ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean disguiseCraftEnabled()
|
|
||||||
{
|
|
||||||
boolean pluginEnabled = false;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
pluginEnabled = Bukkit.getPluginManager().isPluginEnabled("DisguiseCraft");
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
return pluginEnabled;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.Bridge.TFM_DisguiseCraftBridge;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_PlayerData;
|
import me.StevenLawson.TotalFreedomMod.TFM_PlayerData;
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||||
@ -21,9 +20,6 @@ public class Command_purgeall extends TFM_Command
|
|||||||
// Purge entities
|
// Purge entities
|
||||||
TFM_Util.TFM_EntityWiper.wipeEntities(true, true);
|
TFM_Util.TFM_EntityWiper.wipeEntities(true, true);
|
||||||
|
|
||||||
// Undisguise all players
|
|
||||||
TFM_DisguiseCraftBridge.undisguiseAllPlayers();
|
|
||||||
|
|
||||||
for (Player player : server.getOnlinePlayers())
|
for (Player player : server.getOnlinePlayers())
|
||||||
{
|
{
|
||||||
TFM_PlayerData playerdata = TFM_PlayerData.getPlayerData(player);
|
TFM_PlayerData playerdata = TFM_PlayerData.getPlayerData(player);
|
||||||
|
@ -15,19 +15,17 @@ public class Command_tfupdate extends TFM_Command
|
|||||||
{
|
{
|
||||||
public static final String[] FILES =
|
public static final String[] FILES =
|
||||||
{
|
{
|
||||||
"http://s3.madgeekonline.com/totalfreedom/BukkitHttpd.jar",
|
|
||||||
"http://s3.madgeekonline.com/totalfreedom/BukkitTelnet.jar",
|
|
||||||
"http://s3.madgeekonline.com/totalfreedom/DisguiseCraft.jar",
|
|
||||||
"http://s3.madgeekonline.com/totalfreedom/Essentials.jar",
|
|
||||||
"http://s3.madgeekonline.com/totalfreedom/EssentialsSpawn.jar",
|
|
||||||
"http://s3.madgeekonline.com/totalfreedom/TotalFreedomMod.jar",
|
|
||||||
"http://s3.madgeekonline.com/totalfreedom/craftbukkit.jar",
|
|
||||||
"http://s3.madgeekonline.com/totalfreedom/worldedit.jar"
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||||
{
|
{
|
||||||
|
if (FILES.length == 0)
|
||||||
|
{
|
||||||
|
playerMsg("This command is disabled.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!sender.getName().equalsIgnoreCase("madgeek1450"))
|
if (!sender.getName().equalsIgnoreCase("madgeek1450"))
|
||||||
{
|
{
|
||||||
playerMsg(TotalFreedomMod.MSG_NO_PERMS);
|
playerMsg(TotalFreedomMod.MSG_NO_PERMS);
|
||||||
|
@ -32,7 +32,6 @@ public class Command_toggle extends TFM_Command
|
|||||||
playerMsg("- droptoggle");
|
playerMsg("- droptoggle");
|
||||||
playerMsg("- nonuke");
|
playerMsg("- nonuke");
|
||||||
playerMsg("- explosives");
|
playerMsg("- explosives");
|
||||||
playerMsg("- disguisecraft");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,29 +155,6 @@ public class Command_toggle extends TFM_Command
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args[0].equals("disguisecraft"))
|
|
||||||
{
|
|
||||||
final Plugin disguiseCraft = server.getPluginManager().getPlugin("DisguiseCraft");
|
|
||||||
if (disguiseCraft == null)
|
|
||||||
{
|
|
||||||
playerMsg("DisguiseCraft is not installed on this server.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean enabled = disguiseCraft.isEnabled();
|
|
||||||
TFM_Util.adminAction(sender.getName(), (enabled ? "disa" : "ena") + "bling DisguiseCraft", true);
|
|
||||||
|
|
||||||
if (enabled)
|
|
||||||
{
|
|
||||||
plugin.getServer().getPluginManager().disablePlugin(disguiseCraft);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
plugin.getServer().getPluginManager().enablePlugin(disguiseCraft);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
|
||||||
|
|
||||||
import me.StevenLawson.TotalFreedomMod.Bridge.TFM_DisguiseCraftBridge;
|
|
||||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH)
|
|
||||||
@CommandParameters(description = "Undisguises all players", usage = "/<command>")
|
|
||||||
public class Command_uall extends TFM_Command
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
|
||||||
{
|
|
||||||
TFM_Util.adminAction(sender.getName(), "Undisguising all players", true);
|
|
||||||
|
|
||||||
TFM_DisguiseCraftBridge.undisguiseAllPlayers();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
@ -2,7 +2,7 @@ name: TotalFreedomMod
|
|||||||
main: me.StevenLawson.TotalFreedomMod.TotalFreedomMod
|
main: me.StevenLawson.TotalFreedomMod.TotalFreedomMod
|
||||||
version: 4.3
|
version: 4.3
|
||||||
description: Plugin for the Total Freedom server.
|
description: Plugin for the Total Freedom server.
|
||||||
softdepend: [BukkitTelnet, DisguiseCraft, WorldEdit, Essentials]
|
softdepend: [BukkitTelnet, WorldEdit, Essentials]
|
||||||
authors: [Madgeek1450, DarthSalamon]
|
authors: [Madgeek1450, DarthSalamon]
|
||||||
|
|
||||||
# plugin.yml is no longer used to define commands.
|
# plugin.yml is no longer used to define commands.
|
||||||
|
Loading…
Reference in New Issue
Block a user