Fixed homes not showing above 9

This commit is contained in:
darbyjack committed 2022-04-09 16:39:36 -05:00
1 parent 08012e057e
commit f80ab04cda
1 file changed
+2 -2
@@ -298,10 +298,10 @@ public class EssentialsExpansion extends PlaceholderExpansion {
if (homeNumber >= user.getHomes().size() || homeNumber < 0) return "";
// checks if the identifier matches the pattern home_%d
if (identifier.matches("(\\w+_)(\\d)")) return user.getHomes().get(homeNumber);
if (identifier.matches("(\\w+_)(\\d+)")) return user.getHomes().get(homeNumber);
//checks if the identifier matches the pattern home_%d_(x/y/z)
if (identifier.matches("(\\w+_)(\\d)(_\\w)")) {
if (identifier.matches("(\\w+_)(\\d+)(_\\w)")) {
try {
final Location home = user.getHome(user.getHomes().get(homeNumber));