Fix handleItem for Missiles
Dieser Commit ist enthalten in:
Ursprung
f265408a42
Commit
290180309c
@ -165,7 +165,7 @@ public class Missile extends SpecialItem {
|
||||
}
|
||||
|
||||
public static void init(){
|
||||
File missileFolder = new File(MissileWars.getPlugin().getDataFolder(), "default-missles");
|
||||
File missileFolder = new File(MissileWars.getPlugin().getDataFolder(), "default-missiles");
|
||||
if (!missileFolder.exists() || !missileFolder.canRead() || !missileFolder.isDirectory()) {
|
||||
throw new SecurityException("Missiles could not be loaded");
|
||||
}
|
||||
|
@ -67,6 +67,11 @@ public abstract class SpecialItem {
|
||||
}
|
||||
|
||||
public static boolean handleUse(ItemStack item, Player player) {
|
||||
for (SpecialItem missileItem : missileItems) {
|
||||
if (item.isSimilar(missileItem.getItem())) {
|
||||
return missileItem.handleUse(player);
|
||||
}
|
||||
}
|
||||
for (SpecialItem specialItem : supportItems) {
|
||||
if (item.isSimilar(specialItem.getItem())) {
|
||||
return specialItem.handleUse(player);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren