mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-14 14:25:30 +01:00
parent
e40b5567b8
commit
2ebc2f285b
@ -31,7 +31,7 @@ public class SignCreate implements Listener {
|
||||
|
||||
Sign sign = (Sign) signBlock.getState();
|
||||
|
||||
if (ChestShopSign.isValid(sign) && !NameManager.canUseName(event.getPlayer(), OTHER_NAME_DESTROY, ChestShopSign.getOwner(sign))) {
|
||||
if (ChestShopSign.isValid(event.getLines()) && !NameManager.canUseName(event.getPlayer(), OTHER_NAME_DESTROY, ChestShopSign.getOwner(event.getLines()))) {
|
||||
event.setCancelled(true);
|
||||
sign.update();
|
||||
return;
|
||||
|
@ -114,7 +114,7 @@ public class PriceRestrictionModule implements Listener {
|
||||
String itemType = material.getType().toString().toLowerCase(Locale.ROOT);
|
||||
int amount;
|
||||
try {
|
||||
amount = ChestShopSign.getQuantity(event.getSign());
|
||||
amount = ChestShopSign.getQuantity(event.getSignLines());
|
||||
} catch (IllegalArgumentException e) {
|
||||
return;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ public class StockCounterModule implements Listener {
|
||||
public static void onPreShopCreation(PreShopCreationEvent event) {
|
||||
int quantity;
|
||||
try {
|
||||
quantity = ChestShopSign.getQuantity(event.getSign());
|
||||
quantity = ChestShopSign.getQuantity(event.getSignLines());
|
||||
} catch (IllegalArgumentException invalidQuantity) {
|
||||
return;
|
||||
}
|
||||
|
@ -21,8 +21,8 @@ public class ShopCreationLogger implements Listener {
|
||||
String shopOwner = ChestShopSign.getOwner(event.getSignLines());
|
||||
String typeOfShop = ChestShopSign.isAdminShop(shopOwner) ? "an Admin Shop" : "a shop" + (event.createdByOwner() ? "" : " for " + event.getOwnerAccount().getName());
|
||||
|
||||
String item = ChestShopSign.getQuantity(event.getSign()) + ' ' + ChestShopSign.getItem(event.getSign());
|
||||
String prices = ChestShopSign.getPrice(event.getSign());
|
||||
String item = ChestShopSign.getQuantity(event.getSignLines()) + ' ' + ChestShopSign.getItem(event.getSignLines());
|
||||
String prices = ChestShopSign.getPrice(event.getSignLines());
|
||||
String location = LocationUtil.locationToString(event.getSign().getLocation());
|
||||
|
||||
String message = String.format(CREATION_MESSAGE,
|
||||
|
@ -24,7 +24,7 @@ public class SignSticker implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ChestShopSign.isAdminShop(event.getSign())) {
|
||||
if (ChestShopSign.isAdminShop(event.getSignLines())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ public class CreationFeeGetter implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ChestShopSign.isAdminShop(event.getSign())) {
|
||||
if (ChestShopSign.isAdminShop(event.getSignLines())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ public class MoneyChecker implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ChestShopSign.isAdminShop(event.getSign())) {
|
||||
if (ChestShopSign.isAdminShop(event.getSignLines())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -35,8 +35,8 @@ public class PermissionChecker implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
String priceLine = ChestShopSign.getPrice(event.getSign());
|
||||
String itemLine = ChestShopSign.getItem(event.getSign());
|
||||
String priceLine = ChestShopSign.getPrice(event.getSignLines());
|
||||
String itemLine = ChestShopSign.getItem(event.getSignLines());
|
||||
|
||||
ItemParseEvent parseEvent = new ItemParseEvent(itemLine);
|
||||
Bukkit.getPluginManager().callEvent(parseEvent);
|
||||
|
Loading…
Reference in New Issue
Block a user