readd sex with condition for only ops

This commit is contained in:
yourfriendoss 2023-04-16 01:24:48 +03:00
parent ad0ef01fcf
commit 97a0c1425d
3 changed files with 10 additions and 1 deletions

View file

@ -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"));

View file

@ -173,6 +173,11 @@ public class SexCommand implements CommandExecutor {
Player player = (Player)arg0;
if(!player.isOp()) {
arg0.sendMessage(AnimalRP.mm.deserialize("<red>You are not an OP!"));
return true;
}
if(arg3.length == 0) {
arg0.sendMessage(AnimalRP.mm.deserialize("<red>Include player!"));
return true;

View file

@ -24,3 +24,5 @@ commands:
usage: Cuddle a person.
emote:
usage: Emote!
sex:
usage: This command can only be used by Operators.