mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 20:22:05 -07:00
fix: the server compiles
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
This commit is contained in:
@@ -65,7 +65,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ private static boolean testPermission(CommandSender commandSender, String permission) {
|
||||
+ if (commandSender.hasPermission(BASE_PERM + permission) || commandSender.hasPermission("bukkit.command.paper")) return true;
|
||||
+ commandSender.sendMessage(Bukkit.getPermissionMessage());
|
||||
+ commandSender.sendMessage(ChatColor.RED + "I'm sorry, but you do not have permission to perform this command. Please contact the server administrators if you believe that this is in error."); // Sorry, kashike
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
@@ -151,7 +151,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ case "ver":
|
||||
+ if (!testPermission(sender, "version")) break; // "ver" needs a special check because it's an alias. All other commands are checked up before the switch statement (because they are present in the SUBCOMMANDS set)
|
||||
+ case "version":
|
||||
+ Command ver = org.bukkit.Bukkit.getServer().getCommandMap().getCommand("version");
|
||||
+ Command ver = MinecraftServer.getServer().server.getCommandMap().getCommand("version");
|
||||
+ if (ver != null) {
|
||||
+ ver.execute(sender, commandLabel, new String[0]);
|
||||
+ break;
|
||||
@@ -219,12 +219,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ Map<ResourceLocation, Integer> nonEntityTicking = Maps.newHashMap();
|
||||
+ ServerChunkCache chunkProviderServer = world.getChunkSource();
|
||||
+
|
||||
+ Collection<Entity> entities = world.entitiesById.values();
|
||||
+ entities.forEach(e -> {
|
||||
+ world.getAllEntities().forEach(e -> {
|
||||
+ ResourceLocation key = new ResourceLocation(""); // TODO: update in next patch
|
||||
+
|
||||
+ MutablePair<Integer, Map<ChunkPos, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap()));
|
||||
+ ChunkPos chunk = new ChunkPos(e.xChunk, e.zChunk);
|
||||
+ ChunkPos chunk = e.chunkPosition();
|
||||
+ info.left++;
|
||||
+ info.right.put(chunk, info.right.getOrDefault(chunk, 0) + 1);
|
||||
+ if (!chunkProviderServer.isPositionTicking(e)) {
|
||||
|
Reference in New Issue
Block a user