use playername pattern from config file instead of hardcoded value

This commit is contained in:
Daniel Buchmann 2021-02-18 23:29:34 +01:00
parent cfac9fa257
commit 5c0a52d735
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
package com.Acrobot.ChestShop.Listeners.PreTransaction;
import com.Acrobot.ChestShop.Configuration.Properties;
import com.Acrobot.ChestShop.Events.PreTransactionEvent;
import com.Acrobot.ChestShop.Signs.ChestShopSign;
import org.bukkit.event.EventHandler;
@ -10,7 +11,7 @@ import java.util.regex.Pattern;
public class InvalidNameIgnorer implements Listener {
private final static Pattern USERNAME_PATTERN = Pattern.compile("^\\w+$");
private final static Pattern USERNAME_PATTERN = Pattern.compile(Properties.VALID_PLAYERNAME_REGEXP);
@EventHandler(priority = EventPriority.LOWEST)
public static void onPreTransaction(PreTransactionEvent event) {