mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Merge branch 'master' of github.com:essentials/Essentials
This commit is contained in:
commit
462fe18b15
30 changed files with 594 additions and 180 deletions
|
@ -26,7 +26,7 @@ dist.jar=${dist.dir}/Essentials.jar
|
||||||
dist.javadoc.dir=${dist.dir}/javadoc
|
dist.javadoc.dir=${dist.dir}/javadoc
|
||||||
endorsed.classpath=
|
endorsed.classpath=
|
||||||
excludes=
|
excludes=
|
||||||
file.reference.BOSEconomy.jar=../lib/BOSEconomy.jar
|
file.reference.BOSEconomy7.jar=../lib/BOSEconomy7.jar
|
||||||
file.reference.craftbukkit-0.0.1-SNAPSHOT.jar=..\\lib\\craftbukkit-0.0.1-SNAPSHOT.jar
|
file.reference.craftbukkit-0.0.1-SNAPSHOT.jar=..\\lib\\craftbukkit-0.0.1-SNAPSHOT.jar
|
||||||
file.reference.iCo4.jar=../lib/iCo4.jar
|
file.reference.iCo4.jar=../lib/iCo4.jar
|
||||||
file.reference.iCo5.jar=../lib/iCo5.jar
|
file.reference.iCo5.jar=../lib/iCo5.jar
|
||||||
|
@ -37,9 +37,9 @@ jar.compress=false
|
||||||
javac.classpath=\
|
javac.classpath=\
|
||||||
${file.reference.Permissions3.jar}:\
|
${file.reference.Permissions3.jar}:\
|
||||||
${file.reference.craftbukkit-0.0.1-SNAPSHOT.jar}:\
|
${file.reference.craftbukkit-0.0.1-SNAPSHOT.jar}:\
|
||||||
${file.reference.BOSEconomy.jar}:\
|
|
||||||
${file.reference.iCo4.jar}:\
|
${file.reference.iCo4.jar}:\
|
||||||
${file.reference.iCo5.jar}
|
${file.reference.iCo5.jar}:\
|
||||||
|
${file.reference.BOSEconomy7.jar}
|
||||||
# Space-separated list of extra javac options
|
# Space-separated list of extra javac options
|
||||||
javac.compilerargs=
|
javac.compilerargs=
|
||||||
javac.deprecation=false
|
javac.deprecation=false
|
||||||
|
|
|
@ -30,7 +30,8 @@ public class ConfigPermissionsHandler implements IPermissionsHandler
|
||||||
public boolean hasPermission(final Player base, final String node)
|
public boolean hasPermission(final Player base, final String node)
|
||||||
{
|
{
|
||||||
final String[] cmds = node.split("\\.", 2);
|
final String[] cmds = node.split("\\.", 2);
|
||||||
return !ess.getSettings().isCommandRestricted(cmds[cmds.length - 1]);
|
return !ess.getSettings().isCommandRestricted(cmds[cmds.length - 1])
|
||||||
|
&& ess.getSettings().isPlayerCommand(cmds[cmds.length - 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPrefix(final Player base)
|
public String getPrefix(final Player base)
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class Essentials extends JavaPlugin implements IEssentials
|
||||||
{
|
{
|
||||||
public static final int BUKKIT_VERSION = 974;
|
public static final int BUKKIT_VERSION = 974;
|
||||||
private static final Logger LOGGER = Logger.getLogger("Minecraft");
|
private static final Logger LOGGER = Logger.getLogger("Minecraft");
|
||||||
private transient Settings settings;
|
private transient ISettings settings;
|
||||||
private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this);
|
private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this);
|
||||||
private transient Spawn spawn;
|
private transient Spawn spawn;
|
||||||
private transient Jail jail;
|
private transient Jail jail;
|
||||||
|
@ -65,7 +65,7 @@ public class Essentials extends JavaPlugin implements IEssentials
|
||||||
private transient final EssentialsErrorHandler errorHandler = new EssentialsErrorHandler();
|
private transient final EssentialsErrorHandler errorHandler = new EssentialsErrorHandler();
|
||||||
private transient IPermissionsHandler permissionsHandler;
|
private transient IPermissionsHandler permissionsHandler;
|
||||||
|
|
||||||
public Settings getSettings()
|
public ISettings getSettings()
|
||||||
{
|
{
|
||||||
return settings;
|
return settings;
|
||||||
}
|
}
|
||||||
|
@ -355,7 +355,7 @@ public class Essentials extends JavaPlugin implements IEssentials
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args)
|
public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args)
|
||||||
{
|
{
|
||||||
return onCommandEssentials(sender, command, commandLabel, args, Thread.currentThread().getContextClassLoader(), "com.earth2me.essentials.commands.Command", "essentials.");
|
return onCommandEssentials(sender, command, commandLabel, args, Essentials.class.getClassLoader(), "com.earth2me.essentials.commands.Command", "essentials.");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onCommandEssentials(CommandSender sender, Command command, String commandLabel, String[] args, ClassLoader classLoader, String commandPath, String permissionPrefix)
|
public boolean onCommandEssentials(CommandSender sender, Command command, String commandLabel, String[] args, ClassLoader classLoader, String commandPath, String permissionPrefix)
|
||||||
|
|
|
@ -25,7 +25,7 @@ public interface IEssentials extends Plugin
|
||||||
|
|
||||||
int broadcastMessage(String name, String message);
|
int broadcastMessage(String name, String message);
|
||||||
|
|
||||||
Settings getSettings();
|
ISettings getSettings();
|
||||||
|
|
||||||
CraftScheduler getScheduler();
|
CraftScheduler getScheduler();
|
||||||
|
|
||||||
|
|
131
Essentials/src/com/earth2me/essentials/ISettings.java
Normal file
131
Essentials/src/com/earth2me/essentials/ISettings.java
Normal file
|
@ -0,0 +1,131 @@
|
||||||
|
package com.earth2me.essentials;
|
||||||
|
|
||||||
|
import com.earth2me.essentials.commands.IEssentialsCommand;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
|
||||||
|
|
||||||
|
public interface ISettings extends IConf
|
||||||
|
{
|
||||||
|
|
||||||
|
boolean areSignsDisabled();
|
||||||
|
|
||||||
|
String format(String format, IUser user);
|
||||||
|
|
||||||
|
String getAnnounceNewPlayerFormat(IUser user);
|
||||||
|
|
||||||
|
boolean getAnnounceNewPlayers();
|
||||||
|
|
||||||
|
String getBackupCommand();
|
||||||
|
|
||||||
|
long getBackupInterval();
|
||||||
|
|
||||||
|
boolean getBedSetsHome();
|
||||||
|
|
||||||
|
String getChatFormat(String group);
|
||||||
|
|
||||||
|
int getChatRadius();
|
||||||
|
|
||||||
|
double getCommandCost(IEssentialsCommand cmd);
|
||||||
|
|
||||||
|
double getCommandCost(String label);
|
||||||
|
|
||||||
|
String getCurrencySymbol();
|
||||||
|
|
||||||
|
int getDefaultStackSize();
|
||||||
|
|
||||||
|
boolean getGenerateExitPortals();
|
||||||
|
|
||||||
|
double getHealCooldown();
|
||||||
|
|
||||||
|
Object getKit(String name);
|
||||||
|
|
||||||
|
Map<String, Object> getKits();
|
||||||
|
|
||||||
|
String getLocale();
|
||||||
|
|
||||||
|
String getNetherName();
|
||||||
|
|
||||||
|
boolean getNetherPortalsEnabled();
|
||||||
|
|
||||||
|
double getNetherRatio();
|
||||||
|
|
||||||
|
String getNewbieSpawn();
|
||||||
|
|
||||||
|
String getNicknamePrefix();
|
||||||
|
|
||||||
|
ChatColor getOperatorColor() throws Exception;
|
||||||
|
|
||||||
|
boolean getPerWarpPermission();
|
||||||
|
|
||||||
|
boolean getProtectBoolean(final String configName, boolean def);
|
||||||
|
|
||||||
|
int getProtectCreeperMaxHeight();
|
||||||
|
|
||||||
|
List<Integer> getProtectList(final String configName);
|
||||||
|
|
||||||
|
boolean getProtectPreventSpawn(final String creatureName);
|
||||||
|
|
||||||
|
String getProtectString(final String configName);
|
||||||
|
|
||||||
|
boolean getReclaimSetting();
|
||||||
|
|
||||||
|
boolean getRespawnAtHome();
|
||||||
|
|
||||||
|
boolean getSortListByGroups();
|
||||||
|
|
||||||
|
int getSpawnMobLimit();
|
||||||
|
|
||||||
|
int getStartingBalance();
|
||||||
|
|
||||||
|
double getTeleportCooldown();
|
||||||
|
|
||||||
|
double getTeleportDelay();
|
||||||
|
|
||||||
|
boolean hidePermissionlessHelp();
|
||||||
|
|
||||||
|
boolean isCommandDisabled(final IEssentialsCommand cmd);
|
||||||
|
|
||||||
|
boolean isCommandDisabled(String label);
|
||||||
|
|
||||||
|
boolean isCommandOverridden(String name);
|
||||||
|
|
||||||
|
boolean isCommandRestricted(IEssentialsCommand cmd);
|
||||||
|
|
||||||
|
boolean isCommandRestricted(String label);
|
||||||
|
|
||||||
|
boolean isDebug();
|
||||||
|
|
||||||
|
boolean isEcoDisabled();
|
||||||
|
|
||||||
|
boolean isNetherEnabled();
|
||||||
|
|
||||||
|
boolean isTradeInStacks(int id);
|
||||||
|
|
||||||
|
List<Integer> itemSpawnBlacklist();
|
||||||
|
|
||||||
|
boolean permissionBasedItemSpawn();
|
||||||
|
|
||||||
|
void reloadConfig();
|
||||||
|
|
||||||
|
boolean showNonEssCommandsInHelp();
|
||||||
|
|
||||||
|
boolean spawnIfNoHome();
|
||||||
|
|
||||||
|
boolean use1to1RatioInNether();
|
||||||
|
|
||||||
|
boolean warnOnBuildDisallow();
|
||||||
|
|
||||||
|
boolean warnOnSmite();
|
||||||
|
|
||||||
|
double getMaxMoney();
|
||||||
|
|
||||||
|
boolean isEcoLogEnabled();
|
||||||
|
|
||||||
|
boolean removeGodOnDisconnect();
|
||||||
|
|
||||||
|
boolean changeDisplayName();
|
||||||
|
|
||||||
|
boolean isPlayerCommand(String string);
|
||||||
|
}
|
|
@ -11,7 +11,7 @@ import java.util.Map;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
|
||||||
public class Settings implements IConf
|
public class Settings implements ISettings
|
||||||
{
|
{
|
||||||
private final transient EssentialsConf config;
|
private final transient EssentialsConf config;
|
||||||
private final static Logger logger = Logger.getLogger("Minecraft");
|
private final static Logger logger = Logger.getLogger("Minecraft");
|
||||||
|
@ -22,49 +22,58 @@ public class Settings implements IConf
|
||||||
this.ess = ess;
|
this.ess = ess;
|
||||||
config = new EssentialsConf(new File(ess.getDataFolder(), "config.yml"));
|
config = new EssentialsConf(new File(ess.getDataFolder(), "config.yml"));
|
||||||
config.setTemplateName("/config.yml");
|
config.setTemplateName("/config.yml");
|
||||||
config.load();
|
reloadConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean getRespawnAtHome()
|
public boolean getRespawnAtHome()
|
||||||
{
|
{
|
||||||
return config.getBoolean("respawn-at-home", false);
|
return config.getBoolean("respawn-at-home", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean getBedSetsHome()
|
public boolean getBedSetsHome()
|
||||||
{
|
{
|
||||||
return config.getBoolean("bed-sethome", false);
|
return config.getBoolean("bed-sethome", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getChatRadius()
|
public int getChatRadius()
|
||||||
{
|
{
|
||||||
return config.getInt("chat.radius", config.getInt("chat-radius", 0));
|
return config.getInt("chat.radius", config.getInt("chat-radius", 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public double getTeleportDelay()
|
public double getTeleportDelay()
|
||||||
{
|
{
|
||||||
return config.getDouble("teleport-delay", 0);
|
return config.getDouble("teleport-delay", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getDefaultStackSize()
|
public int getDefaultStackSize()
|
||||||
{
|
{
|
||||||
return config.getInt("default-stack-size", 64);
|
return config.getInt("default-stack-size", 64);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getStartingBalance()
|
public int getStartingBalance()
|
||||||
{
|
{
|
||||||
return config.getInt("starting-balance", 0);
|
return config.getInt("starting-balance", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean getNetherPortalsEnabled()
|
public boolean getNetherPortalsEnabled()
|
||||||
{
|
{
|
||||||
return isNetherEnabled() && config.getBoolean("nether.portals-enabled", false);
|
return isNetherEnabled() && config.getBoolean("nether.portals-enabled", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isCommandDisabled(final IEssentialsCommand cmd)
|
public boolean isCommandDisabled(final IEssentialsCommand cmd)
|
||||||
{
|
{
|
||||||
return isCommandDisabled(cmd.getName());
|
return isCommandDisabled(cmd.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isCommandDisabled(String label)
|
public boolean isCommandDisabled(String label)
|
||||||
{
|
{
|
||||||
for (String c : config.getStringList("disabled-commands", new ArrayList<String>(0)))
|
for (String c : config.getStringList("disabled-commands", new ArrayList<String>(0)))
|
||||||
|
@ -75,11 +84,13 @@ public class Settings implements IConf
|
||||||
return config.getBoolean("disable-" + label.toLowerCase(), false);
|
return config.getBoolean("disable-" + label.toLowerCase(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isCommandRestricted(IEssentialsCommand cmd)
|
public boolean isCommandRestricted(IEssentialsCommand cmd)
|
||||||
{
|
{
|
||||||
return isCommandRestricted(cmd.getName());
|
return isCommandRestricted(cmd.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isCommandRestricted(String label)
|
public boolean isCommandRestricted(String label)
|
||||||
{
|
{
|
||||||
for (String c : config.getStringList("restricted-commands", new ArrayList<String>(0)))
|
for (String c : config.getStringList("restricted-commands", new ArrayList<String>(0)))
|
||||||
|
@ -89,7 +100,19 @@ public class Settings implements IConf
|
||||||
}
|
}
|
||||||
return config.getBoolean("restrict-" + label.toLowerCase(), false);
|
return config.getBoolean("restrict-" + label.toLowerCase(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isPlayerCommand(String label)
|
||||||
|
{
|
||||||
|
for (String c : config.getStringList("player-commands", new ArrayList<String>(0)))
|
||||||
|
{
|
||||||
|
if (!c.equalsIgnoreCase(label)) continue;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isCommandOverridden(String name)
|
public boolean isCommandOverridden(String name)
|
||||||
{
|
{
|
||||||
List<String> defaultList = new ArrayList<String>(1);
|
List<String> defaultList = new ArrayList<String>(1);
|
||||||
|
@ -103,11 +126,13 @@ public class Settings implements IConf
|
||||||
return config.getBoolean("override-" + name.toLowerCase(), false);
|
return config.getBoolean("override-" + name.toLowerCase(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public double getCommandCost(IEssentialsCommand cmd)
|
public double getCommandCost(IEssentialsCommand cmd)
|
||||||
{
|
{
|
||||||
return getCommandCost(cmd.getName());
|
return getCommandCost(cmd.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public double getCommandCost(String label)
|
public double getCommandCost(String label)
|
||||||
{
|
{
|
||||||
double cost = config.getDouble("command-costs." + label, 0.0);
|
double cost = config.getDouble("command-costs." + label, 0.0);
|
||||||
|
@ -116,26 +141,25 @@ public class Settings implements IConf
|
||||||
return cost;
|
return cost;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCommandPrefix()
|
@Override
|
||||||
{
|
|
||||||
return config.getString("command-prefix", "");
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNicknamePrefix()
|
public String getNicknamePrefix()
|
||||||
{
|
{
|
||||||
return config.getString("nickname-prefix", "~");
|
return config.getString("nickname-prefix", "~");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public double getTeleportCooldown()
|
public double getTeleportCooldown()
|
||||||
{
|
{
|
||||||
return config.getDouble("teleport-cooldown", 60);
|
return config.getDouble("teleport-cooldown", 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public double getHealCooldown()
|
public double getHealCooldown()
|
||||||
{
|
{
|
||||||
return config.getDouble("heal-cooldown", 60);
|
return config.getDouble("heal-cooldown", 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Object getKit(String name)
|
public Object getKit(String name)
|
||||||
{
|
{
|
||||||
Map<String, Object> kits = (Map<String, Object>)config.getProperty("kits");
|
Map<String, Object> kits = (Map<String, Object>)config.getProperty("kits");
|
||||||
|
@ -148,11 +172,13 @@ public class Settings implements IConf
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Map<String, Object> getKits()
|
public Map<String, Object> getKits()
|
||||||
{
|
{
|
||||||
return (Map<String, Object>)config.getProperty("kits");
|
return (Map<String, Object>)config.getProperty("kits");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ChatColor getOperatorColor() throws Exception
|
public ChatColor getOperatorColor() throws Exception
|
||||||
{
|
{
|
||||||
String colorName = config.getString("ops-name-color", null);
|
String colorName = config.getString("ops-name-color", null);
|
||||||
|
@ -173,100 +199,120 @@ public class Settings implements IConf
|
||||||
return ChatColor.getByCode(Integer.parseInt(colorName, 16));
|
return ChatColor.getByCode(Integer.parseInt(colorName, 16));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean getReclaimSetting()
|
public boolean getReclaimSetting()
|
||||||
{
|
{
|
||||||
return config.getBoolean("reclaim-onlogout", true);
|
return config.getBoolean("reclaim-onlogout", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getNetherName()
|
public String getNetherName()
|
||||||
{
|
{
|
||||||
return config.getString("nether.folder", "nether");
|
return config.getString("nether.folder", "nether");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isNetherEnabled()
|
public boolean isNetherEnabled()
|
||||||
{
|
{
|
||||||
return config.getBoolean("nether.enabled", true);
|
return config.getBoolean("nether.enabled", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getSpawnMobLimit()
|
public int getSpawnMobLimit()
|
||||||
{
|
{
|
||||||
return config.getInt("spawnmob-limit", 10);
|
return config.getInt("spawnmob-limit", 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean showNonEssCommandsInHelp()
|
public boolean showNonEssCommandsInHelp()
|
||||||
{
|
{
|
||||||
return config.getBoolean("non-ess-in-help", true);
|
return config.getBoolean("non-ess-in-help", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean hidePermissionlessHelp()
|
public boolean hidePermissionlessHelp()
|
||||||
{
|
{
|
||||||
return config.getBoolean("hide-permissionless-help", true);
|
return config.getBoolean("hide-permissionless-help", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getProtectCreeperMaxHeight()
|
public int getProtectCreeperMaxHeight()
|
||||||
{
|
{
|
||||||
return config.getInt("protect.creeper.max-height", -1);
|
return config.getInt("protect.creeper.max-height", -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean areSignsDisabled()
|
public boolean areSignsDisabled()
|
||||||
{
|
{
|
||||||
return config.getBoolean("signs-disabled", false);
|
return config.getBoolean("signs-disabled", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public long getBackupInterval()
|
public long getBackupInterval()
|
||||||
{
|
{
|
||||||
return config.getInt("backup.interval", 1440); // 1440 = 24 * 60
|
return config.getInt("backup.interval", 1440); // 1440 = 24 * 60
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getBackupCommand()
|
public String getBackupCommand()
|
||||||
{
|
{
|
||||||
return config.getString("backup.command", null);
|
return config.getString("backup.command", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getChatFormat(String group)
|
public String getChatFormat(String group)
|
||||||
{
|
{
|
||||||
return config.getString("chat.group-formats." + (group == null ? "Default" : group),
|
return config.getString("chat.group-formats." + (group == null ? "Default" : group),
|
||||||
config.getString("chat.format", "&7[{GROUP}]&f {DISPLAYNAME}&7:&f {MESSAGE}"));
|
config.getString("chat.format", "&7[{GROUP}]&f {DISPLAYNAME}&7:&f {MESSAGE}"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean getGenerateExitPortals()
|
public boolean getGenerateExitPortals()
|
||||||
{
|
{
|
||||||
return config.getBoolean("nether.generate-exit-portals", true);
|
return config.getBoolean("nether.generate-exit-portals", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean getAnnounceNewPlayers()
|
public boolean getAnnounceNewPlayers()
|
||||||
{
|
{
|
||||||
return !config.getString("newbies.announce-format", "-").isEmpty();
|
return !config.getString("newbies.announce-format", "-").isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getAnnounceNewPlayerFormat(IUser user)
|
public String getAnnounceNewPlayerFormat(IUser user)
|
||||||
{
|
{
|
||||||
return format(config.getString("newbies.announce-format", "&dWelcome {DISPLAYNAME} to the server!"), user);
|
return format(config.getString("newbies.announce-format", "&dWelcome {DISPLAYNAME} to the server!"), user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String format(String format, IUser user)
|
public String format(String format, IUser user)
|
||||||
{
|
{
|
||||||
return format.replace('&', '§').replace("§§", "&").replace("{PLAYER}", user.getDisplayName()).replace("{DISPLAYNAME}", user.getDisplayName()).replace("{GROUP}", user.getGroup()).replace("{USERNAME}", user.getName()).replace("{ADDRESS}", user.getAddress().toString());
|
return format.replace('&', '§').replace("§§", "&").replace("{PLAYER}", user.getDisplayName()).replace("{DISPLAYNAME}", user.getDisplayName()).replace("{GROUP}", user.getGroup()).replace("{USERNAME}", user.getName()).replace("{ADDRESS}", user.getAddress().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getNewbieSpawn()
|
public String getNewbieSpawn()
|
||||||
{
|
{
|
||||||
return config.getString("newbies.spawnpoint", "default");
|
return config.getString("newbies.spawnpoint", "default");
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public boolean getPerWarpPermission()
|
public boolean getPerWarpPermission()
|
||||||
{
|
{
|
||||||
return config.getBoolean("per-warp-permission", false);
|
return config.getBoolean("per-warp-permission", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean getSortListByGroups()
|
public boolean getSortListByGroups()
|
||||||
{
|
{
|
||||||
return config.getBoolean("sort-list-by-groups", true);
|
return config.getBoolean("sort-list-by-groups", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void reloadConfig() {
|
public void reloadConfig() {
|
||||||
config.load();
|
config.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public List<Integer> itemSpawnBlacklist()
|
public List<Integer> itemSpawnBlacklist()
|
||||||
{
|
{
|
||||||
final List<Integer> epItemSpwn = new ArrayList<Integer>();
|
final List<Integer> epItemSpwn = new ArrayList<Integer>();
|
||||||
|
@ -286,21 +332,25 @@ public class Settings implements IConf
|
||||||
return epItemSpwn;
|
return epItemSpwn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean spawnIfNoHome()
|
public boolean spawnIfNoHome()
|
||||||
{
|
{
|
||||||
return config.getBoolean("spawn-if-no-home", false);
|
return config.getBoolean("spawn-if-no-home", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean warnOnBuildDisallow()
|
public boolean warnOnBuildDisallow()
|
||||||
{
|
{
|
||||||
return config.getBoolean("protect.disable.warn-on-build-disallow", false);
|
return config.getBoolean("protect.disable.warn-on-build-disallow", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean use1to1RatioInNether()
|
public boolean use1to1RatioInNether()
|
||||||
{
|
{
|
||||||
return config.getBoolean("nether.use-1to1-ratio", false);
|
return config.getBoolean("nether.use-1to1-ratio", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public double getNetherRatio()
|
public double getNetherRatio()
|
||||||
{
|
{
|
||||||
if (config.getBoolean("nether.use-1to1-ratio", false)) {
|
if (config.getBoolean("nether.use-1to1-ratio", false)) {
|
||||||
|
@ -309,46 +359,55 @@ public class Settings implements IConf
|
||||||
return config.getDouble("nether.ratio", 16.0);
|
return config.getDouble("nether.ratio", 16.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isDebug()
|
public boolean isDebug()
|
||||||
{
|
{
|
||||||
return config.getBoolean("debug", false);
|
return config.getBoolean("debug", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean warnOnSmite()
|
public boolean warnOnSmite()
|
||||||
{
|
{
|
||||||
return config.getBoolean("warn-on-smite" ,true);
|
return config.getBoolean("warn-on-smite" ,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean permissionBasedItemSpawn()
|
public boolean permissionBasedItemSpawn()
|
||||||
{
|
{
|
||||||
return config.getBoolean("permission-based-item-spawn", false);
|
return config.getBoolean("permission-based-item-spawn", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getLocale()
|
public String getLocale()
|
||||||
{
|
{
|
||||||
return config.getString("locale", "");
|
return config.getString("locale", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getCurrencySymbol()
|
public String getCurrencySymbol()
|
||||||
{
|
{
|
||||||
return config.getString("currency-symbol", "$").substring(0, 1).replaceAll("[0-9]", "$");
|
return config.getString("currency-symbol", "$").substring(0, 1).replaceAll("[0-9]", "$");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isTradeInStacks(int id)
|
public boolean isTradeInStacks(int id)
|
||||||
{
|
{
|
||||||
return config.getBoolean("trade-in-stacks-" + id, false);
|
return config.getBoolean("trade-in-stacks-" + id, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isEcoDisabled()
|
public boolean isEcoDisabled()
|
||||||
{
|
{
|
||||||
return config.getBoolean("disable-eco", false);
|
return config.getBoolean("disable-eco", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean getProtectPreventSpawn(final String creatureName)
|
public boolean getProtectPreventSpawn(final String creatureName)
|
||||||
{
|
{
|
||||||
return config.getBoolean("protect.prevent.spawn."+creatureName, false);
|
return config.getBoolean("protect.prevent.spawn."+creatureName, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public List<Integer> getProtectList(final String configName)
|
public List<Integer> getProtectList(final String configName)
|
||||||
{
|
{
|
||||||
final List<Integer> list = new ArrayList<Integer>();
|
final List<Integer> list = new ArrayList<Integer>();
|
||||||
|
@ -368,18 +427,20 @@ public class Settings implements IConf
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getProtectString(final String configName)
|
public String getProtectString(final String configName)
|
||||||
{
|
{
|
||||||
return config.getString(configName, null);
|
return config.getString(configName, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean getProtectBoolean(final String configName, boolean def)
|
public boolean getProtectBoolean(final String configName, boolean def)
|
||||||
{
|
{
|
||||||
return config.getBoolean(configName, def);
|
return config.getBoolean(configName, def);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final static double MAXMONEY = 10000000000000.0;
|
private final static double MAXMONEY = 10000000000000.0;
|
||||||
double getMaxMoney()
|
public double getMaxMoney()
|
||||||
{
|
{
|
||||||
double max = config.getDouble("max-money", MAXMONEY);
|
double max = config.getDouble("max-money", MAXMONEY);
|
||||||
if (Math.abs(max) > MAXMONEY) {
|
if (Math.abs(max) > MAXMONEY) {
|
||||||
|
@ -388,17 +449,17 @@ public class Settings implements IConf
|
||||||
return max;
|
return max;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isEcoLogEnabled()
|
public boolean isEcoLogEnabled()
|
||||||
{
|
{
|
||||||
return config.getBoolean("economy-log-enabled", false);
|
return config.getBoolean("economy-log-enabled", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean removeGodOnDisconnect()
|
public boolean removeGodOnDisconnect()
|
||||||
{
|
{
|
||||||
return config.getBoolean("remove-god-on-disconnect", false);
|
return config.getBoolean("remove-god-on-disconnect", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean changeDisplayName()
|
public boolean changeDisplayName()
|
||||||
{
|
{
|
||||||
return config.getBoolean("change-displayname", true);
|
return config.getBoolean("change-displayname", true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@ public class Commandkick extends EssentialsCommand
|
||||||
if (u.isAuthorized("essentials.kick.exempt"))
|
if (u.isAuthorized("essentials.kick.exempt"))
|
||||||
{
|
{
|
||||||
sender.sendMessage(Util.i18n("kickExempt"));
|
sender.sendMessage(Util.i18n("kickExempt"));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
charge(sender);
|
charge(sender);
|
||||||
final String kickReason = args.length > 1 ? getFinalArg(args, 1) : Util.i18n("kickDefault");
|
final String kickReason = args.length > 1 ? getFinalArg(args, 1) : Util.i18n("kickDefault");
|
||||||
|
|
|
@ -1,53 +1,52 @@
|
||||||
package com.earth2me.essentials.commands;
|
package com.earth2me.essentials.commands;
|
||||||
|
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import com.earth2me.essentials.User;
|
import com.earth2me.essentials.User;
|
||||||
import com.earth2me.essentials.Util;
|
import com.earth2me.essentials.Util;
|
||||||
|
|
||||||
|
|
||||||
public class Commandmute extends EssentialsCommand
|
public class Commandmute extends EssentialsCommand
|
||||||
{
|
{
|
||||||
public Commandmute()
|
public Commandmute()
|
||||||
{
|
{
|
||||||
super("mute");
|
super("mute");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
|
public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
|
||||||
{
|
{
|
||||||
if (args.length < 1)
|
if (args.length < 1)
|
||||||
{
|
{
|
||||||
throw new NotEnoughArgumentsException();
|
throw new NotEnoughArgumentsException();
|
||||||
}
|
}
|
||||||
|
|
||||||
User p = getPlayer(server, args, 0, true);
|
User p = getPlayer(server, args, 0, true);
|
||||||
if (p.isAuthorized("essentials.mute.exempt"))
|
if (p.isAuthorized("essentials.mute.exempt"))
|
||||||
{
|
{
|
||||||
sender.sendMessage(commandLabel);
|
sender.sendMessage(Util.i18n("muteExempt"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
long muteTimestamp = 0;
|
long muteTimestamp = 0;
|
||||||
if (args.length > 1)
|
if (args.length > 1)
|
||||||
{
|
{
|
||||||
String time = getFinalArg(args, 1);
|
String time = getFinalArg(args, 1);
|
||||||
muteTimestamp = Util.parseDateDiff(time, true);
|
muteTimestamp = Util.parseDateDiff(time, true);
|
||||||
}
|
}
|
||||||
p.setMuteTimeout(muteTimestamp);
|
p.setMuteTimeout(muteTimestamp);
|
||||||
charge(sender);
|
charge(sender);
|
||||||
boolean muted = p.toggleMuted();
|
boolean muted = p.toggleMuted();
|
||||||
sender.sendMessage(
|
sender.sendMessage(
|
||||||
muted
|
muted
|
||||||
? (muteTimestamp > 0
|
? (muteTimestamp > 0
|
||||||
? Util.format("mutedPlayerFor", p.getDisplayName(), Util.formatDateDiff(muteTimestamp))
|
? Util.format("mutedPlayerFor", p.getDisplayName(), Util.formatDateDiff(muteTimestamp))
|
||||||
: Util.format("mutedPlayer", p.getDisplayName()))
|
: Util.format("mutedPlayer", p.getDisplayName()))
|
||||||
: Util.format("unmutedPlayer", p.getDisplayName()));
|
: Util.format("unmutedPlayer", p.getDisplayName()));
|
||||||
p.sendMessage(
|
p.sendMessage(
|
||||||
muted
|
muted
|
||||||
? (muteTimestamp > 0
|
? (muteTimestamp > 0
|
||||||
? Util.format("playerMutedFor", Util.formatDateDiff(muteTimestamp))
|
? Util.format("playerMutedFor", Util.formatDateDiff(muteTimestamp))
|
||||||
: Util.i18n("playerMuted"))
|
: Util.i18n("playerMuted"))
|
||||||
: Util.i18n("playerUnmuted"));
|
: Util.i18n("playerUnmuted"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class Commandtempban extends EssentialsCommand
|
||||||
final String time = getFinalArg(args, 1);
|
final String time = getFinalArg(args, 1);
|
||||||
final long banTimestamp = Util.parseDateDiff(time, true);
|
final long banTimestamp = Util.parseDateDiff(time, true);
|
||||||
|
|
||||||
final String banReason = (args.length == 3 && !args[2].isEmpty()) ? args[2].toString() + " - " + Util.formatDateDiff(banTimestamp) : Util.format("tempBanned", Util.formatDateDiff(banTimestamp));
|
final String banReason = Util.format("tempBanned", Util.formatDateDiff(banTimestamp));
|
||||||
player.setBanReason(banReason);
|
player.setBanReason(banReason);
|
||||||
player.setBanTimeout(banTimestamp);
|
player.setBanTimeout(banTimestamp);
|
||||||
player.kickPlayer(banReason);
|
player.kickPlayer(banReason);
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
package com.earth2me.essentials.register.payment;
|
package com.earth2me.essentials.register.payment;
|
||||||
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
|
|
||||||
/***
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
* Methods.java
|
* Methods.java
|
||||||
* Controls the getting / setting of methods & the method of payment used.
|
* Controls the getting / setting of methods & the method of payment used.
|
||||||
*
|
*
|
||||||
|
@ -19,18 +17,36 @@ import org.bukkit.plugin.PluginManager;
|
||||||
public class Methods {
|
public class Methods {
|
||||||
private boolean self = false;
|
private boolean self = false;
|
||||||
private Method Method = null;
|
private Method Method = null;
|
||||||
private String preferred = "";
|
private String preferred = "";
|
||||||
private Set<Method> Methods = new HashSet<Method>();
|
private Set<Method> Methods = new HashSet<Method>();
|
||||||
private Set<String> Dependencies = new HashSet<String>();
|
private Set<String> Dependencies = new HashSet<String>();
|
||||||
private Set<Method> Attachables = new HashSet<Method>();
|
private Set<Method> Attachables = new HashSet<Method>();
|
||||||
|
|
||||||
public Methods() {
|
public Methods() {
|
||||||
this.addMethod("iConomy", new com.earth2me.essentials.register.payment.methods.iCo4());
|
this._init();
|
||||||
this.addMethod("iConomy", new com.earth2me.essentials.register.payment.methods.iCo5());
|
|
||||||
this.addMethod("BOSEconomy", new com.earth2me.essentials.register.payment.methods.BOSE());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<String> getDependencies() {
|
/**
|
||||||
|
* Allows you to set which economy plugin is most preferred.
|
||||||
|
*
|
||||||
|
* @param preferred - preferred economy plugin
|
||||||
|
*/
|
||||||
|
public Methods(String preferred) {
|
||||||
|
this._init();
|
||||||
|
|
||||||
|
if(this.Dependencies.contains(preferred)) {
|
||||||
|
this.preferred = preferred;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _init() {
|
||||||
|
this.addMethod("iConomy", new com.earth2me.essentials.register.payment.methods.iCo4());
|
||||||
|
this.addMethod("iConomy", new com.earth2me.essentials.register.payment.methods.iCo5());
|
||||||
|
this.addMethod("BOSEconomy", new com.earth2me.essentials.register.payment.methods.BOSE6());
|
||||||
|
this.addMethod("BOSEconomy", new com.earth2me.essentials.register.payment.methods.BOSE7());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Set<String> getDependencies() {
|
||||||
return Dependencies;
|
return Dependencies;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +76,7 @@ public class Methods {
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
boolean match = false;
|
boolean match = false;
|
||||||
Plugin plugin = null;
|
Plugin plugin;
|
||||||
PluginManager manager = method.getServer().getPluginManager();
|
PluginManager manager = method.getServer().getPluginManager();
|
||||||
|
|
||||||
for(String name: this.getDependencies()) {
|
for(String name: this.getDependencies()) {
|
||||||
|
@ -68,14 +84,6 @@ public class Methods {
|
||||||
if(method.getDescription().getName().equals(name)) plugin = method; else plugin = manager.getPlugin(name);
|
if(method.getDescription().getName().equals(name)) plugin = method; else plugin = manager.getPlugin(name);
|
||||||
if(plugin == null) continue;
|
if(plugin == null) continue;
|
||||||
|
|
||||||
if(!plugin.isEnabled()) {
|
|
||||||
this.self = true;
|
|
||||||
Logger.getLogger("Minecraft").log(Level.SEVERE, name + " Plugin was found, but not enabled before Essentials. Read the Essentials thread for help.");
|
|
||||||
//manager.enablePlugin(plugin);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(plugin == null) continue;
|
|
||||||
|
|
||||||
Method current = this.createMethod(plugin);
|
Method current = this.createMethod(plugin);
|
||||||
if(current == null) continue;
|
if(current == null) continue;
|
||||||
|
|
||||||
|
@ -86,7 +94,7 @@ public class Methods {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!this.preferred.isEmpty()) {
|
if(!this.preferred.isEmpty()) {
|
||||||
do {
|
do {
|
||||||
if(hasMethod()) {
|
if(hasMethod()) {
|
||||||
match = true;
|
match = true;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import com.earth2me.essentials.register.payment.Method;
|
||||||
import cosine.boseconomy.BOSEconomy;
|
import cosine.boseconomy.BOSEconomy;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
public class BOSE implements Method {
|
public class BOSE6 implements Method {
|
||||||
private BOSEconomy BOSEconomy;
|
private BOSEconomy BOSEconomy;
|
||||||
|
|
||||||
public BOSEconomy getPlugin() {
|
public BOSEconomy getPlugin() {
|
||||||
|
@ -38,7 +38,7 @@ public class BOSE implements Method {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasBankAccount(String bank, String name) {
|
public boolean hasBankAccount(String bank, String name) {
|
||||||
return this.BOSEconomy.isBankOwner(bank, name);
|
return this.BOSEconomy.isBankOwner(bank, name) || this.BOSEconomy.isBankMember(bank, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MethodAccount getAccount(String name) {
|
public MethodAccount getAccount(String name) {
|
||||||
|
@ -47,11 +47,12 @@ public class BOSE implements Method {
|
||||||
}
|
}
|
||||||
|
|
||||||
public MethodBankAccount getBankAccount(String bank, String name) {
|
public MethodBankAccount getBankAccount(String bank, String name) {
|
||||||
return new BOSEBankAccount(bank, name, BOSEconomy);
|
if(!hasBankAccount(bank, name)) return null;
|
||||||
|
return new BOSEBankAccount(bank, BOSEconomy);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isCompatible(Plugin plugin) {
|
public boolean isCompatible(Plugin plugin) {
|
||||||
return plugin.getDescription().getName().equalsIgnoreCase("boseconomy") && plugin instanceof BOSEconomy;
|
return plugin.getDescription().getName().equalsIgnoreCase("boseconomy") && plugin instanceof BOSEconomy && plugin.getDescription().getVersion().equals("0.6.2");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPlugin(Plugin plugin) {
|
public void setPlugin(Plugin plugin) {
|
||||||
|
@ -122,11 +123,9 @@ public class BOSE implements Method {
|
||||||
|
|
||||||
public class BOSEBankAccount implements MethodBankAccount {
|
public class BOSEBankAccount implements MethodBankAccount {
|
||||||
private String bank;
|
private String bank;
|
||||||
private String name;
|
|
||||||
private BOSEconomy BOSEconomy;
|
private BOSEconomy BOSEconomy;
|
||||||
|
|
||||||
public BOSEBankAccount(String bank, String name, BOSEconomy bOSEconomy) {
|
public BOSEBankAccount(String bank, BOSEconomy bOSEconomy) {
|
||||||
this.name = name;
|
|
||||||
this.bank = bank;
|
this.bank = bank;
|
||||||
this.BOSEconomy = bOSEconomy;
|
this.BOSEconomy = bOSEconomy;
|
||||||
}
|
}
|
||||||
|
@ -140,36 +139,36 @@ public class BOSE implements Method {
|
||||||
}
|
}
|
||||||
|
|
||||||
public double balance() {
|
public double balance() {
|
||||||
return Double.valueOf(this.BOSEconomy.getBankMoney(name));
|
return Double.valueOf(this.BOSEconomy.getBankMoney(bank));
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean set(double amount) {
|
public boolean set(double amount) {
|
||||||
int IntAmount = (int)Math.ceil(amount);
|
int IntAmount = (int)Math.ceil(amount);
|
||||||
return this.BOSEconomy.setBankMoney(name, IntAmount, true);
|
return this.BOSEconomy.setBankMoney(bank, IntAmount, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean add(double amount) {
|
public boolean add(double amount) {
|
||||||
int IntAmount = (int)Math.ceil(amount);
|
int IntAmount = (int)Math.ceil(amount);
|
||||||
int balance = (int)this.balance();
|
int balance = (int)this.balance();
|
||||||
return this.BOSEconomy.setBankMoney(this.name, (balance + IntAmount), false);
|
return this.BOSEconomy.setBankMoney(bank, (balance + IntAmount), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean subtract(double amount) {
|
public boolean subtract(double amount) {
|
||||||
int IntAmount = (int)Math.ceil(amount);
|
int IntAmount = (int)Math.ceil(amount);
|
||||||
int balance = (int)this.balance();
|
int balance = (int)this.balance();
|
||||||
return this.BOSEconomy.setBankMoney(this.name, (balance - IntAmount), false);
|
return this.BOSEconomy.setBankMoney(bank, (balance - IntAmount), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean multiply(double amount) {
|
public boolean multiply(double amount) {
|
||||||
int IntAmount = (int)Math.ceil(amount);
|
int IntAmount = (int)Math.ceil(amount);
|
||||||
int balance = (int)this.balance();
|
int balance = (int)this.balance();
|
||||||
return this.BOSEconomy.setBankMoney(this.name, (balance * IntAmount), false);
|
return this.BOSEconomy.setBankMoney(bank, (balance * IntAmount), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean divide(double amount) {
|
public boolean divide(double amount) {
|
||||||
int IntAmount = (int)Math.ceil(amount);
|
int IntAmount = (int)Math.ceil(amount);
|
||||||
int balance = (int)this.balance();
|
int balance = (int)this.balance();
|
||||||
return this.BOSEconomy.setBankMoney(this.name, (balance / IntAmount), false);
|
return this.BOSEconomy.setBankMoney(bank, (balance / IntAmount), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasEnough(double amount) {
|
public boolean hasEnough(double amount) {
|
|
@ -0,0 +1,188 @@
|
||||||
|
package com.earth2me.essentials.register.payment.methods;
|
||||||
|
|
||||||
|
import com.earth2me.essentials.register.payment.Method;
|
||||||
|
import cosine.boseconomy.BOSEconomy;
|
||||||
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Acrobot
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class BOSE7 implements Method {
|
||||||
|
private BOSEconomy BOSEconomy;
|
||||||
|
|
||||||
|
public BOSEconomy getPlugin() {
|
||||||
|
return this.BOSEconomy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return "BOSEconomy";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVersion() {
|
||||||
|
return "0.7.0";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String format(double amount) {
|
||||||
|
String currency = this.BOSEconomy.getMoneyNamePlural();
|
||||||
|
if(amount == 1) currency = this.BOSEconomy.getMoneyName();
|
||||||
|
return amount + " " + currency;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasBanks() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasBank(String bank) {
|
||||||
|
return this.BOSEconomy.bankExists(bank);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasAccount(String name) {
|
||||||
|
return this.BOSEconomy.playerRegistered(name, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasBankAccount(String bank, String name) {
|
||||||
|
return this.BOSEconomy.isBankOwner(bank, name) || this.BOSEconomy.isBankMember(bank, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public MethodAccount getAccount(String name) {
|
||||||
|
if(!hasAccount(name)) return null;
|
||||||
|
return new BOSEAccount(name, this.BOSEconomy);
|
||||||
|
}
|
||||||
|
|
||||||
|
public MethodBankAccount getBankAccount(String bank, String name) {
|
||||||
|
if(!hasBankAccount(bank, name)) return null;
|
||||||
|
return new BOSEBankAccount(bank, BOSEconomy);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isCompatible(Plugin plugin) {
|
||||||
|
return plugin.getDescription().getName().equalsIgnoreCase("boseconomy") && plugin instanceof BOSEconomy && !plugin.getDescription().getVersion().equals("0.6.2");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPlugin(Plugin plugin) {
|
||||||
|
BOSEconomy = (BOSEconomy)plugin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class BOSEAccount implements MethodAccount {
|
||||||
|
private String name;
|
||||||
|
private BOSEconomy BOSEconomy;
|
||||||
|
|
||||||
|
public BOSEAccount(String name, BOSEconomy bOSEconomy) {
|
||||||
|
this.name = name;
|
||||||
|
this.BOSEconomy = bOSEconomy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double balance() {
|
||||||
|
return this.BOSEconomy.getPlayerMoneyDouble(this.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean set(double amount) {
|
||||||
|
return this.BOSEconomy.setPlayerMoney(this.name, amount, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean add(double amount) {
|
||||||
|
return this.BOSEconomy.addPlayerMoney(this.name, amount, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean subtract(double amount) {
|
||||||
|
double balance = this.balance();
|
||||||
|
return this.BOSEconomy.setPlayerMoney(this.name, (balance - amount), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean multiply(double amount) {
|
||||||
|
double balance = this.balance();
|
||||||
|
return this.BOSEconomy.setPlayerMoney(this.name, (balance * amount), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean divide(double amount) {
|
||||||
|
double balance = this.balance();
|
||||||
|
return this.BOSEconomy.setPlayerMoney(this.name, (balance / amount), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasEnough(double amount) {
|
||||||
|
return (this.balance() >= amount);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasOver(double amount) {
|
||||||
|
return (this.balance() > amount);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasUnder(double amount) {
|
||||||
|
return (this.balance() < amount);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isNegative() {
|
||||||
|
return (this.balance() < 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean remove() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class BOSEBankAccount implements MethodBankAccount {
|
||||||
|
private String bank;
|
||||||
|
private BOSEconomy BOSEconomy;
|
||||||
|
|
||||||
|
public BOSEBankAccount(String bank, BOSEconomy bOSEconomy) {
|
||||||
|
this.bank = bank;
|
||||||
|
this.BOSEconomy = bOSEconomy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBankName() {
|
||||||
|
return this.bank;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getBankId() {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double balance() {
|
||||||
|
return this.BOSEconomy.getBankMoneyDouble(bank);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean set(double amount) {
|
||||||
|
return this.BOSEconomy.setBankMoney(bank, amount, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean add(double amount) {
|
||||||
|
double balance = this.balance();
|
||||||
|
return this.BOSEconomy.setBankMoney(bank, (balance + amount), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean subtract(double amount) {
|
||||||
|
double balance = this.balance();
|
||||||
|
return this.BOSEconomy.setBankMoney(bank, (balance - amount), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean multiply(double amount) {
|
||||||
|
double balance = this.balance();
|
||||||
|
return this.BOSEconomy.setBankMoney(bank, (balance * amount), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean divide(double amount) {
|
||||||
|
double balance = this.balance();
|
||||||
|
return this.BOSEconomy.setBankMoney(bank, (balance / amount), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasEnough(double amount) {
|
||||||
|
return (this.balance() >= amount);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasOver(double amount) {
|
||||||
|
return (this.balance() > amount);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasUnder(double amount) {
|
||||||
|
return (this.balance() < amount);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isNegative() {
|
||||||
|
return (this.balance() < 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean remove() {
|
||||||
|
return this.BOSEconomy.removeBank(bank);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -208,4 +208,4 @@ public class iCo5 implements Method {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.earth2me.essentials.signs;
|
package com.earth2me.essentials.signs;
|
||||||
|
|
||||||
import com.earth2me.essentials.IEssentials;
|
import com.earth2me.essentials.IEssentials;
|
||||||
|
import com.earth2me.essentials.User;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
@ -100,6 +101,13 @@ public class SignBlockListener extends BlockListener
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
User user = ess.getUser(event.getPlayer());
|
||||||
|
if (user.isAuthorized("essentials.signs.color"))
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 4; i++) {
|
||||||
|
event.setLine(i, event.getLine(i).replaceAll("&([0-9a-f])", "§$1"));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package com.earth2me.essentials.signs;
|
package com.earth2me.essentials.signs;
|
||||||
|
|
||||||
import com.earth2me.essentials.IEssentials;
|
import com.earth2me.essentials.IEssentials;
|
||||||
|
import com.earth2me.essentials.InventoryWorkaround;
|
||||||
|
import com.earth2me.essentials.Trade;
|
||||||
import com.earth2me.essentials.User;
|
import com.earth2me.essentials.User;
|
||||||
import net.minecraft.server.InventoryPlayer;
|
import net.minecraft.server.InventoryPlayer;
|
||||||
import org.bukkit.craftbukkit.inventory.CraftInventoryPlayer;
|
import org.bukkit.craftbukkit.inventory.CraftInventoryPlayer;
|
||||||
|
@ -17,18 +19,20 @@ public class SignFree extends EssentialsSign
|
||||||
@Override
|
@Override
|
||||||
protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
|
protected boolean onSignCreate(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
|
||||||
{
|
{
|
||||||
getItemStack(sign.getLine(1), 9 * 4 * 64, ess);
|
getItemStack(sign.getLine(1), 1, ess);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
|
protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException
|
||||||
{
|
{
|
||||||
final ItemStack item = getItemStack(sign.getLine(1), 9 * 4 * 64, ess);
|
final ItemStack item = getItemStack(sign.getLine(1), 1, ess);
|
||||||
|
item.setAmount(item.getType().getMaxStackSize()*9*4);
|
||||||
final CraftInventoryPlayer inv = new CraftInventoryPlayer(new InventoryPlayer(player.getHandle()));
|
final CraftInventoryPlayer inv = new CraftInventoryPlayer(new InventoryPlayer(player.getHandle()));
|
||||||
inv.clear();
|
inv.clear();
|
||||||
inv.addItem(item);
|
InventoryWorkaround.addItem(inv, true, item);
|
||||||
player.showInventory(inv);
|
player.showInventory(inv);
|
||||||
|
Trade.log("Sign", "Free", "Interact", username, null, username, new Trade(item, ess), ess);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,52 +114,42 @@ overridden-commands:
|
||||||
disabled-commands:
|
disabled-commands:
|
||||||
# - nick
|
# - nick
|
||||||
|
|
||||||
# Restricted commands will only be available to ops.
|
# Restricted commands have been removed.
|
||||||
|
# Now we have a whitelist, all commands not on this list are only available to ops.
|
||||||
# These will have NO EFFECT if you have Permissions installed!
|
# These will have NO EFFECT if you have Permissions installed!
|
||||||
# These are here only if you want something simpler than Permissions.
|
# These are here only if you want something simpler than Permissions.
|
||||||
restricted-commands:
|
player-commands:
|
||||||
- bigtree
|
- afk
|
||||||
- item
|
- back
|
||||||
- give
|
- back.ondeath
|
||||||
- heal
|
- balance
|
||||||
- plugin
|
- clearinventory
|
||||||
- time
|
- compass
|
||||||
- top
|
- help
|
||||||
- tp
|
- helpop
|
||||||
- tphere
|
- home
|
||||||
- tree
|
- home.others
|
||||||
- setspawn
|
- ignore
|
||||||
- antioch
|
- info
|
||||||
- kick
|
- list
|
||||||
- ban
|
- mail
|
||||||
- unban
|
- motd
|
||||||
- top
|
- msg
|
||||||
- jump
|
- nick
|
||||||
- tpo
|
- pay
|
||||||
- tppos
|
- powertool
|
||||||
- tpohere
|
- r
|
||||||
- economy
|
- rules
|
||||||
- setwarp
|
- seen
|
||||||
- delwarp
|
- sell
|
||||||
- essentials
|
- sethome
|
||||||
- gc
|
- suicide
|
||||||
- spawnmob
|
- tpa
|
||||||
- broadcast
|
- tpaccept
|
||||||
- burn
|
- tpahere
|
||||||
- ext
|
- tpdeny
|
||||||
- kill
|
- world
|
||||||
- ping
|
- worth
|
||||||
- banip
|
|
||||||
- unban
|
|
||||||
- mute
|
|
||||||
- kick
|
|
||||||
- kickall
|
|
||||||
- unbanip
|
|
||||||
- togglejail
|
|
||||||
- setjail
|
|
||||||
- eco.loan
|
|
||||||
- teleport.timer.bypass
|
|
||||||
- teleport.cooldown.bypass
|
|
||||||
|
|
||||||
# Note: All items MUST be followed by a quantity!
|
# Note: All items MUST be followed by a quantity!
|
||||||
# Times are measured in seconds.
|
# Times are measured in seconds.
|
||||||
|
|
|
@ -168,6 +168,7 @@ month = month
|
||||||
months = months
|
months = months
|
||||||
moreThanZero = Quantities must be greater than 0.
|
moreThanZero = Quantities must be greater than 0.
|
||||||
msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
|
msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
|
||||||
|
muteExempt = \u00a7cYou may not mute that player.
|
||||||
mutedPlayer = Player {0} muted.
|
mutedPlayer = Player {0} muted.
|
||||||
mutedPlayerFor = Player {0} muted for {1}.
|
mutedPlayerFor = Player {0} muted for {1}.
|
||||||
mutedUserSpeaks = {0} tried to speak, but is muted.
|
mutedUserSpeaks = {0} tried to speak, but is muted.
|
||||||
|
@ -214,11 +215,11 @@ playerInJail = \u00a7cPlayer is already in jail {0}.
|
||||||
playerJailed = \u00a77Player {0} jailed.
|
playerJailed = \u00a77Player {0} jailed.
|
||||||
playerJailedFor = \u00a77Player {0} jailed for {1}.
|
playerJailedFor = \u00a77Player {0} jailed for {1}.
|
||||||
playerKicked = \u00a7cPlayer {0} kicked: {1}
|
playerKicked = \u00a7cPlayer {0} kicked: {1}
|
||||||
playerMuted = "$7You have been muted"
|
playerMuted = "\u00a77You have been muted"
|
||||||
playerMutedFor = "$7You have been muted for {0}"
|
playerMutedFor = "\u00a77You have been muted for {0}"
|
||||||
playerNeverOnServer = \u00a7cPlayer {0} was never on this server.
|
playerNeverOnServer = \u00a7cPlayer {0} was never on this server.
|
||||||
playerNotFound = \u00a7cPlayer not found.
|
playerNotFound = \u00a7cPlayer not found.
|
||||||
playerUnmuted = "$7You have been unmuted"
|
playerUnmuted = "\u00a77You have been unmuted"
|
||||||
pong = Pong!
|
pong = Pong!
|
||||||
possibleWorlds = \u00a77Possible worlds are the numbers 0 through {0}.
|
possibleWorlds = \u00a77Possible worlds are the numbers 0 through {0}.
|
||||||
powerToolAir = Command can''t be attached to air.
|
powerToolAir = Command can''t be attached to air.
|
||||||
|
|
|
@ -170,6 +170,7 @@ month = m\u00e5ned
|
||||||
months = m\u00e5neder
|
months = m\u00e5neder
|
||||||
moreThanZero = M\u00e6ngder skal v\u00e6re st\u00f8rre end 0.
|
moreThanZero = M\u00e6ngder skal v\u00e6re st\u00f8rre end 0.
|
||||||
msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
|
msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
|
||||||
|
muteExempt = \u00a7cYou may not mute that player.
|
||||||
mutedPlayer = Spiller {0} d\u00e6mpet.
|
mutedPlayer = Spiller {0} d\u00e6mpet.
|
||||||
mutedPlayerFor = Spiller {0} d\u00e6mpet for {1}.
|
mutedPlayerFor = Spiller {0} d\u00e6mpet for {1}.
|
||||||
mutedUserSpeaks = {0} pr\u00f8vede at snakke, men er muted.
|
mutedUserSpeaks = {0} pr\u00f8vede at snakke, men er muted.
|
||||||
|
@ -216,11 +217,11 @@ playerInJail = \u00a7cSpiller er allerede i f\u00e6ngsel {0}.
|
||||||
playerJailed = \u00a77Spiller {0} f\u00e6ngslet.
|
playerJailed = \u00a77Spiller {0} f\u00e6ngslet.
|
||||||
playerJailedFor = \u00a77Spiller {0} f\u00e6ngslet for {1}.
|
playerJailedFor = \u00a77Spiller {0} f\u00e6ngslet for {1}.
|
||||||
playerKicked = \u00a7cPlayer {0} kicked: {1}
|
playerKicked = \u00a7cPlayer {0} kicked: {1}
|
||||||
playerMuted = "$7You have been muted"
|
playerMuted = "\u00a77You have been muted"
|
||||||
playerMutedFor = "$7You have been muted for {0}"
|
playerMutedFor = "\u00a77You have been muted for {0}"
|
||||||
playerNeverOnServer = \u00a7cSpiller {0} var aldrig p\u00e5 denne server.
|
playerNeverOnServer = \u00a7cSpiller {0} var aldrig p\u00e5 denne server.
|
||||||
playerNotFound = \u00a7cSpiller ikke fundet.
|
playerNotFound = \u00a7cSpiller ikke fundet.
|
||||||
playerUnmuted = "$7You have been unmuted"
|
playerUnmuted = "\u00a77You have been unmuted"
|
||||||
pong = Pong!
|
pong = Pong!
|
||||||
possibleWorlds = \u00a77Mulige verdener er numrene 0 igennem {0}.
|
possibleWorlds = \u00a77Mulige verdener er numrene 0 igennem {0}.
|
||||||
powerToolAir = Kommando kan ikke blive tildelt luft.
|
powerToolAir = Kommando kan ikke blive tildelt luft.
|
||||||
|
|
|
@ -14,7 +14,7 @@ backupStarted = Backup gestartet
|
||||||
balance = \u00a77Geldb\u00f6rse: {0}
|
balance = \u00a77Geldb\u00f6rse: {0}
|
||||||
balanceTop = \u00a77 Top {0} Guthaben
|
balanceTop = \u00a77 Top {0} Guthaben
|
||||||
banIpAddress = \u00a77IP-Adresse gesperrt.
|
banIpAddress = \u00a77IP-Adresse gesperrt.
|
||||||
banExempt = \u00a7cDu kan ikke forbyde den p\u00e5g\u00e6ldende spiller.
|
banExempt = \u00a7cDu kannst diesen Spieler nicht sperren.
|
||||||
bannedIpsFileError = Fehler beim Lesen von banned-ips.txt
|
bannedIpsFileError = Fehler beim Lesen von banned-ips.txt
|
||||||
bannedIpsFileNotFound = banned-ips.txt nicht gefunden
|
bannedIpsFileNotFound = banned-ips.txt nicht gefunden
|
||||||
bannedPlayersFileError = Fehler beim Lesen von banned-players.txt
|
bannedPlayersFileError = Fehler beim Lesen von banned-players.txt
|
||||||
|
@ -132,7 +132,7 @@ jailNotExist = Dieses Gef\u00e4ngnis existiert nicht.
|
||||||
jailSet = \u00a77Gef\u00e4ngnis {0} wurde erstellt.
|
jailSet = \u00a77Gef\u00e4ngnis {0} wurde erstellt.
|
||||||
jumpError = Das w\u00fcrde deinen Computer \u00fcberlasten.
|
jumpError = Das w\u00fcrde deinen Computer \u00fcberlasten.
|
||||||
kickDefault = Vom Server geworfen
|
kickDefault = Vom Server geworfen
|
||||||
kickExempt = \u00a7cSie k\u00f6nnen nicht kicken, dass Spieler.
|
kickExempt = \u00a7cDu kannst diesen Spieler nicht rauswerfen.
|
||||||
kill = \u00a77{0} get\u00f6tet.
|
kill = \u00a77{0} get\u00f6tet.
|
||||||
kitError = \u00a7cEs gibt keine g\u00fcltigen Ausr\u00fcstungen.
|
kitError = \u00a7cEs gibt keine g\u00fcltigen Ausr\u00fcstungen.
|
||||||
kitError2 = \u00a7cDiese Ausr\u00fcstung existiert nicht oder ist ung\u00fcltig.
|
kitError2 = \u00a7cDiese Ausr\u00fcstung existiert nicht oder ist ung\u00fcltig.
|
||||||
|
@ -168,6 +168,7 @@ month = Monat
|
||||||
months = Monate
|
months = Monate
|
||||||
moreThanZero = Anzahl muss gr\u00f6sser als 0 sein.
|
moreThanZero = Anzahl muss gr\u00f6sser als 0 sein.
|
||||||
msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
|
msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
|
||||||
|
muteExempt = \u00a7cYou may not mute that player.
|
||||||
mutedPlayer = Player {0} ist nun stumm.
|
mutedPlayer = Player {0} ist nun stumm.
|
||||||
mutedPlayerFor = Player {0} ist nun stumm f\u00fcr {1}.
|
mutedPlayerFor = Player {0} ist nun stumm f\u00fcr {1}.
|
||||||
mutedUserSpeaks = {0} versuchte zu sprechen, aber ist stumm geschalt.
|
mutedUserSpeaks = {0} versuchte zu sprechen, aber ist stumm geschalt.
|
||||||
|
@ -214,11 +215,11 @@ playerInJail = \u00a7cSpieler ist bereits in Gef\u00e4ngnis {0}.
|
||||||
playerJailed = \u00a77Spieler {0} eingesperrt.
|
playerJailed = \u00a77Spieler {0} eingesperrt.
|
||||||
playerJailedFor = \u00a77Spieler {0} eingesperrt f\u00fcr {1}.
|
playerJailedFor = \u00a77Spieler {0} eingesperrt f\u00fcr {1}.
|
||||||
playerKicked = \u00a7cSpieler {0} rausgeworfen: {1}
|
playerKicked = \u00a7cSpieler {0} rausgeworfen: {1}
|
||||||
playerMuted = "$7You have been muted"
|
playerMuted = "\u00a77You have been muted"
|
||||||
playerMutedFor = "$7You have been muted for {0}"
|
playerMutedFor = "\u00a77You have been muted for {0}"
|
||||||
playerNeverOnServer = \u00a7cSpieler {0} war niemals auf diesem Server.
|
playerNeverOnServer = \u00a7cSpieler {0} war niemals auf diesem Server.
|
||||||
playerNotFound = \u00a7cSpieler nicht gefunden.
|
playerNotFound = \u00a7cSpieler nicht gefunden.
|
||||||
playerUnmuted = "$7You have been unmuted"
|
playerUnmuted = "\u00a77You have been unmuted"
|
||||||
pong = Pong!
|
pong = Pong!
|
||||||
possibleWorlds = \u00a77M\u00f6gliche Welten sind nummeriet von 0 bis {0}.
|
possibleWorlds = \u00a77M\u00f6gliche Welten sind nummeriet von 0 bis {0}.
|
||||||
powerToolAir = Befehl kann nicht mit Luft verbunden werden.
|
powerToolAir = Befehl kann nicht mit Luft verbunden werden.
|
||||||
|
@ -260,7 +261,7 @@ teleportationEnabled = \u00a77Teleportierung aktiviert.
|
||||||
teleporting = \u00a77Teleportiere...
|
teleporting = \u00a77Teleportiere...
|
||||||
teleportingPortal = \u00a77Teleportiere durch Portal.
|
teleportingPortal = \u00a77Teleportiere durch Portal.
|
||||||
tempBanned = Zeitlich gesperrt vom Server f\u00fcr {0}
|
tempBanned = Zeitlich gesperrt vom Server f\u00fcr {0}
|
||||||
tempbanExempt = \u00a77You may not tempban that player
|
tempbanExempt = \u00a77Du kannst diesen Spieler nicht zeitlich sperren.
|
||||||
thunder = Du hast Donner in deiner Welt {0}.
|
thunder = Du hast Donner in deiner Welt {0}.
|
||||||
thunderDuration = Du hast Donner in deiner Welt {0} f\u00fcr {1} Sekunden.
|
thunderDuration = Du hast Donner in deiner Welt {0} f\u00fcr {1} Sekunden.
|
||||||
timeBeforeHeal = Zeit bis zur n\u00e4chsten Heilung: {0}
|
timeBeforeHeal = Zeit bis zur n\u00e4chsten Heilung: {0}
|
||||||
|
|
|
@ -168,6 +168,7 @@ month = month
|
||||||
months = months
|
months = months
|
||||||
moreThanZero = Quantities must be greater than 0.
|
moreThanZero = Quantities must be greater than 0.
|
||||||
msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
|
msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
|
||||||
|
muteExempt = \u00a7cYou may not mute that player.
|
||||||
mutedPlayer = Player {0} muted.
|
mutedPlayer = Player {0} muted.
|
||||||
mutedPlayerFor = Player {0} muted for {1}.
|
mutedPlayerFor = Player {0} muted for {1}.
|
||||||
mutedUserSpeaks = {0} tried to speak, but is muted.
|
mutedUserSpeaks = {0} tried to speak, but is muted.
|
||||||
|
@ -214,11 +215,11 @@ playerInJail = \u00a7cPlayer is already in jail {0}.
|
||||||
playerJailed = \u00a77Player {0} jailed.
|
playerJailed = \u00a77Player {0} jailed.
|
||||||
playerJailedFor = \u00a77Player {0} jailed for {1}.
|
playerJailedFor = \u00a77Player {0} jailed for {1}.
|
||||||
playerKicked = \u00a7cPlayer {0} kicked: {1}
|
playerKicked = \u00a7cPlayer {0} kicked: {1}
|
||||||
playerMuted = "$7You have been muted"
|
playerMuted = "\u00a77You have been muted"
|
||||||
playerMutedFor = "$7You have been muted for {0}"
|
playerMutedFor = "\u00a77You have been muted for {0}"
|
||||||
playerNeverOnServer = \u00a7cPlayer {0} was never on this server.
|
playerNeverOnServer = \u00a7cPlayer {0} was never on this server.
|
||||||
playerNotFound = \u00a7cPlayer not found.
|
playerNotFound = \u00a7cPlayer not found.
|
||||||
playerUnmuted = "$7You have been unmuted"
|
playerUnmuted = "\u00a77You have been unmuted"
|
||||||
pong = Pong!
|
pong = Pong!
|
||||||
possibleWorlds = \u00a77Possible worlds are the numbers 0 through {0}.
|
possibleWorlds = \u00a77Possible worlds are the numbers 0 through {0}.
|
||||||
powerToolAir = Command can''t be attached to air.
|
powerToolAir = Command can''t be attached to air.
|
||||||
|
|
|
@ -168,6 +168,7 @@ month = mois
|
||||||
months = mois
|
months = mois
|
||||||
moreThanZero = Les Quantit\u00e9s doivent \u00eatre sup\u00e9rieures \u00e0 z\u00e9ro.
|
moreThanZero = Les Quantit\u00e9s doivent \u00eatre sup\u00e9rieures \u00e0 z\u00e9ro.
|
||||||
msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
|
msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
|
||||||
|
muteExempt = \u00a7cYou may not mute that player.
|
||||||
mutedPlayer = Le joueur {0} est d\u00e9sormais muet.
|
mutedPlayer = Le joueur {0} est d\u00e9sormais muet.
|
||||||
mutedPlayerFor = {0} a \u00e9t\u00e9 mute pour {1}.
|
mutedPlayerFor = {0} a \u00e9t\u00e9 mute pour {1}.
|
||||||
mutedUserSpeaks = {0} a essay\u00e9 de parler mais est muet.
|
mutedUserSpeaks = {0} a essay\u00e9 de parler mais est muet.
|
||||||
|
@ -214,11 +215,11 @@ playerInJail = \u00a7cLe joueur est d\u00e9j\u00e0 dans la prison {0}.
|
||||||
playerJailed = \u00a77Le joueur {0} a \u00e9t\u00e9 emprisonn\u00e9.
|
playerJailed = \u00a77Le joueur {0} a \u00e9t\u00e9 emprisonn\u00e9.
|
||||||
playerJailedFor = \u00a77{0} a \u00e9t\u00e9 emprisonn\u00e9 pour {1}.
|
playerJailedFor = \u00a77{0} a \u00e9t\u00e9 emprisonn\u00e9 pour {1}.
|
||||||
playerKicked = \u00a7cPlayer {0} kicked: {1}
|
playerKicked = \u00a7cPlayer {0} kicked: {1}
|
||||||
playerMuted = "$7You have been muted"
|
playerMuted = "\u00a77You have been muted"
|
||||||
playerMutedFor = "$7You have been muted for {0}"
|
playerMutedFor = "\u00a77You have been muted for {0}"
|
||||||
playerNeverOnServer = \u00a7cLe joueur {0} n''a jamais \u00e9t\u00e9 sur le serveur.
|
playerNeverOnServer = \u00a7cLe joueur {0} n''a jamais \u00e9t\u00e9 sur le serveur.
|
||||||
playerNotFound = \u00a7cLe joueur est introuvable.
|
playerNotFound = \u00a7cLe joueur est introuvable.
|
||||||
playerUnmuted = "$7You have been unmuted"
|
playerUnmuted = "\u00a77You have been unmuted"
|
||||||
pong = Pong!
|
pong = Pong!
|
||||||
possibleWorlds = \u00a77Les mondes possibles sont les nombres 0 par {0}.
|
possibleWorlds = \u00a77Les mondes possibles sont les nombres 0 par {0}.
|
||||||
powerToolAir = La commande ne peut pas \u00eatre attach\u00e9e \u00e0 l''air.
|
powerToolAir = La commande ne peut pas \u00eatre attach\u00e9e \u00e0 l''air.
|
||||||
|
|
|
@ -169,6 +169,7 @@ month = maand
|
||||||
months = maanden
|
months = maanden
|
||||||
moreThanZero = Aantal moet groter zijn dan 0.
|
moreThanZero = Aantal moet groter zijn dan 0.
|
||||||
msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
|
msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
|
||||||
|
muteExempt = \u00a7cYou may not mute that player.
|
||||||
mutedPlayer = Speler {0} gemute.
|
mutedPlayer = Speler {0} gemute.
|
||||||
mutedPlayerFor = Speler {0} is gemute voor {1}.
|
mutedPlayerFor = Speler {0} is gemute voor {1}.
|
||||||
mutedUserSpeaks = {0} probeerde te praten, maar is gemute.
|
mutedUserSpeaks = {0} probeerde te praten, maar is gemute.
|
||||||
|
@ -215,11 +216,11 @@ playerInJail = \u00a7cSpeler zit al in de gevangenis {0}.
|
||||||
playerJailed = \u00a77Speler {0} is in de gevangenis gezet.
|
playerJailed = \u00a77Speler {0} is in de gevangenis gezet.
|
||||||
playerJailedFor = \u00a77Speler {0} is in de gevangenis gezet voor {1}.
|
playerJailedFor = \u00a77Speler {0} is in de gevangenis gezet voor {1}.
|
||||||
playerKicked = \u00a7cPlayer {0} kicked: {1}
|
playerKicked = \u00a7cPlayer {0} kicked: {1}
|
||||||
playerMuted = "$7You have been muted"
|
playerMuted = "\u00a77You have been muted"
|
||||||
playerMutedFor = "$7You have been muted for {0}"
|
playerMutedFor = "\u00a77You have been muted for {0}"
|
||||||
playerNeverOnServer = \u00a7cSpeler {0} is nooit op deze server geweest.
|
playerNeverOnServer = \u00a7cSpeler {0} is nooit op deze server geweest.
|
||||||
playerNotFound = \u00a7cSpeler niet gevonden.
|
playerNotFound = \u00a7cSpeler niet gevonden.
|
||||||
playerUnmuted = "$7You have been unmuted"
|
playerUnmuted = "\u00a77You have been unmuted"
|
||||||
pong = Pong!
|
pong = Pong!
|
||||||
possibleWorlds = \u00a77Mogelijk zijn de werelden de nummer 0 tot en met {0}.
|
possibleWorlds = \u00a77Mogelijk zijn de werelden de nummer 0 tot en met {0}.
|
||||||
powerToolAir = Command kan niet worden bevestigd aan de lucht.
|
powerToolAir = Command kan niet worden bevestigd aan de lucht.
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.earth2me.essentials.api.NoLoanPermittedException;
|
||||||
import com.earth2me.essentials.api.UserDoesNotExistException;
|
import com.earth2me.essentials.api.UserDoesNotExistException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
import org.bukkit.World.Environment;
|
||||||
import org.bukkit.plugin.InvalidDescriptionException;
|
import org.bukkit.plugin.InvalidDescriptionException;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@ -20,6 +21,7 @@ public class EconomyTest extends TestCase
|
||||||
super(testName);
|
super(testName);
|
||||||
ess = new Essentials();
|
ess = new Essentials();
|
||||||
final FakeServer server = new FakeServer();
|
final FakeServer server = new FakeServer();
|
||||||
|
server.createWorld("testWorld", Environment.NORMAL);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ess.setupForTesting(server);
|
ess.setupForTesting(server);
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class EssentialsPermissionsCommands extends JavaPlugin
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(final CommandSender sender, final Command command, final String label, final String[] args)
|
public boolean onCommand(final CommandSender sender, final Command command, final String label, final String[] args)
|
||||||
{
|
{
|
||||||
return ess.onCommandEssentials(sender, command, label, args, Thread.currentThread().getContextClassLoader(), "com.earth2me.essentials.permissions.Command", "groupmanager.");
|
return ess.onCommandEssentials(sender, command, label, args, EssentialsPermissionsCommands.class.getClassLoader(), "com.earth2me.essentials.permissions.Command", "groupmanager.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -97,6 +97,10 @@ public class EssentialsProtectBlockListener extends BlockListener
|
||||||
@Override
|
@Override
|
||||||
public void onBlockIgnite(BlockIgniteEvent event)
|
public void onBlockIgnite(BlockIgniteEvent event)
|
||||||
{
|
{
|
||||||
|
if (event.isCancelled())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
Block block = event.getBlock();
|
Block block = event.getBlock();
|
||||||
if (block.getType() == Material.RAILS
|
if (block.getType() == Material.RAILS
|
||||||
&& prot.getSettingBool(ProtectConfig.protect_rails))
|
&& prot.getSettingBool(ProtectConfig.protect_rails))
|
||||||
|
@ -185,6 +189,10 @@ public class EssentialsProtectBlockListener extends BlockListener
|
||||||
@Override
|
@Override
|
||||||
public void onBlockBurn(final BlockBurnEvent event)
|
public void onBlockBurn(final BlockBurnEvent event)
|
||||||
{
|
{
|
||||||
|
if (event.isCancelled())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
final Block block = event.getBlock();
|
final Block block = event.getBlock();
|
||||||
if (block.getType() == Material.RAILS && prot.getSettingBool(ProtectConfig.protect_rails))
|
if (block.getType() == Material.RAILS && prot.getSettingBool(ProtectConfig.protect_rails))
|
||||||
{
|
{
|
||||||
|
|
|
@ -292,6 +292,10 @@ public class EssentialsProtectEntityListener extends EntityListener
|
||||||
@Override
|
@Override
|
||||||
public void onEntityTarget(final EntityTargetEvent event)
|
public void onEntityTarget(final EntityTargetEvent event)
|
||||||
{
|
{
|
||||||
|
if (event.isCancelled())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!(event.getTarget() instanceof Player))
|
if (!(event.getTarget() instanceof Player))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -24,6 +24,10 @@ public class EssentialsProtectPlayerListener extends PlayerListener
|
||||||
@Override
|
@Override
|
||||||
public void onPlayerInteract(final PlayerInteractEvent event)
|
public void onPlayerInteract(final PlayerInteractEvent event)
|
||||||
{
|
{
|
||||||
|
if (event.isCancelled())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
final User user = ess.getUser(event.getPlayer());
|
final User user = ess.getUser(event.getPlayer());
|
||||||
|
|
||||||
if (prot.getSettingBool(ProtectConfig.disable_build) && !user.canBuild())
|
if (prot.getSettingBool(ProtectConfig.disable_build) && !user.canBuild())
|
||||||
|
|
|
@ -41,6 +41,6 @@ public class EssentialsSpawn extends JavaPlugin
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args)
|
public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args)
|
||||||
{
|
{
|
||||||
return ess.onCommandEssentials(sender, command, commandLabel, args, Thread.currentThread().getContextClassLoader(), "com.earth2me.essentials.spawn.Command", "essentials.");
|
return ess.onCommandEssentials(sender, command, commandLabel, args, EssentialsSpawn.class.getClassLoader(), "com.earth2me.essentials.spawn.Command", "essentials.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
BIN
lib/BOSEconomy7.jar
Normal file
BIN
lib/BOSEconomy7.jar
Normal file
Binary file not shown.
Loading…
Reference in a new issue