[INACTIVE][FUN/TP] PressurePorts v1.3- Step on a Pressure Plate, Warp [818]]

Discussion in 'Inactive/Unsupported Plugins' started by Wurstfabrik, May 20, 2011.

  1. Offline

    Wurstfabrik

    Pressure Ports - Step on a Pressure Plate, Warp
    Version: 1.3

    Since i started working with java some days ago and announced this to my server users it didn't took long till the first requests came. One was simple enough for my skills and sounded funny (and it is, oh lol!), so i started working on the idea.

    It is simple: You step on a pressure plate and get teleported somewhere. Due to the mass of pressure plates on my server i decided to add a required block (lapis) under it. So here is how you set up the PressurePlate:

    Place a Lapis-BLock​
    Place a Stone Pressure Plate on it​
    Walk somewhere, enter /ppset​

    Now everybody can step on your awesome PressurePort and get ported to somewhere else :D

    For everyone who doesn't get the text, dubstein made a short but cool explanation video:

    (Thanks bro!)
    Please ignore the "kid", i am 23 years old. :D

    Features:
    Let's you create an automatic Warp system without using portals or commands for your users.

    Download:
    PressurePorts v 1.3
    Source Code is a mess at the moment, maybe i will make it public for later versions.

    Things to know (open)

    Config File:
    The config file is generated automaticly when running the plugin the first time. If you have any problems create a file called config.yml in the PressurePorts-Dir and fill it with the following text:

    Code:
    Layout:
        PlateType: STONE_PLATE
        BlockType: LAPIS_BLOCK
    TeleportEnabled:
        Player: true
        Mobs: true
        Minecarts: true
    Permissions:
        ShowErrors:
            Break: true
            Create: true
            Use: false
    
    Short explanation of the settings:
    PlateType MUST be STONE_PLATE or WOOD_PLATE, everything else will be overridden with STONE_PLATE by the plugin.
    BlockType MUST be a placeable block, everything else will be overridden with LAPIS_BLOCK by the plugin.

    Legal BlockTypes (open)

    You CAN NOT use Block-IDs as a BlockType. So using 42 for Iron Blocks for example will reset the config to LAPIS_BLOCK. Here is a list of what can be used as BlockType:

    WOOL
    WOOD
    WEB
    STONE
    SPONGE
    SOUL_SAND
    SNOW_BLOCK
    SANDSTONE
    SAND
    REDSONE_ORE
    OBSIDIAN
    NOTEBLOCK
    NETHERRACK
    MOSSY_COBBLESTONE
    MOB_SPAWNER
    LOG
    LEAVES
    LAPIS_ORE
    LAPIS_BLOCK
    JUKEBOX
    IRON_ORE
    IRON_BLOCK
    ICE
    GRAVEL
    GRASS
    GOLD_ORE
    GOLD_BLOCK
    GLOWSTONE
    GLASS
    FURNACE
    DOUBLE_STEP
    DISPENSER
    DIRT
    DIAMOND_ORE
    DIAMOND_BLOCK
    COAL ORE
    CLAY_BRICK
    CLAY
    CHEST
    CACTUS
    BOOKSHELF
    BEDROCK




    The ShowErrors decide wether or not there will be an error message shown if the user doesn't have the permission. I suggest to take the standard-settings, so your users can still use PressurePorts as regular Pressure Plates without being annoyd.

    Permission Nodes:
    I am now using the modern technology "permissions". Every player in the ops.txt can still perform every action, everybody else can be edited using the following permission nodes:

    Code:
    PressurePort.Use - Wether or not the player might use PressurePorts.
    PressurePort.Break - The user can Break PressurePorts.
    PressurePort.Build - The user can build and set PressurePorts.
    
    Since this is my first work with permissions and i felt a little bit lost during the process there might be bugs. I tested everthing that came to my mind and it all worked, but maybe you find something that shouldn't happen. Please excuse and report those bugs!



    Changelog:
    Version 1.3
    • Fixed a bug where PlateType: WOOD_PLATE would be treated as illegal config.
    • Fixed a bug where entering anything than a legit Material would crash the plugin
    • Fixed a bug where not using Permissions would crash the plugin.
    Version 1.2
    • Fixed a bug when that crashed the plugin when creating the config-file
    • Added support to warp mobs :D
    Version 1.1
    • Fixed a bug where people with PressurePort.Build couldn't use the command.
    • Fixed a bug where placing an illegal material in the config crashed the plugin.
    Version 1.05
    • Added configuration file
    • Added permission support
    • Added Multiworld support
    Version 1.0
    • Release, yeah!
    To come:
    • different store format
    • use exisiting warps from various warp-plugins as target
    • iConomy-Support (working on this)
    • Warp Minecarts & Mobs.
    • your suggestion here
    Known Problems:

    • When creating some plates in row, where you get ported from 1 to 2 to 3 and so on you might get kicked because of flying.
    • Sometimes, when warping away, the plate stays pressed. For me, this seems to be lagrelated, but i'm not sure.
    Support me:
    I am looking for the storeage-files for the following warp-plugins:
    • Warpz0r
    • Essentials Warp
    If you use one of them, please upload the file somewhere and message me or write in the thread. Also, if i'm missing some important warp-plugins, feel free to tell me!


    (BIG thanks to my awesome mate 4treyu who wasn't annoyed by my ton of java-related questions :D and to Leonlas for the idea)
     
    Leavy, MrTofuhero and kahlilnc like this.
  2. Offline

    DarKMaKa

    We have this on loading:
    Code:
    2011-05-23 00:42:25 [SEVERE] Error occurred while enabling PressurePort v1.05 (Is it up to date?): Name is null
    java.lang.NullPointerException: Name is null
    at java.lang.Enum.valueOf(Unknown Source)
    at org.bukkit.Material.valueOf(Material.java:14)
    at me.Wurstfabrik.PressurePort.PressurePort.onEnable(PressurePort.java:150)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:750)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:253)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:131)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:109)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:218)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:205)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:145)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:265)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
     
  3. Offline

    Wurstfabrik

    Uploaded a quick fix which should solve this problem: http://dl.dropbox.com/u/27758241/PressurePort.jar
    If it stays, please copy your config-file in the thread.
    Does anybody else get the "Name is null"-error? This doesn't show to me and i have no idea what could cause this :S

    Also fixed in the new version: http://dl.dropbox.com/u/27758241/PressurePort.jar


    Any feedback towards this issue would be nice:
     
  4. Offline

    Icely

    All config files are empty and it wont start, has some long error report.
    Pretty nice plugin if it wud work :)
     
  5. Offline

    Wurstfabrik

    Damn... i WILL get this to work, sorry :D
    I need to go now, so no time, sorry. Would be cool if you could post the error report, that would make the bug hunting much easier ;) I will upload a new version in some hours.
     
  6. Offline

    DarKMaKa

    On 1st load we have :
    Code:
    2011-05-23 14:48:50 [INFO] PressurePorts has been activated
    2011-05-23 14:48:50 [INFO] PressurePorts Store File created.
    2011-05-23 14:48:50 [INFO] PressurePorts Store File created.
    2011-05-23 14:48:50 [SEVERE] java.io.IOException: Cannot run program "chmod": CreateProcess error=2, Le fichier spcifi est introuvable
    2011-05-23 14:48:50 [SEVERE] at java.lang.ProcessBuilder.start(Unknown Source)
    2011-05-23 14:48:50 [SEVERE] at java.lang.Runtime.exec(Unknown Source)
    2011-05-23 14:48:50 [SEVERE] at java.lang.Runtime.exec(Unknown Source)
    2011-05-23 14:48:50 [SEVERE] at java.lang.Runtime.exec(Unknown Source)
    2011-05-23 14:48:50 [SEVERE] at me.Wurstfabrik.PressurePort.PressurePort.onEnable(PressurePort.java:122)
    2011-05-23 14:48:50 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
    2011-05-23 14:48:50 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:750)
    2011-05-23 14:48:50 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:253)
    2011-05-23 14:48:50 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:132)
    2011-05-23 14:48:50 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:110)
    2011-05-23 14:48:50 [SEVERE] at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:218)
    2011-05-23 14:48:50 [SEVERE] at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:205)
    2011-05-23 14:48:50 [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:145)
    2011-05-23 14:48:50 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:265)
    2011-05-23 14:48:50 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    2011-05-23 14:48:50 [SEVERE] Caused by: java.io.IOException: CreateProcess error=2, Le fichier spcifi est introuvable
    2011-05-23 14:48:50 [SEVERE] at java.lang.ProcessImpl.create(Native Method)
    2011-05-23 14:48:50 [SEVERE] at java.lang.ProcessImpl.<init>(Unknown Source)
    2011-05-23 14:48:50 [SEVERE] at java.lang.ProcessImpl.start(Unknown Source)
    2011-05-23 14:48:50 [SEVERE] ... 15 more
    
    Then on next load we have :
    Code:
    2011-05-23 14:49:41 [INFO] Config-Error. PlateType set to STONE_PLATE
    2011-05-23 14:49:41 [SEVERE] Error occurred while enabling PressurePort v1.05 (Is it up to date?): Name is null
    java.lang.NullPointerException: Name is null
    at java.lang.Enum.valueOf(Unknown Source)
    at org.bukkit.Material.valueOf(Material.java:14)
    at me.Wurstfabrik.PressurePort.PressurePort.onEnable(PressurePort.java:150)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:750)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:253)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:132)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:110)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:218)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:205)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:145)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:265)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Why it says that we have 1.05 version, I'm sure that I download it from your last link.
     
  7. Offline

    Marcin

    Yes i have that error too.
     
  8. Offline

    Wurstfabrik

    DarKMaKa likes this.
  9. Offline

    Suffen

    What happens if the pressure plate is broken, destroyed or removed?
     
  10. Offline

    DarKMaKa

    Ok, now it works great!
    Thanks
     
  11. Offline

    justin shulman

    19:39:00 [SEVERE] Could not pass event PLAYER_INTERACT to PressurePort
    java.lang.NullPointerException
    at me.Wurstfabrik.PressurePort.PressurePort.hasPermissionUse(PressurePort.java:72)
    at me.Wurstfabrik.PressurePort.PPPlayerListener.onPlayerInteract(PPPlayerListener.java:61)
    at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.java:280)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:289)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:162)
    at net.minecraft.server.BlockPressurePlate.g(BlockPressurePlate.java:108)
    at net.minecraft.server.BlockPressurePlate.a(BlockPressurePlate.java:74)
    at net.minecraft.server.Entity.move(Entity.java:572)
    at net.minecraft.server.EntityLiving.a(EntityLiving.java:570)
    at net.minecraft.server.EntityHuman.a(EntityHuman.java:762)
    at net.minecraft.server.EntityLiving.u(EntityLiving.java:676)
    at net.minecraft.server.EntityHuman.u(EntityHuman.java:177)
    at net.minecraft.server.EntityPlayer.u(EntityPlayer.java:212)
    at net.minecraft.server.EntityLiving.p_(EntityLiving.java:231)
    at net.minecraft.server.EntityHuman.p_(EntityHuman.java:90)
    at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:169)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:273)
    at net.minecraft.server.Packet10Flying.a(SourceFile:126)
    at net.minecraft.server.NetworkManager.a(NetworkManager.java:196)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:372)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:287)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
     
  12. Offline

    DarKMaKa

    On each Teleport I've got:
    Code:
    2011-05-24 01:18:56 [WARNING] Maouli moved wrongly!
    2011-05-24 01:18:56 [INFO] Got position 142.0955776704573, 51.0, 394.7511602533496
    2011-05-24 01:18:56 [INFO] Expected -233.5, 68.0, -517.5
    2011-05-24 01:19:04 [WARNING] Maouli moved wrongly!
    2011-05-24 01:19:04 [INFO] Got position -235.82976041022403, 69.0, -517.4282871972955
    2011-05-24 01:19:04 [INFO] Expected 146.5, 51.0, 414.5
    2011-05-24 01:19:21 [WARNING] Maouli moved wrongly!
    2011-05-24 01:19:21 [INFO] Got position 142.11341471055425, 51.0, 394.53074651169254
    2011-05-24 01:19:21 [INFO] Expected -233.5, 68.0, -517.5
    2011-05-24 01:19:28 [WARNING] Maouli moved wrongly!
    2011-05-24 01:19:28 [INFO] Got position -235.99095635581054, 69.0, -517.6287284059823
    2011-05-24 01:19:28 [INFO] Expected 146.5, 51.0, 414.5
    2011-05-24 01:19:39 [WARNING] Maouli moved wrongly!
    2011-05-24 01:19:39 [INFO] Got position 142.1391967412735, 51.0, 394.73187983158243
    2011-05-24 01:19:39 [INFO] Expected -233.5, 68.0, -517.5
    2011-05-24 01:19:41 [WARNING] Maouli moved wrongly!
    2011-05-24 01:19:41 [INFO] Got position -235.8293403688554, 69.0, -517.4329508809393
    2011-05-24 01:19:41 [INFO] Expected 146.5, 51.0, 414.5
     
  13. Offline

    Marcin

    Code:
    2011-05-24 07:01:24 [SEVERE] Error occurred while enabling PressurePort v1.2 (Is it up to date?): Name is null
    java.lang.NullPointerException: Name is null
    	at java.lang.Enum.valueOf(Unknown Source)
    	at org.bukkit.Material.valueOf(Material.java:14)
    	at me.Wurstfabrik.PressurePort.PressurePort.onEnable(PressurePort.java:177)
    	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
    	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:750)
    	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:253)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:131)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:109)
    	at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:218)
    	at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:205)
    	at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:145)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:265)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    
    Still error on start.
     
  14. Offline

    Wurstfabrik

    @Marcin: Paste your config in the Thread pls.
    @justin shulman: Couldnt recreate this, more infos pls. Using permissions?
    @DarKMaKa:Thats the ingame-flightcheck:


    EDIT: Nevermind, got both bugs. Fix coming soo.

    @Marcin @justin shulman
    New version, your bugs are fixed. Hooray :D
    http://dl.dropbox.com/u/27758241/PressurePort.jar

    btw @Marcin
    you can't use the block ID in the config, you need to take one of those: http://jd.bukkit.org/apidocs/index.html (ofc only the placeable blocks). I will edit the op to clare this misunderstatemend.

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

    Marcin

    Code:
    2011-05-24 14:05:54 [SEVERE] Error occurred while enabling PressurePort v1.3 (Is it up to date?): null
    java.lang.NullPointerException
    	at me.Wurstfabrik.PressurePort.PressurePort.onEnable(PressurePort.java:173)
    	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
    	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:750)
    	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:253)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:131)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:109)
    	at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:218)
    	at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:205)
    	at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:145)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:265)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Still that same problem...

    With config do u need ?
     
  16. Offline

    Wurstfabrik

    @Marcin

    Need nothing, found the error. I will fix it in the next version, but i will take some coding-free time if nothing critical happens ;) As a quick solution, just delete your plugins/PressurePorts/config.yml-file and reload the plugin. That should work.
     
  17. Offline

    Marcin

    Its strange but it works. Thanks
     
  18. Offline

    fyrus12345

    Do I have to have permissions in order for my users to create pressure ports?
     
  19. Offline

    Wurstfabrik

    Yes! Or you put them all in ops.txt :S
     
  20. Offline

    jamescosten

    Getting the following whenever i use it.
    18:42:31 [WARNING] jamescosten moved wrongly!
    18:42:31 [INFO] Got position -37.52040262776319, 73.0, 26.04505244141825
    18:42:31 [INFO] Expected -19.5, 113.0, -45.5
    18:43:31 [WARNING] jamescosten moved too quickly! Elapsed ticks: 1, Distance change: 6977.848586608663
    18:43:47 [INFO] jamescosten [/81.107.69.71:53658] logged in with entity id 187 at (-48.5, 74.62000000476837, -3.5)
    18:43:58 [WARNING] jamescosten moved wrongly!
    18:43:58 [INFO] Got position -37.47692515641622, 73.0, 26.159970595846072
    18:43:58 [INFO] Expected -19.5, 113.0, -45.5

    Disconnected me saying i was hacking?
     
  21. Offline

    Wurstfabrik

    Read the thread! It's minecrafts built-in anti-fly-hack-solution. This seems to happen because you walk and suddenly you are somewhere else. FOR ME this is just happening when warping on a pressure port or jumping on it. Turn it off and use something like the NoCheat-Plugin.
     
  22. Offline

    Rsmvbomb04

    i like the idea but i cant use it cause when i step on one it kicks me off saying you moved too quickly (hacking?) ):
    [creeper]
     
  23. Offline

    kahlilnc

    I actually like this more than I thought I would. Nice
     
  24. Offline

    roobre

    Hi there!
    I'm currently having troubles with this plugin.
    It works nice fot OPs, but normal users cannot use the portals.

    I've added the permission, but it still not working.

    I post my permissions file here:

    Show Spoiler
    roobre@roobre-desktop:~$ > cat .minecraft/server/plugins/Permissions/globalGroups.yml

    Code:
    groups:
        Espectadores:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: false
            inheritance:
            permissions:
                - 'PressurePort.Use'
        Users:
            default: false
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
                - Espectadores
            permissions: null
        Admins:
            default: false
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            permissions:
                - '*'
    


    When an user tries to use, it says:
    "You are not allowed to use PressurePorts"
    Thanks in advance ^^
     
  25. Offline

    Wurstfabrik

    @roobre
    First of all, your permissions.yml must be named <name of your world>.yml. Or do you use Permissions 3.0? I haven't looked into this and am not shure if something changes for looking up the permissions. On my server we have some trouble with the update and stuffs, after the admin-work is done i will take a look at this. [​IMG]

    An other idea: Try to remove the ' before and after PressurePort.Use. Like this:

    Code:
    permissions:
        - PressurePort.Use
    
    If this doesn't work and you are using Permissions 2.0 please reply again and i will think further ;)
     
  26. Offline

    roobre

    Hi there!
    Thanks for answering!
    First of all, I'm using 3.0 (Should I downgrade to 2.X?)

    I quoted the permission because of the example:
    Code:
    #   like so:
    #
    #       - 'foo.bar'
    Secondly: As i've read, on permissions 3.0, that file (globalGroups.yml) affect to all maps in the server.

    I'm trying now without quotes...

    EDIT: Still not working. Should I downgrade to 2.x?

    Thanks in advance (And amazin' plugin! ^^)

    EDIT2: Downgraded to 2.7 and worked fine.
    Thanks!! ^^
     
  27. Offline

    Wurstfabrik

    If you just use Premissions for PressurePort using Permissions 2 would be the easiest solution, yeah.
     
  28. Offline

    Wurstfabrik

    Seems to work fine for #818. Well, it's always hard to test your own creations, so report any bugs since the new version please. But in my eyes everythings fine ;D
     
  29. Offline

    roobre

    Working nice for me too. =]
     
  30. Offline

    Snaipe

    Teleporting between worlds doesn't work : it TP you to the right coordinates, but in the same world.

    Also, it would be great to be able to have it to work with worldguard : if a pressure plate is destroyed, worldguard brings it back but PressurePort removes it from the list... maybe an afterward existence check, or maybe an option ( choose to destroy physically or with chat command ) ?
     
  31. Offline

    kahlilnc

    Really glad to see this work with 818. :p
     

Share This Page