1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-12 09:35:26 +02:00

Random Cleanup

This commit is contained in:
KHobbits
2012-01-28 14:05:50 +00:00
parent f4413633b8
commit e960078e1a
7 changed files with 19 additions and 13 deletions

View File

@@ -16,6 +16,7 @@ import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.config.Configuration;
@Deprecated
public class EssentialsConf extends Configuration
{

View File

@@ -80,7 +80,6 @@ public class EssentialsLocalChatEvent extends Event implements Cancellable
ex.fillInStackTrace();
throw ex;
}
this.format = format;
}

View File

@@ -28,7 +28,6 @@ public class EssentialsLocalChatEventListener implements Listener
@EventHandler(priority = EventPriority.HIGHEST)
public void onLocalChat(final EssentialsLocalChatEvent event)
{
final Player sender = event.getPlayer();
final Location loc = sender.getLocation();
final World world = loc.getWorld();

View File

@@ -28,7 +28,6 @@ public class EssentialsChatPlayerListenerHighest extends EssentialsChatPlayer
{
return;
}
chargeChat(event, chatStore);
}
}

View File

@@ -28,11 +28,9 @@ public class EssentialsChatPlayerListenerLowest extends EssentialsChatPlayer
{
return;
}
final IUser user = ess.getUser(event.getPlayer());
final ChatStore chatStore = new ChatStore(ess, user, getChatType(event.getMessage()));
setChatStore(event, chatStore);
formatChat(event, chatStore);
}
}

View File

@@ -104,7 +104,7 @@ public class EssentialsSpawnPlayerListener implements Listener
{
return;
}
try
{
final Location spawn = spawns.getNewbieSpawn();

View File

@@ -98,12 +98,15 @@ public class SpawnStorage extends AsyncStorageObjectHolder<Spawns> implements IE
{
for (EventPriority priority : EventPriority.values())
{
if (priority.toString().equalsIgnoreCase(getData().getRespawnPriority())) {
if (priority.toString().equalsIgnoreCase(getData().getRespawnPriority()))
{
return priority;
}
}
return EventPriority.NORMAL;
} finally {
}
finally
{
unlock();
}
}
@@ -113,12 +116,15 @@ public class SpawnStorage extends AsyncStorageObjectHolder<Spawns> implements IE
acquireReadLock();
try
{
if (getData().getNewbieSpawn() == null || getData().getNewbieSpawn().isEmpty() ||
getData().getNewbieSpawn().equalsIgnoreCase("none")) {
if (getData().getNewbieSpawn() == null || getData().getNewbieSpawn().isEmpty()
|| getData().getNewbieSpawn().equalsIgnoreCase("none"))
{
return null;
}
return getSpawn(getData().getNewbieSpawn());
} finally {
}
finally
{
unlock();
}
}
@@ -129,7 +135,9 @@ public class SpawnStorage extends AsyncStorageObjectHolder<Spawns> implements IE
try
{
return getData().getNewPlayerAnnouncement() != null && !getData().getNewPlayerAnnouncement().isEmpty();
} finally {
}
finally
{
unlock();
}
}
@@ -140,7 +148,9 @@ public class SpawnStorage extends AsyncStorageObjectHolder<Spawns> implements IE
try
{
return getData().getNewPlayerAnnouncement().replace('&', '§').replace("§§", "&").replace("{PLAYER}", user.getDisplayName()).replace("{DISPLAYNAME}", user.getDisplayName()).replace("{GROUP}", user.getGroup()).replace("{USERNAME}", user.getName()).replace("{ADDRESS}", user.getAddress().toString());
} finally {
}
finally
{
unlock();
}
}