3
0
KCauldronX/patches/org/bukkit/event/player/PlayerTeleportEvent.java.patch
Prototik a2e007c47a Correctly handle cross world entity teleportation
Spigot patch: 0124-Cross-World-Entity-Teleportation.patch
2015-05-14 22:43:19 +07:00

31 lines
803 B
Diff

--- ../src-base/minecraft/org/bukkit/event/player/PlayerTeleportEvent.java
+++ ../src-work/minecraft/org/bukkit/event/player/PlayerTeleportEvent.java
@@ -55,11 +55,27 @@
* portal
*/
END_PORTAL,
+ // Cauldron start - added cause for mods
/**
+ * Indicates the teleportation was caused by a player entering a
+ * Mod portal
+ */
+ MOD,
+ // Cauldron end
+ /**
* Indicates the teleportation was caused by an event not covered by
* this enum
*/
UNKNOWN;
+
+ public boolean isPortal() {
+ switch(this) {
+ case NETHER_PORTAL:
+ case END_PORTAL:
+ return true;
+ }
+ return false;
+ }
}
@Override