mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 15:16:45 +01:00
parent
f22874970f
commit
6006b0e011
@ -16,6 +16,16 @@ public abstract class EconHandler {
|
|||||||
public abstract void withdrawMoney(PlotPlayer player, double amount);
|
public abstract void withdrawMoney(PlotPlayer player, double amount);
|
||||||
public abstract void depositMoney(PlotPlayer player, double amount);
|
public abstract void depositMoney(PlotPlayer player, double amount);
|
||||||
public abstract void depositMoney(OfflinePlotPlayer player, double amount);
|
public abstract void depositMoney(OfflinePlotPlayer player, double amount);
|
||||||
public abstract void setPermission(String player, String perm, boolean value);
|
|
||||||
public abstract boolean hasPermission(String player, String perm);
|
public void setPermission(String player, String perm, boolean value) {
|
||||||
|
setPermission(null, player, perm, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract void setPermission(String world, String player, String perm, boolean value);
|
||||||
|
|
||||||
|
public abstract boolean hasPermission(String world, String player, String perm);
|
||||||
|
|
||||||
|
public boolean hasPermission(String player, String perm) {
|
||||||
|
return hasPermission(null, player, perm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,17 +78,17 @@ public class BukkitEconHandler extends EconHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setPermission(String player, String perm, boolean value) {
|
public void setPermission(String world, String player, String perm, boolean value) {
|
||||||
if (value) {
|
if (value) {
|
||||||
perms.playerAdd((World) null, player, perm);
|
perms.playerAdd(world, player, perm);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
perms.playerRemove((World) null, player, perm);
|
perms.playerRemove(world, player, perm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasPermission(String player, String perm) {
|
public boolean hasPermission(String world, String player, String perm) {
|
||||||
return perms.playerHas((String) null, Bukkit.getOfflinePlayer(player), perm);
|
return perms.playerHas(world, Bukkit.getOfflinePlayer(player), perm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user