mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-12 17:45:08 +02:00
Random Cleanup
This commit is contained in:
@@ -16,6 +16,7 @@ import org.bukkit.enchantments.Enchantment;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.util.config.Configuration;
|
import org.bukkit.util.config.Configuration;
|
||||||
|
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public class EssentialsConf extends Configuration
|
public class EssentialsConf extends Configuration
|
||||||
{
|
{
|
||||||
|
@@ -80,7 +80,6 @@ public class EssentialsLocalChatEvent extends Event implements Cancellable
|
|||||||
ex.fillInStackTrace();
|
ex.fillInStackTrace();
|
||||||
throw ex;
|
throw ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.format = format;
|
this.format = format;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -28,7 +28,6 @@ public class EssentialsLocalChatEventListener implements Listener
|
|||||||
@EventHandler(priority = EventPriority.HIGHEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void onLocalChat(final EssentialsLocalChatEvent event)
|
public void onLocalChat(final EssentialsLocalChatEvent event)
|
||||||
{
|
{
|
||||||
|
|
||||||
final Player sender = event.getPlayer();
|
final Player sender = event.getPlayer();
|
||||||
final Location loc = sender.getLocation();
|
final Location loc = sender.getLocation();
|
||||||
final World world = loc.getWorld();
|
final World world = loc.getWorld();
|
||||||
|
@@ -28,7 +28,6 @@ public class EssentialsChatPlayerListenerHighest extends EssentialsChatPlayer
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
chargeChat(event, chatStore);
|
chargeChat(event, chatStore);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -28,11 +28,9 @@ public class EssentialsChatPlayerListenerLowest extends EssentialsChatPlayer
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final IUser user = ess.getUser(event.getPlayer());
|
final IUser user = ess.getUser(event.getPlayer());
|
||||||
final ChatStore chatStore = new ChatStore(ess, user, getChatType(event.getMessage()));
|
final ChatStore chatStore = new ChatStore(ess, user, getChatType(event.getMessage()));
|
||||||
setChatStore(event, chatStore);
|
setChatStore(event, chatStore);
|
||||||
|
|
||||||
formatChat(event, chatStore);
|
formatChat(event, chatStore);
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -98,12 +98,15 @@ public class SpawnStorage extends AsyncStorageObjectHolder<Spawns> implements IE
|
|||||||
{
|
{
|
||||||
for (EventPriority priority : EventPriority.values())
|
for (EventPriority priority : EventPriority.values())
|
||||||
{
|
{
|
||||||
if (priority.toString().equalsIgnoreCase(getData().getRespawnPriority())) {
|
if (priority.toString().equalsIgnoreCase(getData().getRespawnPriority()))
|
||||||
|
{
|
||||||
return priority;
|
return priority;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return EventPriority.NORMAL;
|
return EventPriority.NORMAL;
|
||||||
} finally {
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
unlock();
|
unlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -113,12 +116,15 @@ public class SpawnStorage extends AsyncStorageObjectHolder<Spawns> implements IE
|
|||||||
acquireReadLock();
|
acquireReadLock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (getData().getNewbieSpawn() == null || getData().getNewbieSpawn().isEmpty() ||
|
if (getData().getNewbieSpawn() == null || getData().getNewbieSpawn().isEmpty()
|
||||||
getData().getNewbieSpawn().equalsIgnoreCase("none")) {
|
|| getData().getNewbieSpawn().equalsIgnoreCase("none"))
|
||||||
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return getSpawn(getData().getNewbieSpawn());
|
return getSpawn(getData().getNewbieSpawn());
|
||||||
} finally {
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
unlock();
|
unlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -129,7 +135,9 @@ public class SpawnStorage extends AsyncStorageObjectHolder<Spawns> implements IE
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
return getData().getNewPlayerAnnouncement() != null && !getData().getNewPlayerAnnouncement().isEmpty();
|
return getData().getNewPlayerAnnouncement() != null && !getData().getNewPlayerAnnouncement().isEmpty();
|
||||||
} finally {
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
unlock();
|
unlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -140,7 +148,9 @@ public class SpawnStorage extends AsyncStorageObjectHolder<Spawns> implements IE
|
|||||||
try
|
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());
|
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();
|
unlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user