mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2026-01-04 15:41:45 +00:00
Fixed reload issue with tokens
This commit is contained in:
@@ -64,4 +64,8 @@ public class CosmeticManager {
|
||||
public boolean isToken(final ItemStack itemStack) {
|
||||
return Keys.hasKey(itemStack, Keys.TOKEN_KEY, PersistentDataType.STRING);
|
||||
}
|
||||
|
||||
public void clearTokens() {
|
||||
this.tokenMap.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,6 +120,7 @@ public class CosmeticsMenu {
|
||||
|
||||
public void load() {
|
||||
this.guiMap.clear();
|
||||
this.cosmeticManager.clearTokens();
|
||||
final File file = Path.of(this.plugin.getDataFolder().getPath(),
|
||||
"menus").toFile();
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ public class ModelEngineHook implements Hook {
|
||||
if (entity == null) return;
|
||||
|
||||
for (final Player player : entity.getPlayerInRange()) {
|
||||
entity.removePlayer(player);
|
||||
entity.removePlayerAsync(player);
|
||||
}
|
||||
|
||||
entity.getEntity().remove();
|
||||
|
||||
@@ -67,7 +67,7 @@ public class MessageHandler {
|
||||
final String message = this.getPapiPlaceholders(
|
||||
sender,
|
||||
Placeholder.applyPlaceholders(this.getMessage(key), placeholders)
|
||||
);
|
||||
).replaceAll("[&§]", "");
|
||||
|
||||
if (message.isBlank()) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user