Skip to content

Commit

Permalink
parsing placeholders in /emojis <category> cmd & 1.6.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanguygab committed Oct 11, 2022
1 parent 168c200 commit c33008d
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

group = 'io.github.tanguygab'
version = '1.6.6'
version = '1.6.7'


repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ public void sendSound(TabPlayer p, String sound) {

@Override
public void reload() {
TABAdditions.getInstance().reload();
plugin.getProxy().getPluginManager().unregisterListeners(plugin);
plugin.getProxy().getPluginManager().registerListener(plugin, new BungeeEvents());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public TranslationFile getMsgs() {
public void load() {
enabled = true;
loadFiles();
TabAPI.getInstance().getEventBus().register(TabLoadEvent.class,e->platform.reload());
TabAPI.getInstance().getEventBus().register(TabLoadEvent.class,e->reload());
platform.reload();
}

Expand Down Expand Up @@ -130,6 +130,7 @@ public void loadFiles() {
}

public void reload() {
platform.reload();
loadFiles();
loadFeatures();
loadPlaceholders();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public void getEmojiCategory(TabPlayer p, String category) {

for (String emoji : emojis.keySet()) {
if (!canUseEmoji(p,category,emoji)) continue;
IChatBaseComponent comp = cm.createComponent("\n" + EnumChatFormat.color(translation.getEmoji(emoji,emojis.get(emoji))),p);
IChatBaseComponent comp = cm.createComponent("\n" + TABAdditions.getInstance().parsePlaceholders(translation.getEmoji(emoji,emojis.get(emoji)),p),p);
comp.getModifier().onClickSuggestCommand(emoji);
list.add(comp);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ public void sendSound(TabPlayer p, String sound) {

@Override
public void reload() {
TABAdditions.getInstance().reload();

HandlerList.unregisterAll((Plugin) plugin);
plugin.getServer().getPluginManager().registerEvents(plugin, plugin);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
import io.github.tanguygab.tabadditions.shared.TABAdditions;
import io.github.tanguygab.tabadditions.shared.features.chat.ChatManager;
import me.neznamy.tab.api.TabAPI;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.event.server.TabCompleteEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/bungee.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: TAB-Additions
version: 1.6.6
version: 1.6.7
main: io.github.tanguygab.tabadditions.bungee.TABAdditionsBungeeCord
description: More features for the plugin TAB !
softDepends: [floodgate-bungee,AdvancedBan]
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: TAB-Additions
version: 1.6.6
version: 1.6.7
main: io.github.tanguygab.tabadditions.spigot.TABAdditionsSpigot
api-version: 1.13
depend: [TAB]
Expand Down

0 comments on commit c33008d

Please sign in to comment.