BentoBoxWorld / BentoBox

Expandable Minecraft server plugin for island-type games like SkyBlock or AcidIsland.
https://bentobox.world
Eclipse Public License 2.0
334 stars 136 forks source link

Players are losing access to their islands #549

Closed myavuzokumus closed 5 years ago

myavuzokumus commented 5 years ago

Description After the player opens the island, the island records are deleted and they cannot break the islands. And saying "Island protected." I tested with 10 player.

Expected behavior When the players open the island, the island records are not deleted.

Server Information:

tlhkyhn commented 5 years ago

I have the same problem on my server, please stop dealing with small problems. This is a very big problem. No answer for this topic for 3 days.

Poslovitch commented 5 years ago

@tlhkyhn We're dealing with problems we have the time and the will to deal with. We're working on BentoBox as a hobby. Period.

Instead of complaining of our lack of answer, you should have better worked on your side to provide us logs, evidences of the bug happening and reproduction steps.

smmmadden commented 5 years ago

In addition to what @Poslovitch stated, which build are you using for PaperSpigot? I'm running the exact same with Build 523 on Windows without this issue.
1 - Is this a new server setup for BSkyBlock or was this working previously but now broke after you upgraded something? Reverse out any changes to confirm what breaks it. 2 - since we have no visibility into your server setup, make sure that you have enabled all the correct permissions given your server is Linux. 3 - what permission system are you using and did you grant all the users the correct permissions? If players cannot break blocks, that's a permissions or server setup issue. 4 - Let's assume the first two issues are not causing this behavior. Have you done a clean restart and gone through the logs to ensure there are NO Errors, Exceptions or Fatal Errors during startup? Provide a link to pastebin or hastebin with the full startup log so we can help you if you cannot find the problem. Make sure the logs indicate where islands are being deleted. Hope this helps!

myavuzokumus commented 5 years ago

1- I used last paper spigot on papermc.io. Version 525. 2- All permission are giving to player group. 3- I always tried clear database and worlds. 4- No error on console or log. 5- I'm using linux and updated. And problem it contiunes...

myavuzokumus commented 5 years ago

Player create the island and in few minutes island saying "Island protected". I used last snapshot bentobox version and other addon version.

Poslovitch commented 5 years ago

Latest = means nothing. Proof being that someone said "latest" on GitHub and they weren't using what I was expecting "latest" version to be.

myavuzokumus commented 5 years ago

@Poslovitch yes you are developer bentobox for a hobby. But we are using this plugin and we want the best this plugin.

Poslovitch commented 5 years ago

According to @OverBrave on Discord:

I play with 3 game mode in server. CaveBlock, SkyBlock, Acid Island. After #800 version, the islands are automatically deleted. But I'm using 800 now. And no problem.

[...] I tried 806

Therefore, it means that the bug has been likely brought by one of the red-framed builds: image

Poslovitch commented 5 years ago

Got confirmation the bug happens as of #801:

This problem on #801 @Poslovitch

LavRad commented 5 years ago

When new players try to make an island: http://prntscr.com/mmsxjk

Player's aren't able to edit their islands, and new players are not able to create them. The issue I mentioned in https://github.com/BentoBoxWorld/BentoBox/issues/561 "(Some players are also reporting being "Protected" from editing their own island, maybe a side effect?)" Is occurring for me too.

tlhkyhn commented 5 years ago

I want to go there if there is an altarnetif universe that you have solved this problem. There is no improvement for this problem for months.

Poslovitch commented 5 years ago

Ran some tests on a server that just launched.

Versions: (they are using MARIADB as database) image

Tried to unregister and register them: image

Running /bsb info image

Running /bsb info anna171202 image

So I turned on the protection debug debug:

[15:28:25] [Server thread/INFO]: [BentoBox] Why: BlockBreakEvent in world BSkyBlock_world at -1609,134,-1591
[15:28:25] [Server thread/INFO]: [BentoBox] Why: anna171202 BREAK_BLOCKS - NOT_ALLOWED_IN_WORLD
[15:28:27] [Server thread/INFO]: [BentoBox] Why: BlockBreakEvent in world BSkyBlock_world at -1609,134,-1591
[15:28:27] [Server thread/INFO]: [BentoBox] Why: anna171202 BREAK_BLOCKS - NOT_ALLOWED_IN_WORLD
[15:28:36] [Server thread/INFO]: [BentoBox] Why: BlockBreakEvent in world BSkyBlock_world at -1609,134,-1591
[15:28:36] [Server thread/INFO]: [BentoBox] Why: anna171202 BREAK_BLOCKS - NOT_ALLOWED_IN_WORLD

I don't understand the results I'm getting. Only /is reset seems to fix the bug, yet temporarily, as they'll soon loose again access to their islands.

Here's the data from the Players file:

{
   "homeLocations":[
      [
         [
            "BSkyBlock_world",
            -1599.5,
            129.0,
            -1599.5,
            0.0,
            0.0
         ],
         1
      ]
   ],
   "uniqueId":"d1e159ed-5e0f-4dc1-8c8a-0ff138ce883c",
   "playerName":"anna171202",
   "resets":{
      "BSkyBlock_world":0
   },
   "locale":"",
   "deaths":{
      "BSkyBlock_world":0
   }
}

And here's the data from the Island's file:

{
   "uniqueId":"BSkyBlockabf39014-a627-4eb0-b63b-0826fdbd71dc",
   "center":[
      "BSkyBlock_world",
      -1600.0,
      120.0,
      -1600.0,
      0.0,
      0.0
   ],
   "range":400,
   "protectionRange":150,
   "maxEverProtectionRange":150,
   "world":"BSkyBlock_world",
   "name":null,
   "createdDate":1550672738771,
   "updatedDate":1550672738771,
   "owner":"d1e159ed-5e0f-4dc1-8c8a-0ff138ce883c",
   "members":{
      "d1e159ed-5e0f-4dc1-8c8a-0ff138ce883c":1000
   },
   "spawn":false,
   "purgeProtected":false,
   "flags":{

   },
   "history":[

   ],
   "levelHandicap":0,
   "spawnPoint":{

   },
   "doNotLoad":false
}

Quick edit! I found the old Island file still present in the database:

{
   "uniqueId":"BSkyBlockfb6b2f77-02c3-4f55-9e60-bec9b3a54143",
   "center":[
      "BSkyBlock_world",
      -1596.0,
      120.0,
      -1596.0,
      0.0,
      0.0
   ],
   "range":400,
   "protectionRange":150,
   "maxEverProtectionRange":150,
   "world":"BSkyBlock_world",
   "name":null,
   "createdDate":1550669826095,
   "updatedDate":1550669826095,
   "owner":null,
   "members":{

   },
   "spawn":false,
   "purgeProtected":false,
   "flags":{
      "TURTLE_EGGS":500,
      "CRAFTING":500,
      "LEASH":500,
      "FISH_SCOOPING":500,
      "MONSTER_SPAWN":0,
      "MILKING":500,
      "CROP_TRAMPLE":500,
      "BREAK_BLOCKS":500,
      "FIRE_EXTINGUISH":500,
      "RIDING":500,
      "EXPERIENCE_PICKUP":500,
      "PLACE_BLOCKS":500,
      "HOPPER":500,
      "EGGS":500,
      "HURT_MONSTERS":500,
      "ENCHANTING":500,
      "ARMOR_STAND":500,
      "DISPENSER":500,
      "REDSTONE":500,
      "ANVIL":500,
      "CONTAINER":500,
      "ITEM_PICKUP":500,
      "HURT_VILLAGERS":500,
      "FIRE_BURNING":0,
      "TNT":500,
      "BUTTON":500,
      "END_PORTAL":500,
      "FIRE_SPREAD":0,
      "BREEDING":500,
      "BREWING":500,
      "GATE":500,
      "PVP_NETHER":-1,
      "PVP_OVERWORLD":-1,
      "COLLECT_LAVA":500,
      "TRAPDOOR":500,
      "ENDER_PEARL":500,
      "NETHER_PORTAL":500,
      "FLINT_AND_STEEL":500,
      "PRESSURE_PLATE":500,
      "CHORUS_FRUIT":500,
      "BED":500,
      "NAME_TAG":500,
      "FURNACE":500,
      "SHEARING":500,
      "COLLECT_WATER":500,
      "FIRE_IGNITE":0,
      "JUKEBOX":500,
      "POTION_THROWING":500,
      "ITEM_DROP":500,
      "ANIMAL_SPAWN":0,
      "HURT_ANIMALS":500,
      "DROPPER":500,
      "MINECART":500,
      "LEVER":500,
      "PVP_END":-1,
      "DOOR":500,
      "MOUNT_INVENTORY":500,
      "BOAT":500,
      "BUCKET":500,
      "SPAWN_EGGS":500,
      "FROST_WALKER":500,
      "TRADING":500,
      "LOCK":0,
      "BEACON":500,
      "ITEM_FRAME":500,
      "NOTE_BLOCK":500
   },
   "history":[
      {

      }
   ],
   "levelHandicap":0,
   "spawnPoint":{

   },
   "doNotLoad":false
}

Is that a bug as well? ...

Poslovitch commented 5 years ago

Another thing that may be interesting to know is that another player has lost the access to his island (we're still on the same server setup). Here are his files:

Players:

{
   "homeLocations":[
      [
         [
            "BSkyBlock_world",
            -1595.0,
            131.0,
            -795.0,
            0.0,
            0.0
         ],
         1
      ]
   ],
   "uniqueId":"a550b990-e5a7-4472-91da-8da8108abfb4",
   "playerName":"Dovacube_",
   "resets":{
      "BSkyBlock_world":1
   },
   "locale":"",
   "deaths":{

   }
}

Island:

{
   "uniqueId":"BSkyBlockf8f4ac76-e946-4a90-b279-db83c374d029",
   "center":[
      "BSkyBlock_world",
      -1595.5,
      120.0,
      -795.5,
      0.0,
      0.0
   ],
   "range":400,
   "protectionRange":150,
   "maxEverProtectionRange":150,
   "world":"BSkyBlock_world",
   "name":null,
   "createdDate":1550670935847,
   "updatedDate":1550670935847,
   "owner":"a550b990-e5a7-4472-91da-8da8108abfb4",
   "members":{
      "a550b990-e5a7-4472-91da-8da8108abfb4":1000
   },
   "spawn":false,
   "purgeProtected":false,
   "flags":{
      "TURTLE_EGGS":500,
      "CRAFTING":500,
      "LEASH":500,
      "FISH_SCOOPING":500,
      "MONSTER_SPAWN":0,
      "MILKING":500,
      "CROP_TRAMPLE":500,
      "BREAK_BLOCKS":500,
      "FIRE_EXTINGUISH":500,
      "RIDING":500,
      "EXPERIENCE_PICKUP":500,
      "PLACE_BLOCKS":500,
      "HOPPER":500,
      "EGGS":500,
      "HURT_MONSTERS":500,
      "ENCHANTING":500,
      "ARMOR_STAND":500,
      "DISPENSER":500,
      "REDSTONE":500,
      "ANVIL":500,
      "CONTAINER":500,
      "ITEM_PICKUP":500,
      "HURT_VILLAGERS":500,
      "FIRE_BURNING":0,
      "TNT":500,
      "BUTTON":500,
      "END_PORTAL":500,
      "FIRE_SPREAD":0,
      "BREEDING":500,
      "BREWING":500,
      "GATE":500,
      "PVP_NETHER":-1,
      "PVP_OVERWORLD":-1,
      "COLLECT_LAVA":500,
      "TRAPDOOR":500,
      "ENDER_PEARL":500,
      "NETHER_PORTAL":500,
      "FLINT_AND_STEEL":500,
      "PRESSURE_PLATE":500,
      "CHORUS_FRUIT":500,
      "BED":500,
      "NAME_TAG":500,
      "FURNACE":500,
      "SHEARING":500,
      "COLLECT_WATER":500,
      "FIRE_IGNITE":0,
      "JUKEBOX":500,
      "POTION_THROWING":500,
      "ITEM_DROP":500,
      "ANIMAL_SPAWN":0,
      "HURT_ANIMALS":500,
      "DROPPER":500,
      "MINECART":500,
      "LEVER":500,
      "PVP_END":-1,
      "DOOR":500,
      "MOUNT_INVENTORY":500,
      "BOAT":500,
      "BUCKET":500,
      "SPAWN_EGGS":500,
      "FROST_WALKER":500,
      "TRADING":500,
      "LOCK":0,
      "BEACON":500,
      "ITEM_FRAME":500,
      "NOTE_BLOCK":500
   },
   "history":[

   ],
   "levelHandicap":0,
   "spawnPoint":{

   },
   "doNotLoad":false
}
tastybento commented 5 years ago

@Poslovitch This is my bad. The code to set the home location was shifting the island locations 0.5 every time. Basically, all island centers that are not factors of 400 in the above example are in the wrong location. They need to be deleted or reset back.

tastybento commented 5 years ago

By the way, I think this is a good time to say that using the latest development build brings with it risks that bugs like this will happen. The development branch is not a production branch and bugs will occur as we work on development. I appreciate admins trying out the software, but do not assume that it is safe to use in a production environment.

Poslovitch commented 5 years ago

Just tested it on a server. The bug seems to happen less, but a player is still complaining, here is what I've got:

/bsb tp anna171202 image

/bsb info anna171202 image

/bsb info (when standing in her island): image

Here island file:

{
   "uniqueId":"BSkyBlock51ca7d0e-1455-49a4-9ecf-31f66b5edcc9",
   "center":[
      "BSkyBlock_world",
      800.0,
      120.0,
      0.0,
      0.0,
      0.0
   ],
   "range":400,
   "protectionRange":150,
   "maxEverProtectionRange":150,
   "world":"BSkyBlock_world",
   "name":null,
   "createdDate":1550694312141,
   "updatedDate":1550694312141,
   "owner":"d1e159ed-5e0f-4dc1-8c8a-0ff138ce883c",
   "members":{
      "d1e159ed-5e0f-4dc1-8c8a-0ff138ce883c":1000
   },
   "spawn":false,
   "purgeProtected":false,
   "flags":{
      "COLLECT_WATER":500,
      "HURT_MONSTERS":500,
      "ANIMAL_SPAWN":0,
      "PVP_END":-1,
      "FURNACE":500,
      "HURT_ANIMALS":500,
      "PLACE_BLOCKS":500,
      "BREEDING":500,
      "MINECART":500,
      "BEACON":500,
      "LOCK":0,
      "PVP_OVERWORLD":-1,
      "PVP_NETHER":-1,
      "ITEM_PICKUP":500,
      "NETHER_PORTAL":500,
      "ITEM_DROP":500,
      "FIRE_IGNITE":0,
      "BREWING":500,
      "LEASH":500,
      "TURTLE_EGGS":500,
      "FIRE_EXTINGUISH":500,
      "MILKING":500,
      "FIRE_SPREAD":0,
      "FROST_WALKER":500,
      "PRESSURE_PLATE":500,
      "FLINT_AND_STEEL":500,
      "BOAT":500,
      "NOTE_BLOCK":500,
      "ITEM_FRAME":500,
      "BREAK_BLOCKS":500,
      "LEVER":500,
      "DOOR":500,
      "SPAWN_EGGS":500,
      "MOUNT_INVENTORY":500,
      "TRAPDOOR":500,
      "DROPPER":500,
      "ARMOR_STAND":500,
      "CONTAINER":500,
      "TRADING":500,
      "ENCHANTING":500,
      "POTION_THROWING":500,
      "JUKEBOX":500,
      "EXPERIENCE_PICKUP":500,
      "HOPPER":500,
      "CHORUS_FRUIT":500,
      "RIDING":500,
      "SHEARING":500,
      "NAME_TAG":500,
      "BUCKET":500,
      "BED":500,
      "ENDER_PEARL":500,
      "FIRE_BURNING":0,
      "GATE":500,
      "CROP_TRAMPLE":500,
      "HURT_VILLAGERS":500,
      "EGGS":500,
      "CRAFTING":500,
      "COLLECT_LAVA":500,
      "TNT":500,
      "FISH_SCOOPING":500,
      "ANVIL":500,
      "REDSTONE":500,
      "MONSTER_SPAWN":0,
      "END_PORTAL":500,
      "DISPENSER":500,
      "BUTTON":500
   },
   "history":[

   ],
   "levelHandicap":0,
   "spawnPoint":{

   },
   "doNotLoad":false
}

And here is here Players file:

{
   "homeLocations":[
      [
         [
            "BSkyBlock_world",
            800.5,
            130.0,
            0.5,
            0.0,
            0.0
         ],
         1
      ]
   ],
   "uniqueId":"d1e159ed-5e0f-4dc1-8c8a-0ff138ce883c",
   "playerName":"anna171202",
   "resets":{
      "BSkyBlock_world":1
   },
   "locale":"",
   "deaths":{

   }
}
Poslovitch commented 5 years ago

@tastybento Should I try to /bsb unregister then /bsb register them?

tastybento commented 5 years ago

@Poslovitch Let's take this step by step:

/bsb tp anna171202 says there's no safe warp. Is there an island there?

Poslovitch commented 5 years ago

Yup, there is!

image

tastybento commented 5 years ago

What I suspect is happening is that there could be another adjacent island that is overlapping her island. So, when the server loads islands hers is not being loaded. Do you see the overlapping island reports in console?

Poslovitch commented 5 years ago

She resetted her island after joining the server. There hasn't been any reports in the console. Both on startup and when she resetted her island.

tastybento commented 5 years ago

I have to be honest: This bug will have screwed up all the islands made since it was done. They will all have an off-gridline coordinates so their range will overlap adjacent islands.

I would recommend trying to unregister and re-register, but you may also want to have all new islands start somewhere far away from other ones by changing startx and startz in config.yml to a big number.

Poslovitch commented 5 years ago

Tried to unregister/register them. Failed.

Breakdown of the commands I've used: /bsb unregister anna171202 /bsb unregister anna171202 /bsb register anna171202 /bsb register anna171202 /bsb info /bsb info anna171202 image

But I've got this: image

tastybento commented 5 years ago

Yes, like I said, there are likely adjacent island around that location that are overlapping. Options are:

  1. Set startx and startz in config.yml and have her reset
  2. Go through the database and try to align all islands to their nearest real grid line coodinates.

For the second option, I can try and write some code to nudge islands to their correct coordinates. Let me look at doing that.

Also, I'll fix that NPE.

Poslovitch commented 5 years ago

I'd say: fix the NPE first. In my opinion, it's a waste of time to code that "data fixer" thing. Dev builds are dev builds, and while it made sense to do a similar fix in 1.1/1.2.0 to fix the LogEntry serialization, it's pointless to fix something from a dev build. Let's make this thing a painful experience for everyone - dev builds are dangerous: server owners should take backup and us developers should be a bit more vigilant on what we commit.

tastybento commented 5 years ago

NPE fixed here: https://github.com/BentoBoxWorld/BentoBox/commit/30e3dbf26949587da82ecf7fdc86aec363bf9707

Poslovitch commented 5 years ago

Okay, so the server I was monitoring did a full restart. Everything's green right now, and anna171202 now has her island she can fully interact with.

I'd like to close this issue, but it'd be better to gather more feedback. Though, I'm afraid that not doing the data fixer will prevent @OverBrave and @wellnesscookie from telling us if that's working now :/

tastybento commented 5 years ago

@Poslovitch I did the data fixer. It's not a bad idea to have a check done on incoming data to make sure it's on the right grid lines.

Poslovitch commented 5 years ago

The fix's been running fine on the server I was working on for the last 12 hours, and @OverBrave told us on Discord it was working fine as well. Closing.