Solved Plotsquared API help

Discussion in 'Plugin Development' started by jonathanpecany, Jan 29, 2021.

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


    I've been trying to ask the plugin developers for help as I wanted to use the API of the plugin to take a player's plot and copy it to a new void world. I have actually tried doing it by looking at the API, but nothing. I just want to move a player's plot to a new void world to the same position as it was in the world it came from.

    Anyone know the API well enough to know what to do, I apparently don't as I can't figure it out.

    Here are some sources for PlotSquare.

    Last edited: Feb 8, 2021
  2. Offline


  3. Offline

    timtower Administrator Administrator Moderator

    @jonathanpecany Why do you want to move them?
    Because you also need to move the actual plot data.
  4. Offline


    I simply need to move them to make it more realistic to the purpose of the server that my plugin is running on.

    How would I be able to move the plot data. I have tried search through the documentation and I am having trouble with finding an answer.

    Knowing how to extract the plot data might just be very, very, very helpful.

    Thanks for the reply, I know it may be a difficult question to answer, but I hope someone might of fiddles around with the api.
  5. Offline

    timtower Administrator Administrator Moderator

  6. Offline


    @timtower You mean try getting the API from that or the file?

    I did try to get the API from that and got confused, and for some arguments, I don't know where I would get it.

    But from the API, I did have some ideas in getting the schematic from the plot and placing it relative to the original position of the plot.

    Also, not related, but when did you become an admin? You use to only just be a moderator and now you are both an admin and moderator.
  7. Offline

    timtower Administrator Administrator Moderator

  8. Offline


    @timtower Okay, yeah, I did try looking through the API, don't know how I would get the arguments of what some stuff like exporting schematics and such.
  9. Offline


  10. Offline


    So guessing not many people know the API then.
    Last edited: Feb 8, 2021
  11. Offline


    I am getting a bit further in it with my code and finally managed to create a schematic file. I am not going to try to create a new world and implement it in the world.

    Update 2 (6:54 PM):
    I am having trouble finding out how to paste a schematic into a world using the worldedit API.
    I might be able to figure out how to make it the same position as the regular plot though.

    Hmmm, starting to get a bit off-topic of what this post is about but not much as it still relates to the plotsquare API in terms of pasting it and positioning it.

    Should mention that I am using Worldedit version 7.2.0 on Minecraft 1.6.x, meaning that 'CuboidClipboard' doesn't exist anymore.

    Update 3 (9:49):
    A couple of hours in and still found absolutely nothing. It shouldn't be this hard, if it is then the people who created WorldEdit are just unfair and stupid in my opinion.
    Last edited: Feb 10, 2021
  12. Offline


    I decided yesterday to message one of the developers of the worldedit plugin that has been recently active and he got back to me and redirected me to get support on the discord, but he said it in a bit rudely tone, which I did not like.

    For the PlotsquaredAPI message that I sent NotMyFaulti, he has never replied back and been active after I sent it to him. He has replied back to me before when I had a question, which he was actually very rude about, I just wanted to know something and he was rude about it. So I think he is purposely ignoring me.
  13. Offline


    Okay, I believe I am close. Now back to the PlotSquared API, how would I get the relative position of the plots so I can place the schematic at the relative position in the new world?

    I have not look much into it but I know it may take while, so in the mean time, maybe anyone who may come across may help as well.
    Last edited: Feb 14, 2021
  14. Offline


    After about 3 weeks, I finally did it. Finally. Except, the way I found it won't last long as it is depreciated, so I wouldn't mind if anyone could help with getting a new way so I am all up to date.

    Clipboard Pasting
    Clipboard Loading (Schematic)
    EditSession Flush

    Included the sources above as references if anyone managed to run into the same problem.
    These sources will have a high chance to not work in the next version of world edit and may be removed in World edit 7.3 or above somewhere. If anyone so happens to have a solution that will work in future versions of the plugin, please share.
Thread Status:
Not open for further replies.

Share This Page