mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2025-01-25 00:01:21 +01:00
Don't refund for non-finished signs (Fixes #141)
This commit is contained in:
parent
247b2d239e
commit
1cb481097c
@ -10,6 +10,7 @@ import com.Acrobot.ChestShop.Events.Economy.CurrencySubtractEvent;
|
||||
import com.Acrobot.ChestShop.Events.ShopDestroyedEvent;
|
||||
import com.Acrobot.ChestShop.Permission;
|
||||
import com.Acrobot.ChestShop.UUIDs.NameManager;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
@ -18,6 +19,8 @@ import java.math.BigDecimal;
|
||||
import java.util.UUID;
|
||||
|
||||
import static com.Acrobot.ChestShop.Permission.NOFEE;
|
||||
import static com.Acrobot.ChestShop.Signs.ChestShopSign.AUTOFILL_CODE;
|
||||
import static com.Acrobot.ChestShop.Signs.ChestShopSign.ITEM_LINE;
|
||||
import static com.Acrobot.ChestShop.Signs.ChestShopSign.NAME_LINE;
|
||||
|
||||
/**
|
||||
@ -32,6 +35,10 @@ public class ShopRefundListener implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ChatColor.stripColor(event.getSign().getLine(ITEM_LINE)).equals(AUTOFILL_CODE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Account account = NameManager.getAccountFromShortName(event.getSign().getLine(NAME_LINE));
|
||||
if (account == null) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user