diff --git a/src/main/java/lv/pi/animalrp/AnimalRP.java b/src/main/java/lv/pi/animalrp/AnimalRP.java index 3f2d5e3..6429721 100644 --- a/src/main/java/lv/pi/animalrp/AnimalRP.java +++ b/src/main/java/lv/pi/animalrp/AnimalRP.java @@ -51,6 +51,7 @@ import lv.pi.animalrp.animals.Cat; import lv.pi.animalrp.animals.Fox; import lv.pi.animalrp.commands.EmoteCommand; import lv.pi.animalrp.commands.InteractionCommand; +import lv.pi.animalrp.commands.SexCommand; import lv.pi.animalrp.commands.TfCommand; import lv.pi.animalrp.listeners.AntiElytra; import lv.pi.animalrp.listeners.PlayerChat; @@ -156,6 +157,7 @@ public class AnimalRP extends JavaPlugin { getCommand("tf").setExecutor(new TfCommand()); getCommand("emote").setExecutor(new EmoteCommand()); + getCommand("sex").setExecutor(new SexCommand()); getCommand("headpats").setExecutor(new InteractionCommand(Mood.HAPPY, "%s petted you! %s", "You petted %s! %s")); getCommand("kiss").setExecutor(new InteractionCommand(Mood.CUTE, "%s kissed you.. 0////0 %s", "You kissed %s.. 0////0 %s")); diff --git a/src/main/java/lv/pi/animalrp/commands/SexCommand.java b/src/main/java/lv/pi/animalrp/commands/SexCommand.java index 3b59a4d..c76760c 100644 --- a/src/main/java/lv/pi/animalrp/commands/SexCommand.java +++ b/src/main/java/lv/pi/animalrp/commands/SexCommand.java @@ -173,6 +173,11 @@ public class SexCommand implements CommandExecutor { Player player = (Player)arg0; + if(!player.isOp()) { + arg0.sendMessage(AnimalRP.mm.deserialize("You are not an OP!")); + return true; + } + if(arg3.length == 0) { arg0.sendMessage(AnimalRP.mm.deserialize("Include player!")); return true; diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 4f3c1d3..d288d8e 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -23,4 +23,6 @@ commands: cuddle: usage: Cuddle a person. emote: - usage: Emote! \ No newline at end of file + usage: Emote! + sex: + usage: This command can only be used by Operators. \ No newline at end of file