Fix java 1.7 compatibility
This commit is contained in:
parent
942e32d827
commit
50e4231125
@ -29,6 +29,9 @@ subprojects {
|
|||||||
apply plugin: 'eclipse'
|
apply plugin: 'eclipse'
|
||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
|
|
||||||
|
sourceCompatibility = 1.7
|
||||||
|
targetCompatibility = 1.7
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile(group: 'com.sk89q.worldedit', name: 'worldedit-core', version:'6.1.1-SNAPSHOT') {
|
compile(group: 'com.sk89q.worldedit', name: 'worldedit-core', version:'6.1.1-SNAPSHOT') {
|
||||||
exclude(module: 'bukkit-classloader-check')
|
exclude(module: 'bukkit-classloader-check')
|
||||||
|
@ -85,7 +85,7 @@ public class AsyncChunk implements Chunk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean load(boolean generate) {
|
public boolean load(final boolean generate) {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<Boolean>() {
|
return TaskManager.IMP.sync(new RunnableVal<Boolean>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(Boolean value) {
|
public void run(Boolean value) {
|
||||||
|
@ -101,7 +101,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Block getBlockAt(int x, int y, int z) {
|
public Block getBlockAt(final int x, final int y, final int z) {
|
||||||
return new AsyncBlock(this, queue, x, y, z);
|
return new AsyncBlock(this, queue, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,7 +210,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void loadChunk(int x, int z) {
|
public void loadChunk(final int x, final int z) {
|
||||||
if (!isChunkLoaded(x, z)) {
|
if (!isChunkLoaded(x, z)) {
|
||||||
TaskManager.IMP.sync(new RunnableVal<Object>() {
|
TaskManager.IMP.sync(new RunnableVal<Object>() {
|
||||||
@Override
|
@Override
|
||||||
@ -222,7 +222,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean loadChunk(int x, int z, boolean generate) {
|
public boolean loadChunk(final int x, final int z, final boolean generate) {
|
||||||
if (!isChunkLoaded(x, z)) {
|
if (!isChunkLoaded(x, z)) {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<Boolean>() {
|
return TaskManager.IMP.sync(new RunnableVal<Boolean>() {
|
||||||
@Override
|
@Override
|
||||||
@ -235,7 +235,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean unloadChunk(Chunk chunk) {
|
public boolean unloadChunk(final Chunk chunk) {
|
||||||
if (chunk.isLoaded()) {
|
if (chunk.isLoaded()) {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<Boolean>() {
|
return TaskManager.IMP.sync(new RunnableVal<Boolean>() {
|
||||||
@Override
|
@Override
|
||||||
@ -258,7 +258,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean unloadChunk(int x, int z, boolean save, boolean safe) {
|
public boolean unloadChunk(final int x, final int z, final boolean save, final boolean safe) {
|
||||||
if (isChunkLoaded(x, z)) {
|
if (isChunkLoaded(x, z)) {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<Boolean>() {
|
return TaskManager.IMP.sync(new RunnableVal<Boolean>() {
|
||||||
@Override
|
@Override
|
||||||
@ -281,7 +281,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean regenerateChunk(int x, int z) {
|
public boolean regenerateChunk(final int x, final int z) {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<Boolean>() {
|
return TaskManager.IMP.sync(new RunnableVal<Boolean>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(Boolean value) {
|
public void run(Boolean value) {
|
||||||
@ -298,7 +298,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item dropItem(Location location, ItemStack item) {
|
public Item dropItem(final Location location, final ItemStack item) {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<Item>() {
|
return TaskManager.IMP.sync(new RunnableVal<Item>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(Item value) {
|
public void run(Item value) {
|
||||||
@ -308,7 +308,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item dropItemNaturally(Location location, ItemStack item) {
|
public Item dropItemNaturally(final Location location, final ItemStack item) {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<Item>() {
|
return TaskManager.IMP.sync(new RunnableVal<Item>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(Item value) {
|
public void run(Item value) {
|
||||||
@ -318,7 +318,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Arrow spawnArrow(Location location, Vector direction, float speed, float spread) {
|
public Arrow spawnArrow(final Location location, final Vector direction, final float speed, final float spread) {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<Arrow>() {
|
return TaskManager.IMP.sync(new RunnableVal<Arrow>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(Arrow value) {
|
public void run(Arrow value) {
|
||||||
@ -328,7 +328,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean generateTree(Location location, TreeType type) {
|
public boolean generateTree(final Location location, final TreeType type) {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<Boolean>() {
|
return TaskManager.IMP.sync(new RunnableVal<Boolean>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(Boolean value) {
|
public void run(Boolean value) {
|
||||||
@ -338,7 +338,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate) {
|
public boolean generateTree(final Location loc, final TreeType type, final BlockChangeDelegate delegate) {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<Boolean>() {
|
return TaskManager.IMP.sync(new RunnableVal<Boolean>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(Boolean value) {
|
public void run(Boolean value) {
|
||||||
@ -365,7 +365,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LightningStrike strikeLightning(Location loc) {
|
public LightningStrike strikeLightning(final Location loc) {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<LightningStrike>() {
|
return TaskManager.IMP.sync(new RunnableVal<LightningStrike>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(LightningStrike value) {
|
public void run(LightningStrike value) {
|
||||||
@ -375,7 +375,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LightningStrike strikeLightningEffect(Location loc) {
|
public LightningStrike strikeLightningEffect(final Location loc) {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<LightningStrike>() {
|
return TaskManager.IMP.sync(new RunnableVal<LightningStrike>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(LightningStrike value) {
|
public void run(LightningStrike value) {
|
||||||
@ -406,7 +406,7 @@ public class AsyncWorld implements World {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public <T extends Entity> Collection<T> getEntitiesByClass(Class<T>... classes) {
|
public <T extends Entity> Collection<T> getEntitiesByClass(final Class<T>... classes) {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<Collection<T>>() {
|
return TaskManager.IMP.sync(new RunnableVal<Collection<T>>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(Collection<T> value) {
|
public void run(Collection<T> value) {
|
||||||
@ -416,7 +416,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T extends Entity> Collection<T> getEntitiesByClass(Class<T> cls) {
|
public <T extends Entity> Collection<T> getEntitiesByClass(final Class<T> cls) {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<Collection<T>>() {
|
return TaskManager.IMP.sync(new RunnableVal<Collection<T>>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(Collection<T> value) {
|
public void run(Collection<T> value) {
|
||||||
@ -426,7 +426,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Entity> getEntitiesByClasses(Class<?>... classes) {
|
public Collection<Entity> getEntitiesByClasses(final Class<?>... classes) {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<Collection<Entity>>() {
|
return TaskManager.IMP.sync(new RunnableVal<Collection<Entity>>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(Collection<Entity> value) {
|
public void run(Collection<Entity> value) {
|
||||||
@ -446,7 +446,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Entity> getNearbyEntities(Location location, double x, double y, double z) {
|
public Collection<Entity> getNearbyEntities(final Location location, final double x, final double y, final double z) {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<Collection<Entity>>() {
|
return TaskManager.IMP.sync(new RunnableVal<Collection<Entity>>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(Collection<Entity> value) {
|
public void run(Collection<Entity> value) {
|
||||||
@ -471,7 +471,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean setSpawnLocation(int x, int y, int z) {
|
public boolean setSpawnLocation(final int x, final int y, final int z) {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<Boolean>() {
|
return TaskManager.IMP.sync(new RunnableVal<Boolean>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(Boolean value) {
|
public void run(Boolean value) {
|
||||||
@ -548,7 +548,7 @@ public class AsyncWorld implements World {
|
|||||||
return this.createExplosion(x, y, z, power, setFire, true);
|
return this.createExplosion(x, y, z, power, setFire, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks) {
|
public boolean createExplosion(final double x, final double y, final double z, final float power, final boolean setFire, final boolean breakBlocks) {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<Boolean>() {
|
return TaskManager.IMP.sync(new RunnableVal<Boolean>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(Boolean value) {
|
public void run(Boolean value) {
|
||||||
@ -606,7 +606,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T extends Entity> T spawn(Location location, Class<T> clazz) throws IllegalArgumentException {
|
public <T extends Entity> T spawn(final Location location, final Class<T> clazz) throws IllegalArgumentException {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<T>() {
|
return TaskManager.IMP.sync(new RunnableVal<T>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(T value) {
|
public void run(T value) {
|
||||||
@ -623,7 +623,7 @@ public class AsyncWorld implements World {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public FallingBlock spawnFallingBlock(Location location, int blockId, byte blockData) throws IllegalArgumentException {
|
public FallingBlock spawnFallingBlock(final Location location, final int blockId, final byte blockData) throws IllegalArgumentException {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<FallingBlock>() {
|
return TaskManager.IMP.sync(new RunnableVal<FallingBlock>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(FallingBlock value) {
|
public void run(FallingBlock value) {
|
||||||
@ -638,7 +638,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void playEffect(Location location, Effect effect, int data, int radius) {
|
public void playEffect(final Location location, final Effect effect, final int data, final int radius) {
|
||||||
TaskManager.IMP.sync(new RunnableVal<Object>() {
|
TaskManager.IMP.sync(new RunnableVal<Object>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(Object value) {
|
public void run(Object value) {
|
||||||
@ -653,7 +653,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> void playEffect(Location location, Effect effect, T data, int radius) {
|
public <T> void playEffect(final Location location, final Effect effect, final T data, final int radius) {
|
||||||
TaskManager.IMP.sync(new RunnableVal<Object>() {
|
TaskManager.IMP.sync(new RunnableVal<Object>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(Object value) {
|
public void run(Object value) {
|
||||||
@ -663,7 +663,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ChunkSnapshot getEmptyChunkSnapshot(int x, int z, boolean includeBiome, boolean includeBiomeTempRain) {
|
public ChunkSnapshot getEmptyChunkSnapshot(final int x, final int z, final boolean includeBiome, final boolean includeBiomeTempRain) {
|
||||||
return TaskManager.IMP.sync(new RunnableVal<ChunkSnapshot>() {
|
return TaskManager.IMP.sync(new RunnableVal<ChunkSnapshot>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(ChunkSnapshot value) {
|
public void run(ChunkSnapshot value) {
|
||||||
@ -724,7 +724,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setKeepSpawnInMemory(boolean keepLoaded) {
|
public void setKeepSpawnInMemory(final boolean keepLoaded) {
|
||||||
TaskManager.IMP.sync(new RunnableVal<Object>() {
|
TaskManager.IMP.sync(new RunnableVal<Object>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(Object value) {
|
public void run(Object value) {
|
||||||
@ -829,7 +829,7 @@ public class AsyncWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void playSound(Location location, Sound sound, float volume, float pitch) {
|
public void playSound(final Location location, final Sound sound, final float volume, final float pitch) {
|
||||||
TaskManager.IMP.sync(new RunnableVal<Object>() {
|
TaskManager.IMP.sync(new RunnableVal<Object>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(Object value) {
|
public void run(Object value) {
|
||||||
|
@ -135,7 +135,7 @@ public class Sniper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Old method (plus world arg)
|
// Old method (plus world arg)
|
||||||
public boolean snipe(Action action, Material itemInHand, AsyncWorld world, Block clickedBlock, BlockFace clickedFace) {
|
public boolean snipe(final Action action, final Material itemInHand, final AsyncWorld world, final Block clickedBlock, final BlockFace clickedFace) {
|
||||||
String toolId = getToolId(itemInHand);
|
String toolId = getToolId(itemInHand);
|
||||||
SniperTool sniperTool = tools.get(toolId);
|
SniperTool sniperTool = tools.get(toolId);
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ public class Sniper {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
SnipeData snipeData = sniperTool.getSnipeData();
|
final SnipeData snipeData = sniperTool.getSnipeData();
|
||||||
if (getPlayer().isSneaking()) {
|
if (getPlayer().isSneaking()) {
|
||||||
Block targetBlock;
|
Block targetBlock;
|
||||||
SnipeAction snipeAction = sniperTool.getActionAssigned(itemInHand);
|
SnipeAction snipeAction = sniperTool.getActionAssigned(itemInHand);
|
||||||
@ -262,9 +262,9 @@ public class Sniper {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Block targetBlock;
|
final Block targetBlock;
|
||||||
Block lastBlock;
|
final Block lastBlock;
|
||||||
SnipeAction snipeAction = sniperTool.getActionAssigned(itemInHand);
|
final SnipeAction snipeAction = sniperTool.getActionAssigned(itemInHand);
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case RIGHT_CLICK_AIR:
|
case RIGHT_CLICK_AIR:
|
||||||
@ -302,7 +302,7 @@ public class Sniper {
|
|||||||
// MetricsManager.increaseBrushUsage(sniperTool.getCurrentBrush().getName());
|
// MetricsManager.increaseBrushUsage(sniperTool.getCurrentBrush().getName());
|
||||||
// }
|
// }
|
||||||
// return result;
|
// return result;
|
||||||
IBrush brush = sniperTool.getCurrentBrush();
|
final IBrush brush = sniperTool.getCurrentBrush();
|
||||||
if (sniperTool.getCurrentBrush() instanceof PerformBrush) {
|
if (sniperTool.getCurrentBrush() instanceof PerformBrush) {
|
||||||
PerformBrush performerBrush = (PerformBrush) sniperTool.getCurrentBrush();
|
PerformBrush performerBrush = (PerformBrush) sniperTool.getCurrentBrush();
|
||||||
performerBrush.initP(snipeData);
|
performerBrush.initP(snipeData);
|
||||||
|
@ -121,7 +121,7 @@ public class BukkitQueue_1_10 extends BukkitQueue_0<Chunk, ChunkSection[], DataP
|
|||||||
HashSet<EntityPlayer> set = new HashSet<EntityPlayer>(playerChunk.c);
|
HashSet<EntityPlayer> set = new HashSet<EntityPlayer>(playerChunk.c);
|
||||||
EntityTracker tracker = w.getTracker();
|
EntityTracker tracker = w.getTracker();
|
||||||
// Get players
|
// Get players
|
||||||
HashSet<EntityPlayer> players = new HashSet<>();
|
final HashSet<EntityPlayer> players = new HashSet<>();
|
||||||
for (EntityHuman human : w.players) {
|
for (EntityHuman human : w.players) {
|
||||||
if (set.contains(human)) {
|
if (set.contains(human)) {
|
||||||
players.add((EntityPlayer) human);
|
players.add((EntityPlayer) human);
|
||||||
@ -161,8 +161,8 @@ public class BukkitQueue_1_10 extends BukkitQueue_0<Chunk, ChunkSection[], DataP
|
|||||||
if (slice == null) {
|
if (slice == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (Entity ent : slice) {
|
for (final Entity ent : slice) {
|
||||||
EntityTrackerEntry entry = tracker.trackedEntities.get(ent.getId());
|
final EntityTrackerEntry entry = tracker.trackedEntities.get(ent.getId());
|
||||||
if (entry == null) {
|
if (entry == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -413,7 +413,7 @@ public class BukkitQueue18R3 extends BukkitQueue_0<Chunk, ChunkSection[], char[]
|
|||||||
Object playerChunk = map.getEntry(pair);
|
Object playerChunk = map.getEntry(pair);
|
||||||
Field fieldPlayers = playerChunk.getClass().getDeclaredField("b");
|
Field fieldPlayers = playerChunk.getClass().getDeclaredField("b");
|
||||||
fieldPlayers.setAccessible(true);
|
fieldPlayers.setAccessible(true);
|
||||||
HashSet<EntityPlayer> players = new HashSet<>((Collection<EntityPlayer>)fieldPlayers.get(playerChunk));
|
final HashSet<EntityPlayer> players = new HashSet<>((Collection<EntityPlayer>)fieldPlayers.get(playerChunk));
|
||||||
if (players.size() == 0) {
|
if (players.size() == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -441,7 +441,7 @@ public class BukkitQueue18R3 extends BukkitQueue_0<Chunk, ChunkSection[], char[]
|
|||||||
player.playerConnection.sendPacket(packet);
|
player.playerConnection.sendPacket(packet);
|
||||||
}
|
}
|
||||||
// send ents
|
// send ents
|
||||||
for (EntityTrackerEntry entry : entities) {
|
for (final EntityTrackerEntry entry : entities) {
|
||||||
try {
|
try {
|
||||||
TaskManager.IMP.later(new Runnable() {
|
TaskManager.IMP.later(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -121,7 +121,7 @@ public class BukkitQueue_1_9_R1 extends BukkitQueue_0<Chunk, ChunkSection[], Dat
|
|||||||
HashSet<EntityPlayer> set = new HashSet<EntityPlayer>(playerChunk.c);
|
HashSet<EntityPlayer> set = new HashSet<EntityPlayer>(playerChunk.c);
|
||||||
EntityTracker tracker = w.getTracker();
|
EntityTracker tracker = w.getTracker();
|
||||||
// Get players
|
// Get players
|
||||||
HashSet<EntityPlayer> players = new HashSet<>();
|
final HashSet<EntityPlayer> players = new HashSet<>();
|
||||||
for (EntityHuman human : w.players) {
|
for (EntityHuman human : w.players) {
|
||||||
if (set.contains(human)) {
|
if (set.contains(human)) {
|
||||||
players.add((EntityPlayer) human);
|
players.add((EntityPlayer) human);
|
||||||
@ -161,8 +161,8 @@ public class BukkitQueue_1_9_R1 extends BukkitQueue_0<Chunk, ChunkSection[], Dat
|
|||||||
if (slice == null) {
|
if (slice == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (Entity ent : slice) {
|
for (final Entity ent : slice) {
|
||||||
EntityTrackerEntry entry = tracker.trackedEntities.get(ent.getId());
|
final EntityTrackerEntry entry = tracker.trackedEntities.get(ent.getId());
|
||||||
if (entry == null) {
|
if (entry == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ public class SpongeQueue_1_8 extends NMSMappedFaweQueue<World, net.minecraft.wor
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
EntityTracker tracker = w.getEntityTracker();
|
EntityTracker tracker = w.getEntityTracker();
|
||||||
HashSet<EntityPlayerMP> players = new HashSet<>();
|
final HashSet<EntityPlayerMP> players = new HashSet<>();
|
||||||
for (EntityPlayer player : w.playerEntities) {
|
for (EntityPlayer player : w.playerEntities) {
|
||||||
if (player instanceof EntityPlayerMP) {
|
if (player instanceof EntityPlayerMP) {
|
||||||
if (chunkMap.isPlayerWatchingChunk((EntityPlayerMP) player, x, z)) {
|
if (chunkMap.isPlayerWatchingChunk((EntityPlayerMP) player, x, z)) {
|
||||||
@ -156,7 +156,7 @@ public class SpongeQueue_1_8 extends NMSMappedFaweQueue<World, net.minecraft.wor
|
|||||||
player.playerNetServerHandler.sendPacket(packet);
|
player.playerNetServerHandler.sendPacket(packet);
|
||||||
}
|
}
|
||||||
// send ents
|
// send ents
|
||||||
for (EntityTrackerEntry entry : entities) {
|
for (final EntityTrackerEntry entry : entities) {
|
||||||
try {
|
try {
|
||||||
TaskManager.IMP.later(new Runnable() {
|
TaskManager.IMP.later(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user