mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-26 20:16:12 +01:00
Merge branch '1.12' into 1.13
This commit is contained in:
commit
39a522716f
@ -22,7 +22,7 @@ public class NameChecker implements Listener {
|
||||
String name = event.getSignLine(NAME_LINE);
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if (name.isEmpty() || (!NameManager.canUseName(player, name) && !Permission.has(player, Permission.ADMIN))) {
|
||||
if (name.isEmpty() || !NameManager.canUseName(player, name)) {
|
||||
Account account = NameManager.getAccount(player.getName());
|
||||
if (account != null) {
|
||||
event.setSignLine(NAME_LINE, account.getShortName());
|
||||
|
@ -58,7 +58,7 @@ public class RestrictedSign implements Listener {
|
||||
|
||||
Sign sign = (Sign) connectedSign.getState();
|
||||
|
||||
if (!ChestShopSign.canAccess(player, sign) && !Permission.has(player, ADMIN)) {
|
||||
if (!ChestShopSign.canAccess(player, sign)) {
|
||||
dropSignAndCancelEvent(event);
|
||||
}
|
||||
|
||||
|
@ -297,7 +297,7 @@ public class NameManager {
|
||||
|
||||
public static boolean canUseName(Player player, String name) {
|
||||
if (ChestShopSign.isAdminShop(name)) {
|
||||
return false;
|
||||
return Permission.has(player, Permission.ADMIN);
|
||||
}
|
||||
|
||||
if (Permission.otherName(player, name)) {
|
||||
|
Loading…
Reference in New Issue
Block a user