mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Fixes
Possible fix for trim: #482 Fixes #480 Possible fix for #481 Reduce plot move debugspam
This commit is contained in:
parent
96dd736a6d
commit
58cf41bddb
@ -134,7 +134,7 @@ public class Trim extends SubCommand {
|
||||
return;
|
||||
}
|
||||
final Plot plot = plots.remove(0);
|
||||
plots.remove(0);
|
||||
|
||||
final Location pos1 = MainUtil.getPlotBottomLoc(world, plot.id);
|
||||
final Location pos2 = MainUtil.getPlotTopLoc(world, plot.id);
|
||||
|
||||
|
@ -351,6 +351,9 @@ public class MainUtil {
|
||||
|
||||
public static boolean isPlotAreaAbs(final Location location) {
|
||||
final PlotWorld plotworld = PS.get().getPlotWorld(location.getWorld());
|
||||
if (plotworld == null) {
|
||||
return false;
|
||||
}
|
||||
if (plotworld.TYPE == 2) {
|
||||
return ClusterManager.getClusterAbs(location) != null;
|
||||
}
|
||||
|
@ -58,6 +58,18 @@ public class EntityWrapper {
|
||||
private HorseStats horse;
|
||||
private ArmorStandStats stand;
|
||||
|
||||
private int hash;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return hash == obj.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return hash;
|
||||
}
|
||||
|
||||
public void storeInventory(final InventoryHolder held) {
|
||||
this.inventory = held.getInventory().getContents().clone();
|
||||
}
|
||||
@ -158,6 +170,7 @@ public class EntityWrapper {
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public EntityWrapper(final org.bukkit.entity.Entity entity, final short depth) {
|
||||
this.hash = entity.getEntityId();
|
||||
this.depth = depth;
|
||||
final Location loc = entity.getLocation();
|
||||
this.yaw = loc.getYaw();
|
||||
@ -372,9 +385,6 @@ public class EntityWrapper {
|
||||
if (stand.isSmall()) {
|
||||
this.stand.small = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
case ENDERMITE: // NEW
|
||||
@ -421,6 +431,14 @@ public class EntityWrapper {
|
||||
case LEASH_HITCH: {
|
||||
return null;
|
||||
}
|
||||
case ITEM_FRAME: {
|
||||
entity = world.spawn(loc, ItemFrame.class);
|
||||
break;
|
||||
}
|
||||
case PAINTING: {
|
||||
entity = world.spawn(loc, Painting.class);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
entity = world.spawnEntity(loc, type);
|
||||
break;
|
||||
|
@ -114,6 +114,7 @@ public class SetBlockFast_1_8 extends BukkitSetBlockManager {
|
||||
case 54:
|
||||
case 130:
|
||||
case 142:
|
||||
case 132:
|
||||
case 27:
|
||||
case 137:
|
||||
case 52:
|
||||
@ -124,6 +125,7 @@ public class SetBlockFast_1_8 extends BukkitSetBlockManager {
|
||||
case 138:
|
||||
case 176:
|
||||
case 177:
|
||||
case 119:
|
||||
case 63:
|
||||
case 68:
|
||||
case 323:
|
||||
@ -261,9 +263,11 @@ public class SetBlockFast_1_8 extends BukkitSetBlockManager {
|
||||
block.setData(data);
|
||||
return;
|
||||
}
|
||||
// blockstate
|
||||
switch(currentId) {
|
||||
case 54:
|
||||
case 130:
|
||||
case 132:
|
||||
case 142:
|
||||
case 27:
|
||||
case 137:
|
||||
@ -279,6 +283,7 @@ public class SetBlockFast_1_8 extends BukkitSetBlockManager {
|
||||
case 68:
|
||||
case 323:
|
||||
case 117:
|
||||
case 119:
|
||||
case 116:
|
||||
case 28:
|
||||
case 66:
|
||||
|
Loading…
Reference in New Issue
Block a user