fix death owner not picking up item

This commit is contained in:
Flemmli97 2021-06-09 12:57:18 +02:00
parent 03dfd44380
commit 345fc2256f
4 changed files with 16 additions and 3 deletions

View File

@ -1,3 +1,16 @@
Flan 1.4.1
======================
- Change globalDefaultPerms to use a version where you can specify if its modifiable or not
Valid values are:
ALLTRUE: Permission is true everywhere and players are unable to change it in claims
ALLFALSE: Permission is false everywhere and players are unable to change it in claims
TRUE: Permission is true in non claimed areas
FALSE: Permission is false in non claimed areas
Old configs will get auto converted: false -> ALLFALSE and true -> ALLTRUE
Basically now a worldguard version
- Add locking items when the player dies so other players cant pick it up.
Use /flan unlockItems to allow it.
Flan 1.4.0
======================
- Add FLIGHT permission. Prevents non creative flight in claims

View File

@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx2G
loader_version=0.9.1+build.205
# Mod Properties
mod_version = 1.4.0
mod_version = 1.4.1
maven_group = com.flemmli97.flan
archives_base_name = flan

View File

@ -220,7 +220,7 @@ public class EntityInteractEvents {
ServerPlayerEntity other = sPlayer.getServer().getPlayerManager().getPlayer(ownedItem.getDeathPlayer());
if (other == null)
return false;
return PlayerClaimData.get(other).deathItemsUnlocked();
return ownedItem.getDeathPlayer().equals(player.getUuid()) || PlayerClaimData.get(other).deathItemsUnlocked();
}
if (sPlayer.getUuid().equals(ownedItem.getPlayerOrigin()))
return true;

View File

@ -63,7 +63,7 @@ public class PersonalGroupScreenHandler extends ServerOnlyScreenHandler {
} else if (i < 9 || i > 44 || i % 9 == 0 || i % 9 == 8)
inv.setStack(i, ServerScreenHelper.emptyFiller());
else {
List<String> groups = new ArrayList<>(PlayerClaimData.get(player).playerDefaultGroups().keySet());
List<String> groups = new ArrayList<>(PlayerClaimData.get((ServerPlayerEntity) player).playerDefaultGroups().keySet());
groups.sort(null);
int row = i / 9 - 1;
int id = (i % 9) + row * 7 - 1;