Better sign notifications and logging.
This commit is contained in:
parent
082346cc32
commit
4662f7a3f3
|
|
@ -112,8 +112,11 @@ public class BlockEventHandler implements Listener
|
|||
for(int i = 0; i < event.getLines().length; i++)
|
||||
{
|
||||
String withoutSpaces = event.getLine(i).replace(" ", "");
|
||||
if(!withoutSpaces.isEmpty()) notEmpty = true;
|
||||
lines.append("\n " + event.getLine(i));
|
||||
if(!withoutSpaces.isEmpty())
|
||||
{
|
||||
notEmpty = true;
|
||||
lines.append("\n " + event.getLine(i));
|
||||
}
|
||||
}
|
||||
|
||||
String signMessage = lines.toString();
|
||||
|
|
@ -122,7 +125,7 @@ public class BlockEventHandler implements Listener
|
|||
PlayerData playerData = this.dataStore.getPlayerData(player.getUniqueId());
|
||||
if(notEmpty && playerData.lastMessage != null && !playerData.lastMessage.equals(signMessage))
|
||||
{
|
||||
GriefPrevention.AddLogEntry("[Sign Placement] <" + player.getName() + "> " + " @ " + GriefPrevention.getfriendlyLocationString(event.getBlock().getLocation()) + lines.toString());
|
||||
GriefPrevention.AddLogEntry("[Sign Placement] <" + player.getName() + "> " + " @ " + GriefPrevention.getfriendlyLocationString(event.getBlock().getLocation()) + lines.toString().replace("\r\n", ";"));
|
||||
playerData.lastMessage = signMessage;
|
||||
|
||||
if(!player.hasPermission("griefprevention.eavesdrop"))
|
||||
|
|
|
|||
|
|
@ -242,6 +242,7 @@ public class GriefPrevention extends JavaPlugin
|
|||
{
|
||||
GriefPrevention.AddLogEntry("Unable to initialize the file system data store. Details:");
|
||||
GriefPrevention.AddLogEntry(e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -258,7 +259,7 @@ public class GriefPrevention extends JavaPlugin
|
|||
|
||||
//start the recurring cleanup event for entities in creative worlds
|
||||
EntityCleanupTask task = new EntityCleanupTask(0);
|
||||
this.getServer().getScheduler().scheduleSyncDelayedTask(GriefPrevention.instance, task, 20L);
|
||||
this.getServer().getScheduler().scheduleSyncDelayedTask(GriefPrevention.instance, task, 20L * 60 * 2);
|
||||
|
||||
//start recurring cleanup scan for unused claims belonging to inactive players
|
||||
CleanupUnusedClaimsTask task2 = new CleanupUnusedClaimsTask();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user