mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +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:
parent
137cdc94bf
commit
e32f95bc56
@ -94,7 +94,7 @@ public class ProgrammableAndroid extends SlimefunItem implements InventoryBlock,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canOpen(Block b, Player p) {
|
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) {
|
if (!open) {
|
||||||
Slimefun.getLocalization().sendMessage(p, "inventory.no-access", true);
|
Slimefun.getLocalization().sendMessage(p, "inventory.no-access", true);
|
||||||
|
Loading…
Reference in New Issue
Block a user