Adding an extra plot to a user through donations

Discussion in 'Spigot Plugin Help' started by UltimateGamer200, Jul 9, 2018.

  1. How can I give an extra plot to a user using PlotSquared? Let's say you joined a server and you get one plot by default and you wanted to get an extra one by purchasing a plot. When someone purchases that extra plot, the user's plot limit goes up by one each time when it's purchased. Here is the list of plugins I am using do this:
    - PlotSquared (For Plots)
    - Enjin (To buy those plots)
    - GroupManager (For permissions)

    I have been looking through posts on how to do this and they don't seem to work. Is there any way to do this?
     
  2. I assume what you want is giving the user multiple plots. Or so that they can claim multiple plots. And the plotsquared permissions page gives me this.

    [​IMG]
    Give a user that permission and he can claim 4 plots using plotsquared.
     
    • Like Like x 1
  3. Well, I don't want to set a limit. I want to add 1 per time it's purchased per user. So if someone has 2 plots and wants an extra, the user purchases one and is now at 3 plots. If someone is at 3, then it can be bought to increase it to 4, and so on.
     
    • Useful Useful x 1
  4. I tried it and something went wrong. I uploaded the script into the script directory for the plugin and this happened:

    [18:24:39 WARN]: java.io.FileNotFoundException: plugins/PlotSquared/scripts/addplots (No such file or directory)
    [18:24:39 WARN]: at java.io.FileInputStream.open0(Native Method)
    [18:24:39 WARN]: at java.io.FileInputStream.open(FileInputStream.java:195)
    [18:24:39 WARN]: at java.io.FileInputStream.<init>(FileInputStream.java:138)
    [18:24:39 WARN]: at com.google.common.io.Files$FileByteSource.openStream(Files.java:120)
    [18:24:39 WARN]: at com.google.common.io.Files$FileByteSource.openStream(Files.java:110)
    [18:24:39 WARN]: at com.google.common.io.ByteSource$AsCharSource.openStream(ByteSource.java:456)
    [18:24:39 WARN]: at com.google.common.io.CharSource.readLines(CharSource.java:311)
    [18:24:39 WARN]: at com.google.common.io.Files.readLines(Files.java:553)
    [18:24:39 WARN]: at com.google.common.io.Files.readLines(Files.java:520)
    [18:24:39 WARN]: at com.intellectualcrafters.plot.commands.DebugExec.onCommand(DebugExec.java:317)
    [18:24:39 WARN]: at com.intellectualcrafters.plot.commands.SubCommand.execute(SubCommand.java:27)
    [18:24:39 WARN]: at com.plotsquared.general.commands.Command.execute(Command.java:337)
    [18:24:39 WARN]: at com.intellectualcrafters.plot.commands.MainCommand.execute(MainCommand.java:259)
    [18:24:39 WARN]: at com.intellectualcrafters.plot.commands.MainCommand.onCommand(MainCommand.java:134)
    [18:24:39 WARN]: at com.plotsquared.bukkit.util.BukkitCommand.onCommand(BukkitCommand.java:34)
    [18:24:39 WARN]: at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
    [18:24:39 WARN]: at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141)
    [18:24:39 WARN]: at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:648)
    [18:24:39 WARN]: at org.bukkit.Bukkit.dispatchCommand(Bukkit.java:574)
    [18:24:39 WARN]: at com.enjin.bukkit.EnjinMinecraftPlugin.dispatchConsoleCommand(EnjinMinecraftPlugin.java:408)
    [18:24:39 WARN]: at com.enjin.bukkit.sync.BukkitInstructionHandler$1.run(BukkitInstructionHandler.java:168)
    [18:24:39 WARN]: at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:76)
    [18:24:39 WARN]: at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:361)
    [18:24:39 WARN]: at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:739)
    [18:24:39 WARN]: at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406)
    [18:24:39 WARN]: at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679)
    [18:24:39 WARN]: at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577)
    [18:24:39 WARN]: at java.lang.Thread.run(Thread.java:748)

    I use Server.pro for hosting and I inserted the code into the js file.
    [​IMG]
     
  5. It says it canno't find [18:24:39 WARN]: java.io.FileNotFoundException: plugins/PlotSquared/scripts/addplots (No such file or directory)
    Which is true I think instead of the name addplots you have to specify its file format too like addplots.js in a config file.

    I don't know how this plugin works but I think that will solve your issue.
     
    • Agree Agree x 1
  6. I have tried your soloution and it has still given me the same error. Do I need to move it to the config file or do I keep it in the scripts?
     
  7. Hmm maybe make a folder called addplots and throw the script in there. Otherwise I wouldn't know what to do.
     
  8. Directly in the plugin folder?
     
  9. I have tried your suggestion @RamonRobben and I got the same error as before. Here is a screenshot of where I placed the folder you suggested I should make. [​IMG]
     
  10. Hmm well I'm very sorry but I don't know what else you can try. I suggest contacting the plugin creator and asking him about this error. Maybe linking this thread to him or anything. Or maybe contact server.pro support and ask them if they know anything about it.
     
  11. I suppose Enjin has you run commands that happen when a purchase is made? If so a skript could work where you find their plots.plot limit and + 1 to it in a command. If you need help with this let me know, I can make it and post it here.
     
  12. I would suggest you to read all of the comments first before responding.
     
  13. I did enter the command the script provided for the console to execute when the player is online. Thanks for trying to help, @RamonRobben & @royalkingkb. I'll try to contact server.pro Support Team tonight.