mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2025-03-12 22:49:07 +01:00
Fix nicknames
This commit is contained in:
parent
75c6e37446
commit
1bbf293379
@ -3,7 +3,6 @@ package com.Acrobot.ChestShop.Listeners.Economy;
|
|||||||
import com.Acrobot.ChestShop.ChestShop;
|
import com.Acrobot.ChestShop.ChestShop;
|
||||||
import com.Acrobot.ChestShop.Events.Economy.*;
|
import com.Acrobot.ChestShop.Events.Economy.*;
|
||||||
import com.Acrobot.ChestShop.UUIDs.NameManager;
|
import com.Acrobot.ChestShop.UUIDs.NameManager;
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
@ -22,7 +21,7 @@ public class ServerAccountCorrector implements Listener {
|
|||||||
public static void onCurrencyAdd(CurrencyAddEvent event) {
|
public static void onCurrencyAdd(CurrencyAddEvent event) {
|
||||||
UUID target = event.getTarget();
|
UUID target = event.getTarget();
|
||||||
|
|
||||||
if (!NameManager.isAdminShop(target) || Bukkit.getOfflinePlayer(target).getName().equals(SERVER_ECONOMY_ACCOUNT)) {
|
if (!NameManager.isAdminShop(target) || NameManager.getUsername(target).equals(SERVER_ECONOMY_ACCOUNT)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,7 +42,7 @@ public class ServerAccountCorrector implements Listener {
|
|||||||
public static void onCurrencySubtract(CurrencySubtractEvent event) {
|
public static void onCurrencySubtract(CurrencySubtractEvent event) {
|
||||||
UUID target = event.getTarget();
|
UUID target = event.getTarget();
|
||||||
|
|
||||||
if (!NameManager.isAdminShop(target) || Bukkit.getOfflinePlayer(target).getName().equals(SERVER_ECONOMY_ACCOUNT)) {
|
if (!NameManager.isAdminShop(target) || NameManager.getUsername(target).equals(SERVER_ECONOMY_ACCOUNT)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,7 +63,7 @@ public class ServerAccountCorrector implements Listener {
|
|||||||
public static void onCurrencyCheck(CurrencyCheckEvent event) {
|
public static void onCurrencyCheck(CurrencyCheckEvent event) {
|
||||||
UUID target = event.getAccount();
|
UUID target = event.getAccount();
|
||||||
|
|
||||||
if (!NameManager.isAdminShop(target) || Bukkit.getOfflinePlayer(target).getName().equals(SERVER_ECONOMY_ACCOUNT)) {
|
if (!NameManager.isAdminShop(target) || NameManager.getUsername(target).equals(SERVER_ECONOMY_ACCOUNT)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +84,7 @@ public class ServerAccountCorrector implements Listener {
|
|||||||
public static void onCurrencyHoldCheck(CurrencyHoldEvent event) {
|
public static void onCurrencyHoldCheck(CurrencyHoldEvent event) {
|
||||||
UUID target = event.getAccount();
|
UUID target = event.getAccount();
|
||||||
|
|
||||||
if (!NameManager.isAdminShop(target) || Bukkit.getOfflinePlayer(target).getName().equals(SERVER_ECONOMY_ACCOUNT)) {
|
if (!NameManager.isAdminShop(target) || NameManager.getUsername(target).equals(SERVER_ECONOMY_ACCOUNT)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +96,7 @@ public class ServerAccountCorrector implements Listener {
|
|||||||
public static void onBalanceCheck(CurrencyAmountEvent event) {
|
public static void onBalanceCheck(CurrencyAmountEvent event) {
|
||||||
UUID target = event.getAccount();
|
UUID target = event.getAccount();
|
||||||
|
|
||||||
if (!NameManager.isAdminShop(target) || Bukkit.getOfflinePlayer(target).getName().equals(SERVER_ECONOMY_ACCOUNT)) {
|
if (!NameManager.isAdminShop(target) || NameManager.getUsername(target).equals(SERVER_ECONOMY_ACCOUNT)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ public class TransactionLogger implements Listener {
|
|||||||
event.getClient().getName(),
|
event.getClient().getName(),
|
||||||
items.toString(),
|
items.toString(),
|
||||||
event.getPrice(),
|
event.getPrice(),
|
||||||
event.getOwner().getName(),
|
NameManager.getUsername(event.getOwner().getUniqueId()),
|
||||||
LocationUtil.locationToString(event.getSign().getLocation()));
|
LocationUtil.locationToString(event.getSign().getLocation()));
|
||||||
|
|
||||||
ChestShop.getBukkitLogger().info(message);
|
ChestShop.getBukkitLogger().info(message);
|
||||||
|
Loading…
Reference in New Issue
Block a user