[ADMN/FUN] Freezer v1.1 - Make people unable to move [1000]

Discussion in 'Inactive/Unsupported Plugins' started by Baummann, Jun 11, 2011.

  1. Offline

    Baummann

    Freezer - Make people unable to move
    Version: 1.1 CraftBukkit 928


    [​IMG]

    Commands:
    Commands (open)
    /freeze - Freeze someone


    Instructions:
    Drag the .jar into your plugins folder.

    Permissions:
    Permissions (open)

    freezer.freeze - Access to /freeze
    freezer.nofreeze - People with that permission can't be frozen.

    Download:
    Click here

    Source code:
    Click here

    Changelog:
    v1.1 - Frozen players can no longer modify the world
    v1.0 - First release

    Signature:
    If you want to help Freezer to get popular then add this code to your signature:
    Code:
    [URL=http://forums.bukkit.org/threads/admn-fun-freezer-v1-0-make-people-unable-to-move-860.20956/][IMG]http://img823.imageshack.us/img823/9675/freezersignature.png[/IMG][/URL]
    Download freezer by clicking on the image.
     
    JWhy likes this.
  2. Offline

    DJAddi

    Prevents moving in every way, good job, but what about a possibility to unfreeze someone (without restarting the server)?
    Have fun,

    Addi
     
  3. Offline

    Baummann

    type /freeze [Player] and the player is able to move again.
     
  4. Offline

    DJAddi

    Nope, he is not. Freezer message is just showing again in the same way and he still can't move (and of course he is still shown in the frozen-players-list).
    Checking plugins conflicts right now... maybe wait a minute before replying again.
    €1: Doesn't seem to stand in conflict with other plugins (tested on empty server), checking conflict with local mods now.
    €2: Except some lags when moving very fast by zombe's fly mod, there do not seem to be any problems, so I looked into your source code. First thing I noticed was that you were right, an else state is missing after "frozen.remove".
    So you should change this
    Code:
    }
    Message(t, "You have been frozen!");
    Message(player, "You froze " + t.getDisplayName() + "!");
    log.info("[Freezer] " + t.getDisplayName() + " has been frozen by " + player.getDisplayName() + "!");
    frozen.put(t.getDisplayName(), t);
    return true;
    into this
    Code:
    } else {
    Message(t, "You have been frozen!");
    Message(player, "You froze " + t.getDisplayName() + "!");
    log.info("[Freezer] " + t.getDisplayName() + " has been frozen by " + player.getDisplayName() + "!");
    frozen.put(t.getDisplayName(), t);
    return true;
    }
    But the missing else should actually have resulted in getting thawed and getting frozen again instantly, showing both messages. As the "You have been thawed!"-message wasn't shown (using freeze twice on the same player, "You have been frozen!" was shown twice) I guess either the frozen-state is broken, or the .get method is not returning the correct state.

    €3: Guess I found the mistake. In the part that should actually thaw the frozen player, you wrote player.getDisplayName, but it has to be t.getDisplayName because "player" is the one executing the command, "t" is the one you actually freeze or thaw.
     
  5. Offline

    Baummann

    I bet it's just a missing else statement. I'll look into it now.

    I fixed it now it works fine.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  6. Offline

    DJAddi

    Did you fix it as I said in €3 or was it only the else statement?
    Thank you anyway!
    Have fun,

    Addi
     
  7. Offline

    Baummann

    It was the else statement I had to use else if (!frozen.contains(t.getDisplayName()) (Yes I'm using an arraylist now)
     
  8. Offline

    Plague

    the same as the other thread, changelog missing
     
  9. Love it - Although i'd like it if you can /freeze eastonch but then make him invul to damage, just so, we can freeze players & make then invincable, also, making them unable to attack. That would be more epic. :p
     
  10. Offline

    Baummann

    hmod - easy, bukkit - errr... I'll do that after I figured out how to prevent damage ^^
     
  11. You could just use a god script.. :p
     
  12. Offline

    Baummann

    onEntityDamage or?
    This happens if i use event.setCancelled(true);

    Code:
    11:46:06 [SEVERE] Could not pass event ENTITY_DAMAGE to Freezer
    java.lang.ClassCastException: org.bukkit.craftbukkit.entity.CraftSheep cannot be cast to org.bukkit.entity.Player
        at com.bukkit.Baummann.Freezer.FreezerEntityListener.onEntityDamage(FreezerEntityListener.java:15)
        at org.bukkit.plugin.java.JavaPluginLoader$51.execute(JavaPluginLoader.java:598)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
        at net.minecraft.server.EntityLiving.a(EntityLiving.java:493)
        at net.minecraft.server.Entity.a(Entity.java:647)
        at net.minecraft.server.Entity.move(Entity.java:520)
        at net.minecraft.server.EntityLiving.a(EntityLiving.java:589)
        at net.minecraft.server.EntityLiving.u(EntityLiving.java:711)
        at net.minecraft.server.EntityLiving.o_(EntityLiving.java:231)
        at net.minecraft.server.World.entityJoinedWorld(World.java:1114)
        at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:62)
        at net.minecraft.server.World.playerJoinedWorld(World.java:1096)
        at net.minecraft.server.World.cleanUp(World.java:1073)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:395)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
    Yes, I am using an EntityListener.

    Added.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  13. Offline

    Plague

    last two versions have to be outside a spoiler, edited
     
  14. Offline

    cloakfox

    i don't get this plugin to work with permissions when i add the freezer.freeze to the admin group and im admin i can't use it it says you don't have permission anybody knows why ?
     
  15. Offline

    Pink Floyd

    Love the simplicity of the plugin.
     
  16. Offline

    anthony42808

    maybe a /freeze all
     
  17. Offline

    NinjaMonkey2012

    Cool plugin
     
  18. Offline

    m0dulus

    Can you make a permissions node like freezer.autofreeze, making the group with that permission to automatically freeze upon joining? It's useful for the default group.
     
  19. Offline

    yakasuki

    mabey a thaw command?
     
  20. Offline

    Baummann

    /freeze again

    Use - '*' as permission it gives your admins permission to everything.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  21. Offline

    Stefenatefun

    Is it at all possible you could do a
    Code:
    /freeze all
    command where it freezes everyone in the world and stops teleportation?
     
  22. Quote
     
  23. Offline

    Baummann

    That could be possible and teleportation is already blocked when frozen (I think it is...)
     
  24. Offline

    dark_hunter

    Possible to disable command use while frozen? People can still teleport.
     
  25. Offline

    TheGurw

    Great, I love it, very simple and lightweight. One note I'd like to see: Put the version number in the startup text.
     
  26. Offline

    TheShadow777

    nice plugin, maybe can you make a /freezeall command to freeze all players witout the nofreeze permission ? :) the permission can be freezer.freezeall :p
     
    Stefenatefun likes this.
  27. Offline

    fatmarley

    any chance of a combat branch? Like using an iron sword will freeze someone, if hit again they will unfreeze...but if not touched their will be like a 10 sec thaw time?

    thanks!
     
  28. Offline

    ababa

    Hello Baummann,

    Could you do a small change for me?
    Would it be possible to freeze players for e.g. 5 minutes when they die?
     

Share This Page