Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
Make the effect filter stricter
Dieser Commit ist enthalten in:
Ursprung
c2c8dda565
Commit
e1c64bf0eb
@ -1,5 +1,5 @@
|
||||
--- ../work/decompile-8eb82bde//net/minecraft/server/TileEntityBeacon.java 2014-12-27 14:03:08.349290689 +0000
|
||||
+++ src/main/java/net/minecraft/server/TileEntityBeacon.java 2014-12-27 14:03:08.349290689 +0000
|
||||
--- ../work/decompile-8eb82bde//net/minecraft/server/TileEntityBeacon.java 2014-12-27 14:48:34.677261097 +0000
|
||||
+++ src/main/java/net/minecraft/server/TileEntityBeacon.java 2014-12-27 14:48:34.677261097 +0000
|
||||
@@ -5,6 +5,11 @@
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@ -77,14 +77,28 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -307,4 +336,10 @@
|
||||
@@ -307,4 +336,24 @@
|
||||
return super.c(i, j);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ // CraftBukkit start
|
||||
+ public int validateEffect(int i) {
|
||||
+ return i < 0 || i >= MobEffectList.byId.length || MobEffectList.byId[i] == null ? 0 : i;
|
||||
+ i = i < 0 || i >= MobEffectList.byId.length || MobEffectList.byId[i] == null ? 0 : i;
|
||||
+ switch (i) {
|
||||
+ case 1: // MobEffectList.FASTER_MOVEMENT.id
|
||||
+ case 3: // MobEffectList.FASTER_DIG.id
|
||||
+ case 11: // MobEffectList.RESISTANCE.id
|
||||
+ case 8: // MobEffectList.JUMP.id
|
||||
+ case 5: // MobEffectList.INCREASE_DAMAGE.id
|
||||
+ case 10: // MobEffectList.REGENERATION.id
|
||||
+ break;
|
||||
+ default:
|
||||
+ System.out.println("Filtered: " + i);
|
||||
+ i = 0;
|
||||
+ break;
|
||||
+ }
|
||||
+ return i;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren