Teleport Plates 1.16.4

Discussion in 'Plugin Requests' started by TourmalineTitan, Dec 21, 2020.

  1. Offline

    TourmalineTitan

    Minecraft version: 1.16.4

    What I want:
    The goal of this plugin is to help save time, setting up teleport pads. The goal of the plugin is to be able to run the command /setpad {name} then the player will be told to click on a stone pressure plate and then on a gold pressure plate. The stone plate will teleport the player or mob to the gold pressure plate. I want to used this to make an escape room, with a maze of teleporters. The plugin should also generate a configuring

    Teleportation Type: One way from a stone pressure plate to a gold pressure plate.

    Configuring: Records the name, world name, location of the plates and lets you define a universal teleport delay for all the teleporters you create.

    Ideas for commands: /setpad {name}

    /paddle {name}

    /pad reload

    /padlist

    Ideas for permissions: pad.create , pad.use, pad.deny
     
    Last edited: Dec 22, 2020
  2. Offline

    xelatercero

    Be more specific, the teleport only happens form the stone plate to te gold one , or vice versa?
    Also generate a configuration? what for? what do you want in the config?
     
  3. Offline

    TourmalineTitan

    Teleportation Type: One way from a stone pressure plate to a gold pressure plate.

    Configuring: Records the name, world name, location of the plates and lets you define a universal teleport delay for all the teleporters you create.
     
  4. Offline

    Vertex101

    wouldnt you want to put type of data into a database instead of a config file
     
  5. Offline

    Dai_Kunai

    How are teleporters removed?
     
  6. Offline

    ForbiddenSoul

    Made this quick and basic all with one class.
    JAR and Source Code are both in the attached TeleportPlates.zip if anyone wants to play around or expand on the code.

    If you want to use portals for your escape room or elsewhere, check out one of my other plugins:
    PortalStones
     

    Attached Files:

    Last edited: Jan 1, 2021
  7. Offline

    TourmalineTitan

    The server does not load the jar and I tried it as a zip as well
     
    Last edited: Jan 11, 2021
  8. Online

    timtower Administrator Administrator Moderator

  9. Offline

    TourmalineTitan

    Hi this is why it is not working.

    Could not load 'plugins\TeleportPlates.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: App has been compiled by a more recent version of the Java Runtime (class file version 57.0), this version of the Java Runtime only recognizes class file versions up to 52.0
     
  10. Offline

    TourmalineTitan

    I don’t know what to do about the two different java environments. I currently only have java 8s latest update installed on my server.
     
  11. Offline

    ForbiddenSoul

    I recompiled it for Java 8.
    My bad, I think the first one was compiled with Java 13.
    If there are any more issues I'll try my best to help.
    Download
     

    Attached Files:

    Last edited: Jan 19, 2021
  12. Offline

    TourmalineTitan

    Hi, whenever I place a plate in another world and close the server and restart it resets the config. I get this error
    https://pastebin.com/W9iiWK7a
     
  13. Offline

    ForbiddenSoul

    Can you show me what the config looks like before it get's reset?

    EDIT:
    Also if you are using something like multiverse, it has to start up and load your worlds before this plugin tries to access them.
    Add a soft depend to your multiverse-like plugin by doing the following:

    Code:
    Make sure the server is stopped/offline.
    Rename your TeleportPlates.jar to TeleportPlates.jar.zip
    Open the zip file.
    Open the plugin.yml from within the zip file to edit it.
    Add in a soft-dependancy like this:
    ...
    softdepend: [Multiverse-Core]
    softdepend: [Place Other Plugin Name Here]
    commands:
    ...
    Save the config.yml, and overwrite the file in the zip when prompted.
    Rename the .zip back to .jar
    Start the server.
     
    Last edited: Jan 19, 2021
  14. Offline

    TourmalineTitan

    This what the config becomes when there is an error.
    I am doing the fix you suggested.

    Teleport Plates:
    A: {}
    B: {}
    C: {}
    D: {}
    E: {}
    F: {}
     
  15. Offline

    ForbiddenSoul

    I guess the Fix did not help?
    I need the config before the error occurs, not what it turns it into because of it.
    Are you doing any manual editing of the config that might cause this error?

    With current information the best I can do is have the program soft fail, where your config does not get blanked out, but the plugin fails to run.

    EDIT:
    Just to explain, the cause of the error is:
    When the plugin starts, it maps the information in the config.yml to Bukkit Locations. The plugin starts with a blank map then goes from there.
    At some point, one, or all of the locations in the config are found not to actually exist (the world they are in has not been loaded by the server, or they have been manually edited incorrectly), the error occurs, and the map stays blank.
    When you turn the plugin off it saves the map, which is now blank and you loose the config.

    I did not realize your escape room was going to be across multiple worlds, and therefor the assumption was all locations would be valid.

    What new plugin.yml should look like (open)
    Code:YML
    1. name: TeleportPlates
    2. main: App
    3. version: 1.0
    4. api-version: 1.16
    5. author: ForbiddenSoul
    6. softdepend: [Multiverse-Core]
    7. commands:
    8. teleplate:
    9. description: "TeleportPlates created by: ForbiddenSoul"
    10. usage: /teleportplates
    11. teleplate-make:
    12. description: "Makes a new Teleport Plate"
    13. usage: /teleplate-make {name}
    14. permission: teleplate-make
    15. permission-message: You do not have permission to use teleplate-make
    16. teleplate-list:
    17. description: "Lists all Teleport Plates"
    18. permission: teleplate
    19. permission-message: You do not have permission to use teleplate-list
    20. teleplate-reload:
    21. description: "Reloads config.yml discarding any changes"
    22. permission: teleplate
    23. permission-message: You do not have permission to use teleplate-reload
    24. teleplate-remove:
    25. description: "Removes a Teleport Plate by name"
    26. usage: /teleplate-remove {name}
    27. permission: teleplate
    28. permission-message: You do not have permission to use teleplate-remove
    29. teleplate-allow:
    30. description: "Allows a player to use Teleport Plates"
    31. usage: /teleplate-allow {name}
    32. permission: teleplate
    33. permission-message: You do not have permission to use teleplate-allow
    34. teleplate-deny:
    35. description: "Denies a player from using Teleport Plates"
    36. usage: /teleplate-deny {name}
    37. permission: teleplate
    38. permission-message: You do not have permission to use teleplate-deny
    39. permissions:
    40. teleplate:
    41. description: "Allows usage of TeleportPlates commands."
    42. default: op
    43. teleplate.make:
    44. description: "Allows making of Teleport Plates."
    45. default: op
    46. teleplate.allow-use:
    47. description: "Allows use of Teleport Plates."

     
    Last edited: Jan 19, 2021
  16. Offline

    TourmalineTitan

    This is a bank and one with pads in it.
     

    Attached Files:

  17. Offline

    ForbiddenSoul

    Sorry this took a while to get back to you on, I was not alerted about a reply.
    I have tried using the same settings as in your config.yml, and I can not re-create the issue.
    Just so long as the worlds are loaded before this plugin tries to get locations from them, everything works fine.
    Adding the softdepend to multiverse ensure multiverse has completely loaded of all the worlds specified prior to this plugin doing it's thing.
    If you have not set up multiverse to load these worlds on startup, that is on you, you must do that.
    If you use some other plugin to manage your worlds, add a soft depend to that plugin instead.

    This plugin simply teleports you from one place to another, it does not handle world management for you.
     

Share This Page