Skip to content

Commit dc37ced

Browse files
committed
[🐛] Fixed issue where players could use space character in home/kit name (not supported by EssentialsX)
1 parent 31b5d93 commit dc37ced

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/fr/snipertvmc/essentialsxgui/inventories/homes/HomesInventory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ private void createNewHome(Player player) {
250250
return;
251251
}
252252

253-
Main.getInstance().getEssentials().getUser(player).setHome(result.getLeft(), player.getLocation());
253+
Main.getInstance().getEssentials().getUser(player).setHome(result.getLeft().replace(" ", "_"), player.getLocation());
254254
player.sendMessage(MessagesUtils.get(EXGMessage.HOME_CREATED, Map.of("homeName", result.getLeft())));
255255
new HomesInventory(player, null, null).open(player);
256256
SoundsUtils.playSound(player, EXGSound.ACTION_SUCCESS);

src/main/java/fr/snipertvmc/essentialsxgui/inventories/kits/KitsAdminViewInventory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ private void createNewKitDelay(Player player, String kitName) {
261261

262262
long delay = Long.parseLong(result.getLeft());
263263

264-
Main.getInstance().getHookManager().getEssentialsHook().createKitWithPlayer(player, kitName, delay);
264+
Main.getInstance().getHookManager().getEssentialsHook().createKitWithPlayer(player, kitName.replace(" ", "_"), delay);
265265
player.sendMessage(MessagesUtils.get(EXGMessage.KIT_CREATED, Map.of("kitName", kitName, "kitDelay", String.valueOf(delay))));
266266
new KitsAdminViewInventory(player, null, null).open(player);
267267
SoundsUtils.playSound(player, EXGSound.ACTION_SUCCESS);

0 commit comments

Comments
 (0)