mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 17:57:38 +00:00
Added 'xp' as a parameter of the /remove command to remove experience orbs.
This commit is contained in:
parent
d6ed17dd9d
commit
b10498b9c7
@ -10,4 +10,5 @@ public enum EntityType {
|
|||||||
BOATS,
|
BOATS,
|
||||||
MINECARTS,
|
MINECARTS,
|
||||||
TNT,
|
TNT,
|
||||||
|
XP_ORBS
|
||||||
}
|
}
|
@ -28,6 +28,7 @@ import org.bukkit.entity.Arrow;
|
|||||||
import org.bukkit.entity.Boat;
|
import org.bukkit.entity.Boat;
|
||||||
import org.bukkit.entity.Creature;
|
import org.bukkit.entity.Creature;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
|
import org.bukkit.entity.ExperienceOrb;
|
||||||
import org.bukkit.entity.Ghast;
|
import org.bukkit.entity.Ghast;
|
||||||
import org.bukkit.entity.Item;
|
import org.bukkit.entity.Item;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
@ -535,6 +536,11 @@ public class BukkitWorld extends LocalWorld {
|
|||||||
ent.remove();
|
ent.remove();
|
||||||
++num;
|
++num;
|
||||||
}
|
}
|
||||||
|
} else if (type == EntityType.XP_ORBS) {
|
||||||
|
if (ent instanceof ExperienceOrb) {
|
||||||
|
ent.remove();
|
||||||
|
++num;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -404,8 +404,10 @@ public class UtilityCommands {
|
|||||||
type = EntityType.MINECARTS;
|
type = EntityType.MINECARTS;
|
||||||
} else if (typeStr.matches("tnt")) {
|
} else if (typeStr.matches("tnt")) {
|
||||||
type = EntityType.TNT;
|
type = EntityType.TNT;
|
||||||
|
} else if (typeStr.matches("xp")) {
|
||||||
|
type = EntityType.XP_ORBS;
|
||||||
} else {
|
} else {
|
||||||
player.printError("Acceptable types: arrows, items, paintings, boats, minecarts, tnt");
|
player.printError("Acceptable types: arrows, items, paintings, boats, minecarts, tnt, xp");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user