mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 19:55:48 +00:00
Reduce to local scoop
This commit is contained in:
parent
b042fbd3a4
commit
64684d86c3
@ -46,9 +46,11 @@ public class ResurrectedTalisman extends Talisman {
|
||||
return e -> {
|
||||
Location currentLoc = e.getPlayer().getLocation();
|
||||
JsonObject json = createJsonFromLocation(currentLoc);
|
||||
|
||||
if (SlimefunPlugin.getProtectionManager().hasPermission(e.getPlayer(), currentLoc, ProtectableAction.PLACE_BLOCK)
|
||||
&& e.getItem().hasItemMeta()) {
|
||||
ItemMeta itemMeta = e.getItem().getItemMeta();
|
||||
|
||||
if (SlimefunPlugin.getProtectionManager().hasPermission(e.getPlayer(), currentLoc, ProtectableAction.PLACE_BLOCK)) {
|
||||
itemMeta.getPersistentDataContainer().set(locationKey, PersistentJsonDataType.JSON_OBJECT, json);
|
||||
e.getItem().setItemMeta(itemMeta);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user