geforkt von Mirrors/Paper
SPIGOT-4131: Fix typo affecting setting BlockData
Dieser Commit ist enthalten in:
Ursprung
19ff43d9e1
Commit
ca75fead2c
@ -138,7 +138,7 @@ public class CraftBlockData implements BlockData {
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
private static <N extends Enum<N> & INamable> N toNMS(Enum<?> bukkit, Class<N> nms) {
|
private static <N extends Enum<N> & INamable> N toNMS(Enum<?> bukkit, Class<N> nms) {
|
||||||
Enum<?> converted;
|
Enum<?> converted;
|
||||||
BiMap<Enum<?>, Enum<?>> nmsToBukkit = classMappings.get(nms.getClass());
|
BiMap<Enum<?>, Enum<?>> nmsToBukkit = classMappings.get(nms);
|
||||||
|
|
||||||
if (nmsToBukkit != null) {
|
if (nmsToBukkit != null) {
|
||||||
converted = nmsToBukkit.inverse().get(bukkit);
|
converted = nmsToBukkit.inverse().get(bukkit);
|
||||||
@ -157,7 +157,7 @@ public class CraftBlockData implements BlockData {
|
|||||||
|
|
||||||
if (nmsToBukkit == null) {
|
if (nmsToBukkit == null) {
|
||||||
nmsToBukkit = HashBiMap.create();
|
nmsToBukkit = HashBiMap.create();
|
||||||
classMappings.put(nms.getClass(), nmsToBukkit);
|
classMappings.put(nms, nmsToBukkit);
|
||||||
}
|
}
|
||||||
|
|
||||||
nmsToBukkit.put(converted, bukkit);
|
nmsToBukkit.put(converted, bukkit);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren