1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

Flip the parameters

By checking if the unique id as a string equals the locationinfo, we avoid the null pointer exception, this is how it is achieved in this same class line 177
This commit is contained in:
JustAHuman-xD 2023-03-02 08:17:48 -06:00
parent 137cdc94bf
commit e32f95bc56

View File

@ -94,7 +94,7 @@ public class ProgrammableAndroid extends SlimefunItem implements InventoryBlock,
@Override
public boolean canOpen(Block b, Player p) {
boolean open = BlockStorage.getLocationInfo(b.getLocation(), "owner").equals(p.getUniqueId().toString()) || p.hasPermission("slimefun.android.bypass");
boolean open = p.getUniqueId().toString().equals(BlockStorage.getLocationInfo(b.getLocation(), "owner")) || p.hasPermission("slimefun.android.bypass");
if (!open) {
Slimefun.getLocalization().sendMessage(p, "inventory.no-access", true);