[SEC/MECH/FUN] PreciousStones - Block Area Proteciton System [BukkitDev]

Discussion in 'Archived: Plugin Releases' started by phaed, Jan 18, 2011.

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

    phaed

  2. Offline

    Bill Warner

    got this all fixed up.

    updated to 5.4.2

    still when placing a pstone it doesn't get inserted into the database, but...

    with /ps debugdb/sql on i was able to cut the INSERT statement out of the log and paste it into the database, then do a /ps setname on the field and the name gets updated in the database???

    I don't understand why the creation would get ignored, but the update would work.

    I'm going to try backing up the database and removing it, then starting over from scratch and see if it works. Will just have to get everyone to replace their pstones I guess.

    EDIT:
    the wipe made them work again at least. We've been pretty grief free for the most part for the last few weeks, but haven't been advertising for new people at all either. I'll give everyone a week or two to replace their pstones. Thanks for my #1 plugin, even if there was a bit of a bump here.
     
  3. Offline

    Reevalot

    Great mod. Our server just installed it and I like how it works.

    Firstly I'd like to report this bug:
    We have a skyworld going where there are floating islands all over the map with no bottom. If you fall, at layer 2 you teleport to ceiling of the main world at the same X and Z coordinates. If you use a PS anywhere in this skyworld regardless of it's height location, it will spawn a bedrock on top of an obsidian in it's fields radius at the bottom of the map. If you remove the PS the piece of obsidian will change into bedrock and both will remain until a moderator removes it. I thought at first this only happened when you placed a PS whose field overlapped or touched the bottom layer, but now I see them everywhere. Thought I'd mention that first. (Whoops, forgot to add, they always spawn at Layer 1 and Layer 0)

    On to the next topic then.

    I really enjoy this mod, think it's pretty cool, I'd like to toss in some suggestions.

    Suggestion 1:
    This suggestion is more like a complete re-write of code. Sorry if it isn't appealing, but if it is I'm sorry for the amount of work it will entail.

    Make a field block as the selection tool for precious stones. One block which would cover a small area by default and you can purchase or set larger areas using a command. (For our server, having a bigger area means paying more so if the owner can make it so that each of these choices cost more to upgrade the block then that would be awesome.)

    Field Choices: (example dimensions)
    House size - Radius:4 Height:2 (9x9x5)
    Mansion size - R:8 H:4 (17x17x9)
    Tower size - R:4 H:8 (9x9x17)
    Farm size - R:16 H:2 (33x33x5) (ideal for large wheat, sugarcane, mushroom, or tree farms (won't cover all trees))
    City size - R:16 H:8 (33x33x17)
    Mega Tower size - R:12 H:24 (25x25x49)
    Mega City size - R:48 H:24 (97x97x49)
    Admin Tower size - R:24 H:128 (49x49x256) (covers sky to bedrock)
    Admin City size - R:64 H:128 (128x128x256) (fully protects 64 chunks)

    Then the precious stones would become addon blocks. Let's say that Iron Ore is a No-Destroy precious stone, but by itself it has no field radius, if you placed it, it would just be iron ore, but if you place it on one of the six adjacent sides of a field block, it would add the No Destroy feature to the entire field. With this you could add 6 perks to each field block and it would reduce the need to create fields for each individual precious stone (ps visualize lags me soo bad right now) This new field choice should remove the need for overlapping fields, since also the addons should need to be added to each field block to provide that protection. Server's could then choose available addons, set prices, and even prevent certain addons from being used with certain fields. Like say "No Enter" wouldn't be available for City sized fields and up, and "Damage" wouldn't be available for anything above the House size field.

    I just figure this will make the PS addon easier to use. A field block will be house size by default, you can then /ps buy field mansion which will make your available dimensions 17x17x9 but you can then use /ps set radius to make them house sized again. This would just allow servers to make that command unavailable to players or cost something to use.

    Suggestion 2:
    I would also like to see this perhaps:

    /ps set origin bottom
    /ps set origin top

    These commands would make the precious stone cover an area differently. Changing the origin to the bottom would make it so that the PS doesn't have to be in the center of the protected area (aka floating in the air in the center of my house) but located at the bottom. So one in my floor will cover my house, or even (set origin top) one in the ceiling.
     
  4. Offline

    phaed

    The bedrock that is placed is from something called tagging I implemented in a past version. Recent changes have made this practice redundant. Please add this to my github issue tracker and I will be removing it on next version and the blocks it creates erased as well.

    Nice ideas, though suggestion 1 would be easier to create from scratch than to modify PreciousStones as PS was not built to be used this way and would require re-writing close to 90% of the code, and would only be useful for those servers who use an economy plugin (not all do). Might want to post this in the Plugin Requests forum.

    Suggestion 2 I can do. Please add this request to my github issue tracker as well so I can add to next version.
     
  5. Offline

    Reevalot

    Cool, I added it to github. Also I made the first suggestion mainly because our server owner set it up so all the PS blocks, the important ones, are unobtainable or at least very hard to get (unless you can spawn) so he can control how many there are mainly. You have to pay to get one then pay again to place it somewhere. The problem is finding unobtainable blocks to use when there's only a few. I guess this would be solved if you were somehow able to make there be a permissions feature that limits you on how many of them you can place depending on the level of access you have to the server.
     
  6. Offline

    Shalobee

    I am having an issue where ps won't save any new fields? I am running cb rb1000 and ps 5.4.2. its been doing it since 5.4 i believe. anyone else have the same issue? its very annoying everytime i restart my server it loses the new fields :/
     
  7. Offline

    Niff

    So sorry for the delay, my node died due to some sort of crazy power outage, so I could not look into this anymore. BUT my co-admin and I were able to track it down (we think) the process he did to fix it is as follows, hopefully it is helpful to someone:
    so he did a
    Code:
    mysql> ALTER TABLE pstone_fields DROP packed_snitch_list;
    Query OK, 429 rows affected (0.04 sec)
    Records: 429 Duplicates: 0 Warnings: 0
    
    and everything seems fine and dandy atm. I will update if anything changes.
     
  8. Offline

    Zenithas

    Working well, but download server is exceptionally slow.
     
  9. Offline

    Bronski

    I'm getting gobs of these with PS5.4.2/CB1000. I just upgraded from 5.4.1:

    Code:
    2011-08-14 03:52:45 [SEVERE] Could not pass event PLAYER_INTERACT to PreciousStones
    java.lang.NullPointerException
            at net.sacredlabyrinth.Phaed.PreciousStones.listeners.PSPlayerListener.onPlayerInteract(PSPlayerListener.java:99)
            at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.java:307)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:139)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:782)
            at net.minecraft.server.Packet18ArmAnimation.a(SourceFile:35)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-08-14 03:52:47 [SEVERE] Could not pass event PLAYER_INTERACT to PreciousStones
    java.lang.NullPointerException
            at net.sacredlabyrinth.Phaed.PreciousStones.listeners.PSPlayerListener.onPlayerInteract(PSPlayerListener.java:99)
            at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.java:307)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:139)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:521)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
     
  10. Offline

    Keegan

    Can I make it so the sky cannon (iron block) only works redstone powered? So people can still use as decoration.

    On the subject, is there any way for someone to disable a pstone so it acts like it normally would? So they can use it as decoration? I saw /ps on/off, but im not sure if that enables/disables for the entier server. A command that just disables the 1 block would be nice.
     
  11. Offline

    Shalobee

    it only turns ps off so that when you place the block it doesn't turn into a ps stone so all you need to do is /ps off then place your decorative block

    on a different note I am having problems with my fields disappearing when i restart my server. It appears to only be new ones like they aren't being written to the mysql db. is there a way to manually save the stones?
     
  12. Offline

    phaed

    Run this query: ALTER TABLE pstone_fields DROP COLUMN packed_snitch_list;
     
  13. Offline

    Shalobee

    awesome THANKS just ran it. Will it save when i reload now or will we have to replace the stones one last time?
     
  14. Offline

    Benzene

    PS will save your stones now. Hopefully.

    Maybe even without a restart, as it was a MySQL error that was the problem.
     
  15. Offline

    cubesteak

    What if we are using SQLite? Same issue happening with it as well. No new fields are saved.

    To reproduce:
    Start server.
    Log in, place field.
    restart server
    no field present.

    Some extra info... After field is first placed,
    /ps info does show field.
    /ps visualize shows field as well.
    Right clicking protected blocks doesn't give field placement though.
    And, as stated, restarting the server, all field info is gone.
     
  16. Offline

    phaed

    Use http://www.sqlitemanager.org/ to run the query:

    Run this query: ALTER TABLE pstone_fields DROP COLUMN packed_snitch_list;
     
  17. Offline

    cubesteak

    Thank you! :)

    HMmm.. SQLite does not support the DROP COLUMN command. You can use the SQLite manager to just delete that column though, so the same thing can be accomplished in a bit of a round about way.

    Doing so did indeed solve the problem!

    Now I'm wondering why I no longer get any protection information when right clicking a protected block with a tool. Anything I should be looking for? My tools are outlined in the config.yml. Any thoughts on what to look for would be most appreciated.

    Thanks!

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

    Bronski

    Confirming no right-click info on 5.4.2, as well as continued error spam in the log:

    Code:
    07:57:44 [SEVERE] Could not pass event PLAYER_INTERACT to PreciousStones
    java.lang.NullPointerException
            at net.sacredlabyrinth.Phaed.PreciousStones.listeners.PSPlayerListener.onPlayerInteract(PSPlayerListener.java:99)
            at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.java:307)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:139)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:521)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    07:57:56 [SEVERE] Could not pass event PLAYER_INTERACT to PreciousStones
    java.lang.NullPointerException
            at net.sacredlabyrinth.Phaed.PreciousStones.listeners.PSPlayerListener.onPlayerInteract(PSPlayerListener.java:99)
            at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.java:307)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:139)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:782)
            at net.minecraft.server.Packet18ArmAnimation.a(SourceFile:35)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
     
  19. Hi, I have a little problem. When I reboot the server, the new "city protection" aren't saved... CB1000, PS5.4.2... Very anoying...
     
  20. Offline

    Jonchun

    JagCraft from jagcraft.tk is implementing PreciousStones now! :)
     
  21. Offline

    phaed

    Run this query: ALTER TABLE pstone_fields DROP COLUMN packed_snitch_list;
     
  22. Offline

    JayTheManiac

    Download link broken..? D:
     
  23. Offline

    roly

    where is the link to the .jar file?
     
  24. Offline

    Tim13211

    I cant get PS to work, and when I type /ps it says "syntax error". what do I do?
     
  25. Offline

    phaed

    Change log
    Version 5.4.3
    • Fixed: PLAYER_INTERACT npe
    • Fixed: Removed tagging
     
  26. Offline

    Monstertke

    Download link is broken?
     
  27. Offline

    Bronski

    The link is working ok for me.

    Thanks for the updates :D
     
  28. Offline

    Rowanzy

    my issue is that all players can place pstones i got permissionsbukkit and put all the nodes in and it wont work? i dont know how to fix it? is there a way to auto set every ones ps to off?
     
  29. Offline

    phaed

    Change log
    Version 5.5
    • Fixed: Client crash with /ps visualize, comes with config settings visualization.batch-size, visualization.batch-delay-ticks
    • Fixed: Client crash when reverting large areas at once, comes with config settings grief-undo.batch-size, grief-undo.batch-delay-ticks
    • Fixed: /ps revert only reporting the last world's numbers of orphans found
    • Fixed: Blocks placed with /ps off took money away from person placing them
    • Added: preciousstones.bypass.purchase permission to be able to place fields without purchasing them
    • Added: settings.blacklisted-worlds config, any worlds in this list will not allow pstones to be placed
    • Added: /ps mark - will send a visualization of a column to sky ontop of each of the player's pstones, comes with config settings visualization.mark-block-type, visualization.mark-chunk-radius
    • Added: Add field type info when right clicking blocks within fields with a tool
    • Added: You can now name blocks with the entryAlert flag (Proximity Snitch has it) using /ps setname, and the alert that it gives you when someone enters the field will contain the name
     
  30. Offline

    Akime

    I've been at it for the last few hours, can't seem to figure it out.

    Fresh install, 5.5 and 1060, no matter what I try and configure, any Pstone I set will not activate a field. No errors in console or debug. No text verifying the field, no fields being listed even. Not sure whats going on. -_-

    Using the SQLite option.
     
  31. Offline

    roly

    where is the download link to the .jar file to put in the plugins folder?

    all i can find is only the source code
     
Thread Status:
Not open for further replies.

Share This Page