3
0

Fix for map decoration

This commit is contained in:
Sergey Shatunov
2016-01-05 14:48:56 +07:00
parent 0011dd0d9a
commit 6911f3485a
3 changed files with 72 additions and 7 deletions

View File

@ -1,5 +1,6 @@
package org.bukkit.craftbukkit.map;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
@ -32,9 +33,9 @@ public class CraftMapRenderer extends MapRenderer {
cursors.removeCursor(cursors.getCursor(0));
}
for (Object key : worldMap.playersVisibleOnMap.keySet()) {
for (UUID key : worldMap.playersVisibleOnMap.keySet()) { // Spigot string -> uuid
// If this cursor is for a player check visibility with vanish system
Player other = Bukkit.getPlayerExact((String) key);
Player other = Bukkit.getPlayer(key); // Spigot
if (other != null && !player.canSee(other)) {
continue;
}