Skip to content

Commit

Permalink
Merge pull request #30 from ZiteDesigns/stable
Browse files Browse the repository at this point in the history
Fixed Creeper and added /slapper list for a entity list
  • Loading branch information
Vecnavium authored Mar 30, 2022
2 parents 799a0ee + 2d96684 commit a71f509
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ permissions:
slapper.id:
description: Allow viewing entity ID
default: op
slapper.list:
description: Allow viewing of a list of Entitys
default: op
slapper.help:
description: Allow viewing Slapper help page
default: op
10 changes: 10 additions & 0 deletions src/slapper/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ class Main extends PluginBase implements Listener {
"remove: /slapper remove [id]",
"version: /slapper version",
"cancel: /slapper cancel",
"entitys: /slapper entitys",
];
/** @var string[] */
public $editArgs = [
Expand Down Expand Up @@ -271,6 +272,15 @@ public function onCommand(CommandSender $sender, Command $command, string $label
unset($this->idSessions[$sender->getName()]);
$sender->sendMessage($this->prefix . "Cancelled.");
return true;
case "list":
case "entitys":
if (!$sender->hasPermission("slapper.list")) {
$sender->sendMessage($this->noperm);
return true;
}
$sender->sendMessage($this->prefix . "Entity List."
. TextFormat::BLUE . "Creeper, Bat, Sheep, PigZombie, Ghast, Blaze, IronGolem, Snowman, Ocelot, ZombieVillager, Cow, Zombie, Squid, Villager, Spider, Pig, MushroomCow, Wolf, LavaSlime, Silverfish, Skeleton, Slime, Chicken, Enderman, CaveSpider, Boat, Minecart, Mule, Witch, PrimedTNT, Horse, Donkey, SkeletonHorse, ZombieHorse, Rabbit, Stray, Husk, WitherSkeleton, FallingSand, ElderGuardian, Endermite, Evoker, Guardian, Llama, PolarBear, Shulker, Vex, Vindicator, Wither, EndCrystal");
return true;
case "remove":
if (!$sender->hasPermission("slapper.remove")) {
$sender->sendMessage($this->noperm);
Expand Down
2 changes: 1 addition & 1 deletion src/slapper/entities/SlapperCreeper.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class SlapperCreeper extends SlapperEntity {

const TYPE_ID = EntityLegacyIds::COW;
const TYPE_ID = EntityLegacyIds::CREEPER;
const HEIGHT = 1.7;

}

0 comments on commit a71f509

Please sign in to comment.