Remove CUI and other cleaning

This commit is contained in:
MattBDev
2019-06-06 18:39:51 -04:00
parent b42553116c
commit 229182aa63
28 changed files with 574 additions and 2653 deletions

View File

@ -109,8 +109,8 @@ public class BukkitPlayer extends AbstractPlayerActor {
if (itemStack.getType().getId().equalsIgnoreCase(WorldEdit.getInstance().getConfiguration().wandItem)) {
inv.remove(newItem);
}
final ItemStack item = player.getItemInHand();
player.setItemInHand(newItem);
final ItemStack item = player.getInventory().getItemInMainHand();
player.getInventory().setItemInMainHand(newItem);
HashMap<Integer, ItemStack> overflow = inv.addItem(item);
if (!overflow.isEmpty()) {
TaskManager.IMP.sync(new RunnableVal<Object>() {
@ -216,7 +216,7 @@ public class BukkitPlayer extends AbstractPlayerActor {
if (params.length > 0) {
send = send + "|" + StringUtil.joinString(params, "|");
}
player.sendPluginMessage(plugin, WorldEditPlugin.getCuiPluginChannel(), send.getBytes(CUIChannelListener.UTF_8_CHARSET));
player.sendPluginMessage(plugin, WorldEditPlugin.CUI_PLUGIN_CHANNEL, send.getBytes(CUIChannelListener.UTF_8_CHARSET));
}
public Player getPlayer() {
@ -305,7 +305,7 @@ public class BukkitPlayer extends AbstractPlayerActor {
}
@Override
public void sendFakeBlock(BlockVector3 pos, BlockStateHolder block) {
public <B extends BlockStateHolder<B>> void sendFakeBlock(BlockVector3 pos, B block) {
Location loc = new Location(player.getWorld(), pos.getX(), pos.getY(), pos.getZ());
if (block == null) {
player.sendBlockChange(loc, player.getWorld().getBlockAt(loc).getBlockData());