WorldEdit PlayerInteractEvent Lag

Discussion in 'Spigot Plugin Help' started by Joedon, May 18, 2019.

  1. Hi,

    [​IMG]

    WorldEdit is lagging with their onPlayerInteract event. Why is this happening? There are no WorldEdit commands even being ran. Only thing I can think of is WorldGuard someone interfering, but that'd still make no sense.

    Any ideas why this is lagging so much? Dropped my TPS significantly.

    Edit: its both these two
    [​IMG]
     
    #1 Joedon, May 18, 2019
    Last edited: May 18, 2019
  2. md_5

    Administrator Developer

    That WorldEdit is pretty outdated isn't it?
    Seems like a question for the WorldEdit authors though
     
  3. It is, I'm running 1.9.4.

    This is the rest of the timings if it helps, but I couldnt find anything useful:
    [​IMG]
     
  4. Could these be coming from another plugin, and the timings are making it look like it's WorldGuard and WorldEdit? Or is it actually both of them lagging here.

    I'm still struggling to figure out why this is happening. Theres like 3 worlds players use, recently added the third one, but its never been these two plugins lagging. Could that be it though?
     
  5. Bump. Happened again today. Went from 19.95 tps, to 13tps over the course of 30 seconds or so, then gradually back up to around 16ish where its at now. WorldEdit and WorldGuard taking up like 40% of the server. What is going on? Are the timings incorrect and its actually another plugin using the WorldEdit/Guard APIs? Or is there some sort of compatibility issue with me having players in 3 worlds? I really have no idea right now.

    Same issue here: https://www.spigotmc.org/threads/onplayerinteract-of-worldedit-causing-lag.41537/
    and here: https://www.spigotmc.org/threads/worldguard-lag.148727/ but it was never resolved.

    Edit: This is not a versions issue either (unless I haven't tried like the literal only one that works), I've tried most of them. Somethings just wrong with both of these plugins - hopefully some sort of config issue that I can fix?

    I'm thinking it's because the majority of players are mining in a new world we released recently, let's call it world "C". "A" was A-Z mines, "B" was the plotworld, and now there's a lot of action in the "C" world, so maybe the plugins aren't loading it properly? Only thing I could think of.
     
    #5 Joedon, May 19, 2019
    Last edited: May 19, 2019
  6. md_5

    Administrator Developer

    I mean you're using an outdated server with outdated worldedit and outdated worldguard.
    Even if there is an issue, it would not be resolved for the versions you are using....
     
  7. Well I mean there has to be some fix, right? I used to play on 1.9 servers that used both these plugins with super high player counts, and they never had any lag. This is taking up 30-40% of my server with just like 10+ people mining.

    But those servers probably had custom made versions for big issues like this I'd assume.
     
  8. Ok since this thread is getting no replies, can someone at least answer if this could be caused by another plugin, and it's not actually WorldEdit or WorldGuard? Just the timings showing up wrong?
     
  9. You could try removing old outdated worldedit and worldguard and try this one:
    FAWE
    WouldGuard
     
    #9 Gasha, May 20, 2019
    Last edited: May 30, 2019
  10. Thanks, I guess I'll try FastAsyncWorldEdit instead of what I have now over tonight. But as I said earlier, the WorldGuard version didn't seem to help anything.
     
  11. Highly recommend NOT using FastAsyncWorldEdit as it is inherently unsafe in how it works, and frequently causes corrupt worlds and other issues.

    Timings (especially the version included in Spigot) is very often inaccurate. If you want to get a more accurate reading, use `/wg profile -p` and provide the link.

    Either way, you're using a very outdated version of WorldGuard. On 1.9.4 you should be using 6.2
     
  12. I respect your work but of course you will recommend WorldEdit because you are WorldEdit Developer


    I'm using FAWE for years and didn't had any major issues (not bigger then when with WorldEdit and i tested so many version of regular WorldEdit since 2010 always had issues, except last time year ago then it was fine but i compared it to FAWE and FAWE is faster and have more features for protection so i decide to use FAWE)
    Besides its faster then regular WorldEdit also have special feature to prevent abuse
    FAWE can prevent players from abusing //wand, //copy,//cut, //paste with containers filled with items (NBT)

    Code (Text):
        # List of blocks to strip nbt from
        strip-nbt:
        - "Items"
        - "Item"
        - "ArmorItems"
        - "HandItems"
        - "Equipment"

    WorldEdit don't have that feature, worldguard & worldedit exist for almost 10 years and still not fully translatable..if you decide to add same ability to prevent players from duplicating items with //copy, //cut, //paste with bypass permission i will switch to your WorldEdit right away and recommend WorldEdit to everyone
     
    #12 Gasha, May 30, 2019
    Last edited: May 30, 2019
  13. I recommend WorldEdit over it because I'm sick of dealing with the constant error reports I get given that are caused by it.

    WorldEdit wasn't actively worked on for a few years, however translations are being worked on (and almost setup). The reason WorldEdit isn't as fast as FAWE is because WorldEdit is safe, and that's the main goal of it. The way FAWE works is inherently unsafe, hence why it causes issues.

    I don't really understand how it's possible to prevent abuse of copy to duplicate things? The entire point of it is to duplicate? It doesn't make sense to prevent items when you can dupe blocks?
     
    • Agree Agree x 1
  14. Okay, I respect that..So you do plan to add ability to translate messages? Do you know when (approx.)

    Could you please add that ability to prevent abuse of duplication using //copy, //cut, //paste, //undo, //redo

    i'll explain duplication

    example you gave staff ability to use //wand and //copy,//cut,//paste and in survival mode they put diamonds & other items in chest and select chest with worldedit tool (wooden axe) and type //copy and then //paste...it will copy that container (chest) with items in it..then they can type //undo and //redo and repeat it...or simply //paste it multiple times

    This can be fixed if you create permission that only players with permission are able to copy items from containers, if player without that permission tries to copy/cut containers with items it will copy/cut containers but they won't be filled with items

    i explained this to Empire92 (Jesse owner of FAWE) and he added nbt-strip feature to prevent duplication abuse + he add permission to bypass it

    Are you maybe able to do same thing? to protect worldedit, since you said that your main goal for plugin is to be safe, currently its not safe if there is that ability to duplicate items

    The regular blocks are not important, only containers with items are important, my CreativeSecurity plugin already have ability to mark all WorldEdit actions as creative, except for those with bypass permissions, so all blocks are creative also containers are marked but they still can duplicate with worldedit, thats why i contacted FAWE owner to do something about it and he did fixed it..i hope you will be able to do the same thing, that fix is very important
     
  15. I've added that NBT stripping thing, and a permission node.

    By safe, I didn't mean can be used in survival without duping, I meant the goal is to perform edits reliably and doesn't corrupt worlds.

    As for i18n, it is coming soon. Efforts have already been made to allow it. However, I want it to be done correctly. Different languages handle a tonne of things differently, and I want to make sure WorldEdit is as understandable in any language as it is in English. This will make it take a bit longer than simply allowing text to be switched out.

    Currently, in the dev branch with translations, it just does text switching for whichever language the user has selected in their MC settings.
     
    • Friendly Friendly x 1
  16. I just tested it and its working nice..thank you very much..i really appreciate it
     
  17. I have tried both my friend and i can ensure you that yes using FAWE i have gotten a corrupted world. I Would definitely not recommended. WorldEdit and VoxelSniper are the tops.