Merge remote-tracking branch 'origin/master'

This commit is contained in:
MattBDev
2016-06-27 10:10:55 -04:00
14 changed files with 97 additions and 95 deletions

View File

@ -1,47 +0,0 @@
package com.plotsquared.bukkit.util;
import com.intellectualcrafters.plot.object.PlotMessage;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.ChatManager;
import org.bukkit.ChatColor;
import java.util.ArrayList;
import java.util.List;
public class BukkitPlainChatManager extends ChatManager<List<StringBuilder>> {
@Override
public List<StringBuilder> builder() {
return new ArrayList<>();
}
@Override
public void color(PlotMessage message, String color) {
List<StringBuilder> parts = message.$(this);
parts.get(parts.size() - 1).insert(0, color);
}
@Override
public void tooltip(PlotMessage message, PlotMessage... tooltips) {}
@Override
public void command(PlotMessage message, String command) {}
@Override
public void text(PlotMessage message, String text) {
message.$(this).add(new StringBuilder(ChatColor.stripColor(text)));
}
@Override
public void send(PlotMessage plotMessage, PlotPlayer player) {
StringBuilder built = new StringBuilder();
for (StringBuilder sb : plotMessage.$(this)) {
built.append(sb);
}
player.sendMessage(built.toString());
}
@Override
public void suggest(PlotMessage plotMessage, String command) {}
}

View File

@ -26,9 +26,8 @@ import java.util.HashSet;
import java.util.Map.Entry;
/**
* An utility that can be used to send chunks, rather than using bukkit code to do so (uses heavy NMS)
*
* An utility that can be used to send chunks, rather than using bukkit code
* to do so (uses heavy NMS).
*/
public class SendChunk {
@ -40,7 +39,7 @@ public class SendChunk {
private final RefMethod methodInitLighting;
/**
* Constructor
* Constructor.
*/
public SendChunk() throws ClassNotFoundException, NoSuchMethodException, NoSuchFieldException {
RefConstructor tempMapChunk;

View File

@ -85,7 +85,7 @@ public class BukkitLocalQueue<T> extends BasicLocalBlockQueue<T> {
if (block != null) {
int x = MainUtil.x_loc[layer][j];
int y = MainUtil.y_loc[layer][j];
int z = MainUtil.y_loc[layer][j];
int z = MainUtil.z_loc[layer][j];
Block existing = chunk.getBlock(x, y, z);
int existingId = existing.getTypeId();
if (existingId == block.id) {