Spigot ProtectionStones [Updated for 1.13 - 1.17 + WG7] 2.8.5

The easiest grief prevention method that players will enjoy!

  1. right, i can't read...
    In this case, it may even just be simpler for you to have a small custom plugin that hooks into ProtectionStones's API event and runs it. You will also get access to more data if you need it.
     
  2. Wait, is /pos1 and /pos2 actually able to be used in the console? I'm not really sure if you can define worldguard regions like that.

    Have you tried running those commands in the console manually? Otherwise I do recommend making a small custom plugin for this, since adding this into ProtectionStones is kind of beyond the scope of this plugin. I can give you pointers on hooking into ProtectionStones.
     
  3. potentially looping through on_region_create: and the key value is the tick delay used (I've never done java programming and havent touched python in a while so im not strong with the symtax here, should be pretty simple in the LinstenerClass)
    Just trying to help out is all, I appreciate your dedication to this amazing plugin

    on_region_create = [
    '0': [
    'console_command: /world world',
    'console_command: /pos1 %block_x%,%block_y%,%block_z%',
    'console_command: /pos2 %block_x%,%block_y%,%block_z%',
    'console_command: rg d core-%block_x%-%block_y%-%block_z% %player%',
    ],
    '1': [
    'console_command: rg flag core-%block_x%-%block_y%-%block_z% coral-fade deny',
    ]
    ]
     
    #983 Gunnthorian, Nov 16, 2020
    Last edited: Nov 16, 2020
  4. yes the WorldEdit devs told me this is officially supported in the newer versions
     
  5. Okay I just tested with the config you gave and the patch commit I did and it was able to run?
    I do get an error that "a player is expected" but that might be because i'm running an older version of worldguard.
     
  6. my appologies the config I gave was only a suggestion, the ListenerClass.java would need to be able to loop through the keys in on_region_create and use the key value as a tick delay, I would propose a change to the ListenerClass if I had some java background
     
  7. I don't totally understand why each command needs a tick delay, they do run one after the other, not simultaneously
     
  8. according to worldguard devs:
    "yes, WG commands generally aren't atomic
    especially things like creating a region where there's a potential need to do name lookups"

    they do run one after another but some commands people may use arent instantaneous.

    crude portion of OnPSCreate:

    // run on next tick (after the region is created to allow for edits to the region)
    for (String tick_delay : event.getRegion().getTypeOptions().regionCreateCommands) {
    Bukkit.getServer().getScheduler().runTask(ProtectionStones.getInstance(), () -> { // somewhere here turn tick_delay to int and use it as delay
    // run custom commands (in config)
    for (String action : tick_delay) { // not exactly sure how java treats dictionaries or nested arrays
    execEvent(action, event.getPlayer(), event.getPlayer().getName(), event.getRegion());
    }
    });
    }
     
  9. Okay the issue would then be that it isn't bound to ticks (they likely have some background thread doing this), and so there would always be a chance of the command still not being synced properly. If there is a command to force-save, this might work, but this is really a case for doing it as a custom plugin, rather than using commands.
     
  10. okay, I appreciate your time, ill look into potenitally making a custom plugin for this
     
  11. you'll likely want this event the PSCreateEvent in ProtectionStones.
    View javadocs here: https://jdps.espi.dev
     
    • Useful Useful x 1
  12. I think this should fix it, https://ci.espi.dev/job/ProtectionStones/301/
     
  13. Hello there I'm the guy that made the comment about the banners, I try to use it before with banners and the think that I made is to prevent the block where the banner is located unbreakable
     
  14. Do you have any builds which are compatible with 1.12.2? @EspiDev
     
  15. Quoted from #info in ProtectionStones of the MOSS server:

     
  16. as far as i know @EspiDev my 1.12.2 versions are still around and work, just a couple minor bugs here an there

    Edit
    never mind i deleted the old fork awhile back
    if you want i can remake it pretty easily just have to update worldguard hooks an thats all honestly
     
  17. From latest update: "Adjust no moving when waiting for teleport threshold to be slightly more lenient..."
    Unfortunately, the issues are still occurring. When option "no_moving_when_tp_waiting" is set to "true" some players can't teleport. After typing "/ps home [...]" it immediately denies the teleportation, and says that player has moved, while the player hasn't moved. It doesn't affect all accounts, just some of them. I have no idea why :/
     
  18. Sorry for the late response, if you could open an issue on GitHub, it would make it easier for me to keep track.

    This is quite strange though... if you have a specific scenario where you can replicate it please describe (on a certain block maybe?)
     
  19. Okey, done
     
  20. https://github.com/espidev/ProtectionStones/issues/235

    Merged regions improper WorldGuard region area #235

    For example, protection stone size 11x11x11

    If player places one protection stone at coordinates:
    x: 100, y: 100, z: 100
    Then protected area is x: 95-105, y: 95-105, z: 95-105

    And places another block at:
    x: 105, y: 105, z: 105

    And merges with another block, then "z" coordinate isn't proper, it goes from 0 to 255 not the way it should be.
    So new region would be (and should not be):
    x: 95-110, y: 0-255, z: 95-110

    I think merging should be reworked so it does NOT remove another WorldGuard region, when merging.
    Multiple areas should be still in place and merged info should be separate.
    At this moment I restricted merging because of that.