Merge remote-tracking branch 'remotes/origin/master'

This commit is contained in:
MattBDev
2016-04-11 17:04:52 -04:00
8 changed files with 24 additions and 46 deletions

View File

@ -571,7 +571,7 @@ public class PlayerEvents extends PlotListener implements Listener {
}
}
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onChat(AsyncPlayerChatEvent event) {
PlotPlayer plotPlayer = BukkitUtil.getPlayer(event.getPlayer());
Location location = plotPlayer.getLocation();
@ -603,14 +603,11 @@ public class PlayerEvents extends PlotListener implements Listener {
}
}
}
String full = format.replaceAll("%plot_id%", id.x + ";" + id.y).replaceAll("%sender%", sender).replaceAll("%msg%", message);
String full = format.replace("%plot_id%", id.x + ";" + id.y).replace("%sender%", sender).replace("%msg%", message);
full = ChatColor.translateAlternateColorCodes('&', full);
// format = format.replaceAll("%plot_id%", id.x + ";" + id.y).replaceAll("%sender%", "%s").replaceAll("%msg%", "%s");
// format = ChatColor.translateAlternateColorCodes('&', format);
for (Player receiver : recipients) {
receiver.sendMessage(full);
}
// event.setFormat(format);
}
@EventHandler(priority = EventPriority.LOWEST)

View File

@ -15,7 +15,6 @@ import com.intellectualcrafters.plot.util.ReflectionUtils.RefMethod.RefExecutor;
import com.intellectualcrafters.plot.util.SetQueue;
import com.intellectualcrafters.plot.util.SetQueue.ChunkWrapper;
import com.intellectualcrafters.plot.util.TaskManager;
import com.plotsquared.bukkit.util.BukkitUtil;
import com.plotsquared.bukkit.util.SendChunk;
import org.bukkit.Chunk;
import org.bukkit.Material;
@ -261,17 +260,6 @@ public class FastQueue_1_8_3 extends SlowQueue {
return new FastChunk_1_8_3(wrap);
}
@Override
public void regenerateChunk(String worldname, ChunkLoc loc) {
World world = BukkitUtil.getWorld(worldname);
Chunk chunk = world.getChunkAt(loc.x, loc.z);
if (chunk.getTileEntities().length > 0) {
Object w = this.methodGetHandleWorld.of(world).call();
((Collection) this.tileEntityListTick.of(w).get()).clear();
}
super.regenerateChunk(worldname, loc);
}
/**
* This should be overridden by any specialized queues
* @param plotChunk

View File

@ -1,7 +1,5 @@
package com.plotsquared.bukkit.util.block;
import static com.intellectualcrafters.plot.util.ReflectionUtils.getRefClass;
import com.intellectualcrafters.plot.object.ChunkLoc;
import com.intellectualcrafters.plot.object.PseudoRandom;
import com.intellectualcrafters.plot.util.ChunkManager;
@ -15,12 +13,6 @@ import com.intellectualcrafters.plot.util.ReflectionUtils.RefMethod.RefExecutor;
import com.intellectualcrafters.plot.util.SetQueue.ChunkWrapper;
import com.intellectualcrafters.plot.util.TaskManager;
import com.plotsquared.bukkit.util.BukkitUtil;
import org.bukkit.Chunk;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.World.Environment;
import org.bukkit.block.Biome;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@ -30,6 +22,14 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.Set;
import org.bukkit.Chunk;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.World.Environment;
import org.bukkit.block.Biome;
import static com.intellectualcrafters.plot.util.ReflectionUtils.getRefClass;
public class FastQueue_1_9 extends SlowQueue {
@ -80,18 +80,6 @@ public class FastQueue_1_9 extends SlowQueue {
MainUtil.initCache();
}
@Override
public void regenerateChunk(String worldname, ChunkLoc loc) {
World world = BukkitUtil.getWorld(worldname);
Chunk chunk = world.getChunkAt(loc.x, loc.z);
if (chunk.getTileEntities().length > 0) {
Object c = this.methodGetHandleChunk.of(chunk).call();
Object w = this.methodGetWorld.of(c).call();
((Collection) this.tileEntityListTick.of(w).get()).clear();
}
super.regenerateChunk(worldname, loc);
}
/**
* This should be overridden by any specialized queues
* @param plotChunk