Timer Freeze not working

Discussion in 'Plugin Development' started by Dirtcraft24, Jan 18, 2015.

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

    Dirtcraft24

    Hello so im working on a new plugin and its main functions are when a player types /timer it should countdown then freeze them. After the countdown is over it will unfreeze them and say "GO!!!"

    My problem is that when the timer stops or starts the freeze command doesnt do anything. I think its something to do with my player variable but i cant figure it out.

    Code:
    http://hastebin.com/hogolufenu.avrasm

    Plugin.yml
    http://hastebin.com/anaguwevus.sm
     
  2. Offline

    1Rogue

    Have a boolean flag that the runnable sets:

    Code:java
    1. boolean frozen = /* ... */;
    2.  
    3. public void setFrozen(boolean frozen) {
    4. this.frozen = frozen;
    5. }
    6.  
    7. public boolean isFrozen() {
    8. return this.frozen;
    9. }


    Then just check the result of .isFrozen() when a player attempts to move.
     
Thread Status:
Not open for further replies.

Share This Page