Revert matt's changes

Let's not break Fawe, thanks
This commit is contained in:
N0tMyFaultOG
2020-06-13 18:48:57 +02:00
parent 56f29a3962
commit bfcc6184ad
75 changed files with 687 additions and 980 deletions

View File

@ -128,7 +128,6 @@ public class BukkitGetBlocks_1_14 extends CharGetBlocks {
public int getSkyLight(int x, int y, int z) {
int layer = y >> 4;
if (skyLight[layer] == null) {
//getDataLayerData
skyLight[layer] = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.SKY).a(SectionPosition.a(nmsChunk.getPos(), layer));
}
long l = BlockPosition.a(x, y, z);
@ -139,7 +138,6 @@ public class BukkitGetBlocks_1_14 extends CharGetBlocks {
public int getEmmittedLight(int x, int y, int z) {
int layer = y >> 4;
if (blockLight[layer] == null) {
//getDataLayerData
blockLight[layer] = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.BLOCK).a(SectionPosition.a(nmsChunk.getPos(), layer));
}
long l = BlockPosition.a(x, y, z);

View File

@ -20,6 +20,11 @@
package com.sk89q.bukkit.util;
import com.sk89q.util.ReflectionUtil;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
@ -28,12 +33,6 @@ import org.bukkit.command.PluginIdentifiableCommand;
import org.bukkit.command.SimpleCommandMap;
import org.bukkit.plugin.Plugin;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class CommandRegistration {
static {
@ -62,7 +61,6 @@ public class CommandRegistration {
}
return null;
}
public boolean register(List<CommandInfo> registered) {
CommandMap commandMap = getCommandMap();
if (registered == null || commandMap == null) {
@ -84,13 +82,12 @@ public class CommandRegistration {
if (fallbackCommands != null) {
return fallbackCommands;
}
CommandMap commandMap = ReflectionUtil.getField(plugin.getServer().getPluginManager(), "commandMap");
if (commandMap == null) {
Bukkit.getServer().getLogger().severe(plugin.getDescription().getName() +
": Could not retrieve server CommandMap, using fallback instead!");
fallbackCommands = commandMap = new SimpleCommandMap(Bukkit.getServer());
Bukkit.getServer().getPluginManager().registerEvents(new FallbackRegistrationListener(fallbackCommands), plugin);
Bukkit.getServer().getLogger().severe(plugin.getDescription().getName() +
": Could not retrieve server CommandMap, using fallback instead!");
fallbackCommands = commandMap = new SimpleCommandMap(Bukkit.getServer());
Bukkit.getServer().getPluginManager().registerEvents(new FallbackRegistrationListener(fallbackCommands), plugin);
} else {
serverCommandMap = commandMap;
}

View File

@ -31,7 +31,7 @@ import java.nio.charset.StandardCharsets;
*/
public class CUIChannelListener implements PluginMessageListener {
public static final Charset UTF_8_CHARSET = StandardCharsets.UTF_8;
public static final Charset UTF_8_CHARSET = Charset.forName("UTF-8");
private final WorldEditPlugin plugin;
public CUIChannelListener(WorldEditPlugin plugin) {