[FORMATTED] Can't Swim In Deep Water!

Discussion in 'Archived: Plugin Requests' started by Time2MinecraftServers, Mar 21, 2012.

  1. Plugin category: FUN/MISC

    Suggested name: Can't Swim or Deep Water

    A bit about me: I'm 16 and I have created many servers and minecraft map. I have been thinking about creating multiple servers (Hunger Games, Island Troll Tribes, Castle Wars) and I have hit a bump in the road. I am in need of a plugin that prevents people from going into 2 deep or deeper water.

    What I want: Recently while I was thinking about maps to make, I thought about an old game on Warcraft 3. The game was called Island Troll Tribes. I need a plugin that prevents people from going into 2 deep or deeper water. They would be able to go into a 1 deep water block because this is shallow water and is "walkable".

    Ideas for commands: No commands needed for this plugin.

    Ideas for permissions:
    CanSwim: False

    When I'd like it by: Within a week would be nice. I'm sure this will be rather easy to make.

    Similar plugin requests: None.

    If you want to post on the official topic go to this link:
    http://www.minecraftforum.net/topic...ibes-survival-server-idea/page__fromsearch__1

    Anyone interested? I also have a few other requests if you want to join the project.

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

    Nuinbot

    I might say that if you find someone willing to do it, you could do it as simple as making players "insta-drown". It would sense when the player goes underwater, making the bubble bar pop up. As soon as they do, it could either push them back (similar to a region/border protection plugin) -OR- kill them.
     
  3. I like the push back idea. The insta-drown would be a little difficult because the server will take place on islands and they would still be able to swim on top of 2 deep water.
     
  4. Offline

    SgtStud

    So basically you want them to not be able to float, and to drown instantly?
     
  5. Yes I suppose if that would be easier than a region like push back. However it would need to be made so they can swim and float in 1 deep water. Also it would be better if they don't drown instantly but within a second or three.
     
  6. Offline

    Nuinbot

    As a person who has learned how to exploit things, I think you might want to reassess how to keep people on these islands. My first thought is to dig below the ocean floor and tunnel. If the resources were also available, I could even use sand/gravel to build roads between islands.

    Just out of curiosity, why would you want to restrict movement in this way?
     
  7. I can do it for you but Nuinbot has a good Argument.
     
  8. Well I'm actually trying to recreate a custom game from Warcraft 3. In this game you can't swim in deep water (only walk in the shallow parts) and you can't go down cliffs. Only parts of the island will be editable by the way.
     
  9. Offline

    Father Of Time

    Just check when they move from one block to another, if the block they are moving into is water do a block.getRelative, if the block below it is water its 2 water blocks deep, simple apply a velocity to the player in the opposite direction they are facing to "knock them back".

    this is doable, but as stated above I think it will do little if anything to keep players in a specific location.
     
  10. How would this not be effective? They wont be able to tunnel underground or build bridges. I guess I should have stated that before. Would you be able to make this?
     
  11. Offline

    Father Of Time

    No sorry, I don't do public projects; I only program for my development group.

    I say I don't think it will be effective because people are ruthlessly creative with ways to get around systems, they will fly, they will use boats, etc... Feel free to make it, it will stop a majority of people, but if even one person getting off the island is an issue then I would call it a wasted effort.
     
  12. Alright, thank you for your input anyway.
     
  13. Offline

    SgtStud

    Theoretically that would work, but what if someone jumped into the middle of a lake form a cliff? The player's velocity would spazz out and behave very unexpectedly
     
  14. Well now that I think about it, for this map to work I would like to keep them from jumping off cliffs too. I'm assuming that is possible if the other is.
     
  15. Offline

    SgtStud

    I could make this plugin for you, but it would be very impractical and ineffective. As previously stated people constantly find ways to get around barriers.

    However, if you really want it, I can have this made for you. It would simply be a plugin that prevents players from swimming in water (they would immediately sink as far as possible), and would drown them either instantly or rapidly.
     
  16. That would be great, would it also be possible to keep people from jumping off of cliffs?
     
  17. Offline

    SgtStud

    Until I or someone else can tell me an effective way of doing this, I don't wan't to try. I may be able to accomplish it, but it would take a long time, maybe not work, and be a horrible drain on your RAM.

    Anyone got any efficient/effective ways to check this?
     
  18. Offline

    chaseoes

    Check to see if a player is in water, and below a certain y value (seeing as 64 is sea level, go below that for "deep" water)?
     
  19. Offline

    SgtStud

    No no no, I can do the water part easy. Thats not the problem. The problem is jumping off a cliff into water, and how to stop players from jumping off cliffs in general.
     
  20. Offline

    Newtkiller17

    do a check on damage, see if it's from a fall? if so, just tp them to the position they were when they jumped? would prevent them from jumping from any height above 3 blocks...
     
  21. Code:
    if(player.getLocation().getBlock().isLiquid()){
        Block checkBlock = world.getBlockAt(block.getX(), block.getY()-x, block.getZ() //Is Location x-block.getY();
    //x = is the max high befor begin to get Damage
            x = 4;
            if(checkBlock.isLiquid()){
            player.setDamage(player.getDamage-2); //set dammage 2 = One Heart
       }
       }
    
    Code is an Example not the Solution and it could be incorrect!!
     
  22. Anyone still thinking about this?
     

Share This Page