1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-15 02:59:06 +02:00
This commit is contained in:
snowleo
2012-10-06 17:02:58 +02:00
parent bb798a1051
commit ae10bcdffe
14 changed files with 90 additions and 97 deletions

View File

@@ -72,7 +72,8 @@ public class I18n implements II18n
public static String _(final String string, final Object... objects)
{
if (instance == null) {
if (instance == null)
{
return "";
}
if (objects.length == 0)

View File

@@ -29,5 +29,4 @@ public class EssentialsConnect
{
return ess;
}
}

View File

@@ -48,7 +48,6 @@ public class EssentialsProtect extends JavaPlugin implements IProtect
LOGGER.log(Level.SEVERE, "Essentials not installed or failed to load. Essenials Protect is in emergency mode now.");
}
@Override
public EssentialsConnect getEssentialsConnect()
{

View File

@@ -1,6 +1,5 @@
package net.ess3.signs;
import java.util.HashSet;
import java.util.Locale;
import java.util.Set;

View File

@@ -69,14 +69,14 @@ public class SignBlockListener implements Listener
return true;
}
for (EssentialsSign sign : plugin.getSettings().getEnabledSigns())
{
if (sign.getBlocks().contains(block.getType())
&& !sign.onBlockBreak(block, player, ess))
{
if (sign.getBlocks().contains(block.getType())
&& !sign.onBlockBreak(block, player, ess))
{
LOGGER.log(Level.INFO, "A block was protected by a sign.");
return true;
}
LOGGER.log(Level.INFO, "A block was protected by a sign.");
return true;
}
}
return false;
}

View File

@@ -1,6 +1,5 @@
package net.ess3.signs;
import java.io.IOException;
import net.ess3.api.ChargeException;
import net.ess3.api.IEssentials;
@@ -53,6 +52,3 @@ public class SignInfo extends EssentialsSign
return true;
}
}

View File

@@ -23,7 +23,7 @@ public class SignRepair extends EssentialsSign
{
sign.setLine(1, "Hand");
}
else if (!repairTarget.equalsIgnoreCase("all") && !repairTarget.equalsIgnoreCase("hand") )
else if (!repairTarget.equalsIgnoreCase("all") && !repairTarget.equalsIgnoreCase("hand"))
{
throw new SignException(_("invalidSignLine", 2));
}

View File

@@ -11,7 +11,6 @@ import org.bukkit.inventory.ItemStack;
//TODO: Sell Enchantment on Trade signs?
public class SignTrade extends EssentialsSign
{
public SignTrade()
{
super("Trade");

View File

@@ -19,19 +19,19 @@ class EssentialsXMPPPlayerListener implements Listener
this.ess = ess;
}
@EventHandler(priority= EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerJoin(final PlayerJoinEvent event)
{
sendMessageToSpyUsers("Player " + event.getPlayer().getDisplayName() + " joined the game");
}
@EventHandler(priority= EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerChat(final PlayerChatEvent event)
{
sendMessageToSpyUsers(String.format(event.getFormat(), event.getPlayer().getDisplayName(), event.getMessage()));
}
@EventHandler(priority= EventPriority.MONITOR)
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerQuit(final PlayerQuitEvent event)
{
sendMessageToSpyUsers("Player " + event.getPlayer().getDisplayName() + " left the game");