diff options
author | Zach Brown <[email protected]> | 2017-03-25 00:22:02 -0500 |
---|---|---|
committer | Zach Brown <[email protected]> | 2017-03-25 00:22:02 -0500 |
commit | 5e2784e941ba2873facc44b30be906485fcdae95 (patch) | |
tree | bd89c6f56ded2bfabe6ffe468f15bc7ce329a1b9 /Spigot-Server-Patches/0183-Ignore-invalid-Marker-Icon-ID-s-in-maps.patch | |
parent | 246712ed92d21dbc90f9e8437dc42c79b558308d (diff) | |
download | Paper-5e2784e941ba2873facc44b30be906485fcdae95.tar.gz Paper-5e2784e941ba2873facc44b30be906485fcdae95.zip |
Switch to a bStats based Metrics system
Diffstat (limited to 'Spigot-Server-Patches/0183-Ignore-invalid-Marker-Icon-ID-s-in-maps.patch')
-rw-r--r-- | Spigot-Server-Patches/0183-Ignore-invalid-Marker-Icon-ID-s-in-maps.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0183-Ignore-invalid-Marker-Icon-ID-s-in-maps.patch b/Spigot-Server-Patches/0183-Ignore-invalid-Marker-Icon-ID-s-in-maps.patch new file mode 100644 index 0000000000..24158464c6 --- /dev/null +++ b/Spigot-Server-Patches/0183-Ignore-invalid-Marker-Icon-ID-s-in-maps.patch @@ -0,0 +1,27 @@ +From 89d07c5f1dd1050d332c3d2d84edefe27909242e Mon Sep 17 00:00:00 2001 +From: Aikar <[email protected]> +Date: Mon, 19 Dec 2016 23:38:57 -0500 +Subject: [PATCH] Ignore invalid Marker Icon ID's in maps + +Replace with the red marker. Should of only happened by creative abuse. + +diff --git a/src/main/java/net/minecraft/server/WorldMap.java b/src/main/java/net/minecraft/server/WorldMap.java +index dbe6a80f2..dfd8e4d84 100644 +--- a/src/main/java/net/minecraft/server/WorldMap.java ++++ b/src/main/java/net/minecraft/server/WorldMap.java +@@ -194,7 +194,11 @@ public class WorldMap extends PersistentBase { + // Spigot - start + UUID uuid = UUID.nameUUIDFromBytes(nbttagcompound.getString("id").getBytes(Charsets.US_ASCII)); + if (!this.decorations.containsKey(uuid)) { +- this.a(MapIcon.Type.a(nbttagcompound.getByte("type")), entityhuman.world, uuid, nbttagcompound.getDouble("x"), nbttagcompound.getDouble("z"), nbttagcompound.getDouble("rot")); ++ // Paper start - protect against bad map icon indexes ++ byte iconId = nbttagcompound.getByte("type"); ++ MapIcon.Type[] values = MapIcon.Type.values(); ++ this.a(values.length > iconId ? values[iconId] : values[2], entityhuman.world, uuid, nbttagcompound.getDouble("x"), nbttagcompound.getDouble("z"), nbttagcompound.getDouble("rot")); ++ // Paper end + // Spigot - end + } + } +-- +2.12.0.windows.1 + |