remove bloat
This commit is contained in:
parent
3ae6542648
commit
7d1fe8bf2f
|
|
@ -396,7 +396,6 @@ public class BlockEventHandler implements Listener
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GriefPrevention.sendMessage(player, TextMode.Instr, Messages.SurvivalBasicsVideo2, DataStore.SURVIVAL_VIDEO_URL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//check to see if this chest is in a claim, and warn when it isn't
|
//check to see if this chest is in a claim, and warn when it isn't
|
||||||
|
|
@ -437,11 +436,6 @@ public class BlockEventHandler implements Listener
|
||||||
if (now == null) now = System.currentTimeMillis();
|
if (now == null) now = System.currentTimeMillis();
|
||||||
playerData.buildWarningTimestamp = now;
|
playerData.buildWarningTimestamp = now;
|
||||||
|
|
||||||
if (playerData.getClaims().size() < 2)
|
|
||||||
{
|
|
||||||
GriefPrevention.sendMessage(player, TextMode.Instr, Messages.SurvivalBasicsVideo2, DataStore.SURVIVAL_VIDEO_URL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (playerData.lastClaim != null)
|
if (playerData.lastClaim != null)
|
||||||
{
|
{
|
||||||
Visualization visualization = Visualization.FromClaim(playerData.lastClaim, block.getY(), VisualizationType.Claim, player.getLocation());
|
Visualization visualization = Visualization.FromClaim(playerData.lastClaim, block.getY(), VisualizationType.Claim, player.getLocation());
|
||||||
|
|
|
||||||
|
|
@ -105,11 +105,6 @@ public abstract class DataStore
|
||||||
//current version of the schema of data in secondary storage
|
//current version of the schema of data in secondary storage
|
||||||
private int currentSchemaVersion = -1; //-1 means not determined yet
|
private int currentSchemaVersion = -1; //-1 means not determined yet
|
||||||
|
|
||||||
//video links
|
|
||||||
static final String SURVIVAL_VIDEO_URL = "" + ChatColor.DARK_AQUA + ChatColor.UNDERLINE + "bit.ly/mcgpuser" + ChatColor.RESET;
|
|
||||||
static final String CREATIVE_VIDEO_URL = "" + ChatColor.DARK_AQUA + ChatColor.UNDERLINE + "bit.ly/mcgpcrea" + ChatColor.RESET;
|
|
||||||
static final String SUBDIVISION_VIDEO_URL = "" + ChatColor.DARK_AQUA + ChatColor.UNDERLINE + "bit.ly/mcgpsub" + ChatColor.RESET;
|
|
||||||
|
|
||||||
//list of UUIDs which are soft-muted
|
//list of UUIDs which are soft-muted
|
||||||
ConcurrentHashMap<UUID, Boolean> softMuteMap = new ConcurrentHashMap<>();
|
ConcurrentHashMap<UUID, Boolean> softMuteMap = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
|
|
@ -1285,13 +1280,6 @@ public abstract class DataStore
|
||||||
GriefPrevention.AddLogEntry(player.getName() + " resized " + playerData.claimResizing.getOwnerName() + "'s claim at " + GriefPrevention.getfriendlyLocationString(playerData.claimResizing.lesserBoundaryCorner) + ".");
|
GriefPrevention.AddLogEntry(player.getName() + " resized " + playerData.claimResizing.getOwnerName() + "'s claim at " + GriefPrevention.getfriendlyLocationString(playerData.claimResizing.lesserBoundaryCorner) + ".");
|
||||||
}
|
}
|
||||||
|
|
||||||
//if increased to a sufficiently large size and no subdivisions yet, send subdivision instructions
|
|
||||||
if (oldClaim.getArea() < 1000 && result.claim.getArea() >= 1000 && result.claim.children.size() == 0 && !player.hasPermission("griefprevention.adminclaims"))
|
|
||||||
{
|
|
||||||
GriefPrevention.sendMessage(player, TextMode.Info, Messages.BecomeMayor, 200L);
|
|
||||||
GriefPrevention.sendMessage(player, TextMode.Instr, Messages.SubdivisionVideo2, 201L, DataStore.SUBDIVISION_VIDEO_URL);
|
|
||||||
}
|
|
||||||
|
|
||||||
//clean up
|
//clean up
|
||||||
playerData.claimResizing = null;
|
playerData.claimResizing = null;
|
||||||
playerData.lastShovelLocation = null;
|
playerData.lastShovelLocation = null;
|
||||||
|
|
|
||||||
|
|
@ -58,12 +58,6 @@ class EquipShovelProcessingTask implements Runnable
|
||||||
int remainingBlocks = playerData.getRemainingClaimBlocks();
|
int remainingBlocks = playerData.getRemainingClaimBlocks();
|
||||||
GriefPrevention.sendMessage(player, TextMode.Instr, Messages.RemainingBlocks, String.valueOf(remainingBlocks));
|
GriefPrevention.sendMessage(player, TextMode.Instr, Messages.RemainingBlocks, String.valueOf(remainingBlocks));
|
||||||
|
|
||||||
//link to a video demo of land claiming, based on world type
|
|
||||||
if (GriefPrevention.instance.claimsEnabledForWorld(player.getLocation().getWorld()))
|
|
||||||
{
|
|
||||||
GriefPrevention.sendMessage(player, TextMode.Instr, Messages.SurvivalBasicsVideo2, DataStore.SURVIVAL_VIDEO_URL);
|
|
||||||
}
|
|
||||||
|
|
||||||
//if standing in a claim owned by the player, visualize it
|
//if standing in a claim owned by the player, visualize it
|
||||||
Claim claim = GriefPrevention.instance.dataStore.getClaimAt(player.getLocation(), true, playerData.lastClaim);
|
Claim claim = GriefPrevention.instance.dataStore.getClaimAt(player.getLocation(), true, playerData.lastClaim);
|
||||||
if (claim != null && claim.checkPermission(player, ClaimPermission.Edit, null) == null)
|
if (claim != null && claim.checkPermission(player, ClaimPermission.Edit, null) == null)
|
||||||
|
|
|
||||||
|
|
@ -959,11 +959,6 @@ public class GriefPrevention extends JavaPlugin
|
||||||
{
|
{
|
||||||
GriefPrevention.sendMessage(player, TextMode.Success, Messages.CreateClaimSuccess);
|
GriefPrevention.sendMessage(player, TextMode.Success, Messages.CreateClaimSuccess);
|
||||||
|
|
||||||
//link to a video demo of land claiming, based on world type
|
|
||||||
if (GriefPrevention.instance.claimsEnabledForWorld(player.getLocation().getWorld()))
|
|
||||||
{
|
|
||||||
GriefPrevention.sendMessage(player, TextMode.Instr, Messages.SurvivalBasicsVideo2, DataStore.SURVIVAL_VIDEO_URL);
|
|
||||||
}
|
|
||||||
Visualization visualization = Visualization.FromClaim(result.claim, player.getEyeLocation().getBlockY(), VisualizationType.Claim, player.getLocation());
|
Visualization visualization = Visualization.FromClaim(result.claim, player.getEyeLocation().getBlockY(), VisualizationType.Claim, player.getLocation());
|
||||||
Visualization.Apply(player, visualization);
|
Visualization.Apply(player, visualization);
|
||||||
playerData.claimResizing = null;
|
playerData.claimResizing = null;
|
||||||
|
|
@ -980,11 +975,6 @@ public class GriefPrevention extends JavaPlugin
|
||||||
{
|
{
|
||||||
if (args.length < 1)
|
if (args.length < 1)
|
||||||
{
|
{
|
||||||
//link to a video demo of land claiming, based on world type
|
|
||||||
if (GriefPrevention.instance.claimsEnabledForWorld(player.getLocation().getWorld()))
|
|
||||||
{
|
|
||||||
GriefPrevention.sendMessage(player, TextMode.Instr, Messages.SurvivalBasicsVideo2, DataStore.SURVIVAL_VIDEO_URL);
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -995,11 +985,6 @@ public class GriefPrevention extends JavaPlugin
|
||||||
}
|
}
|
||||||
catch (NumberFormatException e)
|
catch (NumberFormatException e)
|
||||||
{
|
{
|
||||||
//link to a video demo of land claiming, based on world type
|
|
||||||
if (GriefPrevention.instance.claimsEnabledForWorld(player.getLocation().getWorld()))
|
|
||||||
{
|
|
||||||
GriefPrevention.sendMessage(player, TextMode.Instr, Messages.SurvivalBasicsVideo2, DataStore.SURVIVAL_VIDEO_URL);
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1860,7 +1845,6 @@ public class GriefPrevention extends JavaPlugin
|
||||||
playerData.shovelMode = ShovelMode.Subdivide;
|
playerData.shovelMode = ShovelMode.Subdivide;
|
||||||
playerData.claimSubdividing = null;
|
playerData.claimSubdividing = null;
|
||||||
GriefPrevention.sendMessage(player, TextMode.Instr, Messages.SubdivisionMode);
|
GriefPrevention.sendMessage(player, TextMode.Instr, Messages.SubdivisionMode);
|
||||||
GriefPrevention.sendMessage(player, TextMode.Instr, Messages.SubdivisionVideo2, DataStore.SUBDIVISION_VIDEO_URL);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1908,7 +1908,6 @@ class PlayerEventHandler implements Listener
|
||||||
if (!player.hasPermission("griefprevention.adminclaims") && result.claim.getArea() >= 1000)
|
if (!player.hasPermission("griefprevention.adminclaims") && result.claim.getArea() >= 1000)
|
||||||
{
|
{
|
||||||
GriefPrevention.sendMessage(player, TextMode.Info, Messages.BecomeMayor, 200L);
|
GriefPrevention.sendMessage(player, TextMode.Info, Messages.BecomeMayor, 200L);
|
||||||
GriefPrevention.sendMessage(player, TextMode.Instr, Messages.SubdivisionVideo2, 201L, DataStore.SUBDIVISION_VIDEO_URL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
instance.autoExtendClaim(result.claim);
|
instance.autoExtendClaim(result.claim);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user