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.

    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]: plugins/PlotSquared/scripts/addplots (No such file or directory)
    [18:24:39 WARN]: at Method)
    [18:24:39 WARN]: at
    [18:24:39 WARN]: at<init>(
    [18:24:39 WARN]: at$FileByteSource.openStream(
    [18:24:39 WARN]: at$FileByteSource.openStream(
    [18:24:39 WARN]: at$AsCharSource.openStream(
    [18:24:39 WARN]: at
    [18:24:39 WARN]: at
    [18:24:39 WARN]: at
    [18:24:39 WARN]: at com.intellectualcrafters.plot.commands.DebugExec.onCommand(
    [18:24:39 WARN]: at com.intellectualcrafters.plot.commands.SubCommand.execute(
    [18:24:39 WARN]: at com.plotsquared.general.commands.Command.execute(
    [18:24:39 WARN]: at com.intellectualcrafters.plot.commands.MainCommand.execute(
    [18:24:39 WARN]: at com.intellectualcrafters.plot.commands.MainCommand.onCommand(
    [18:24:39 WARN]: at com.plotsquared.bukkit.util.BukkitCommand.onCommand(
    [18:24:39 WARN]: at org.bukkit.command.PluginCommand.execute(
    [18:24:39 WARN]: at org.bukkit.command.SimpleCommandMap.dispatch(
    [18:24:39 WARN]: at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(
    [18:24:39 WARN]: at org.bukkit.Bukkit.dispatchCommand(
    [18:24:39 WARN]: at com.enjin.bukkit.EnjinMinecraftPlugin.dispatchConsoleCommand(
    [18:24:39 WARN]: at com.enjin.bukkit.sync.BukkitInstructionHandler$
    [18:24:39 WARN]: at
    [18:24:39 WARN]: at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftScheduler.mainThreadHeartbeat(
    [18:24:39 WARN]: at net.minecraft.server.v1_12_R1.MinecraftServer.D(
    [18:24:39 WARN]: at net.minecraft.server.v1_12_R1.DedicatedServer.D(
    [18:24:39 WARN]: at net.minecraft.server.v1_12_R1.MinecraftServer.C(
    [18:24:39 WARN]: at
    [18:24:39 WARN]: at

    I use for hosting and I inserted the code into the js file.
  5. It says it canno't find [18:24:39 WARN]: 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 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 Support Team tonight.