mirror of
https://github.com/Zrips/Jobs.git
synced 2025-02-19 05:42:01 +01:00
clearownership fix when using target player name without permission
This commit is contained in:
parent
2165e1fe68
commit
bd430b3cd7
@ -24,10 +24,15 @@ public class clearownership implements Cmd {
|
||||
|
||||
for (String one : args) {
|
||||
|
||||
if (!one.contains(":") && jPlayer == null && !sender.getName().equalsIgnoreCase(one) && Jobs.hasPermission(sender, "jobs.command.admin.clearownership", true)) {
|
||||
if (!one.contains(":") && jPlayer == null) {
|
||||
|
||||
jPlayer = Jobs.getPlayerManager().getJobsPlayer(args[0]);
|
||||
if (jPlayer != null)
|
||||
|
||||
if (jPlayer != null) {
|
||||
if (!sender.getName().equalsIgnoreCase(one) && !Jobs.hasPermission(sender, "jobs.command.admin.clearownership", true))
|
||||
return true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (one.contains(":") && location == null) {
|
||||
|
@ -279,7 +279,7 @@ public class ShopManager {
|
||||
player.sendMessage(Jobs.getLanguage().getMessage("command.shop.info.Paid", "%amount%", item.getPointPrice()));
|
||||
}
|
||||
if (item.getVaultPrice() > 0) {
|
||||
jPlayer.withdraw(item.getPointPrice());
|
||||
jPlayer.withdraw(item.getVaultPrice());
|
||||
player.sendMessage(Jobs.getLanguage().getMessage("command.shop.info.Paid", "%amount%", Jobs.getEconomy().getEconomy().format(item.getVaultPrice())));
|
||||
}
|
||||
openShopGui(player, page);
|
||||
|
Loading…
Reference in New Issue
Block a user