Discussion in 'Plugin Development' started by EinOttoman, Feb 27, 2016.

Thread Status:
Not open for further replies.
  1. Offline


    Hello guys!
    Today i sit on an FFA Plugin, but the Plugin contains an /spawn command. How can i make it that the player who is fighting don't perform this command?
  2. Offline


    @EinOttoman want a person who has the permission, or is an operator to perform it?
  3. Offline


    @SkyleTyler1337 No. He wants a cooldown just like CombatLog, so when someone gets damaged or damages someone else, they can't use /spawn for a bit (Right @EinOttoman ?)
    What have you tried
  4. Offline


  5. Offline


  6. Offline


    @EinOttoman on EntitydamagebyEntity event you check if it's a player attacking a player if so you add them to a HashMap with the players UUID and a long value. The UUID will be the players and the long value will be system current time. Then you do checks to see of the timer is over or not. Then in the command preprocess event check if the command equals to /spawn and if they are still in the cooldown, if so cancel the event.
Thread Status:
Not open for further replies.

Share This Page