Open pthoelken opened 3 years ago
Hello Guys,
I don't thinks this is a bug. More than a usability feature. Can you add a space in code of chat prefix and suffix?
Currently it looks not so good. Adding a empty space into the flags doesn't work.
After a quick view I think this will solve this FR?
public void onAsyncPlayerChatEvent(AsyncPlayerChatEvent event) { Player player = event.getPlayer(); ApplicableRegionSet regions = this.plugin.getWorldGuardCommunicator().getRegionContainer().createQuery().getApplicableRegions(player.getLocation()); String prefix = WorldGuardUtils.queryValue(player, player.getWorld(), regions.getRegions(), Flags.CHAT_PREFIX); String suffix = WorldGuardUtils.queryValue(player, player.getWorld(), regions.getRegions(), Flags.CHAT_SUFFIX); if (prefix != null) { event.setFormat(prefix + " " + event.getFormat()); } if (suffix != null) { event.setFormat(event.getFormat() + " " + suffix); } }
https://github.com/aromaa/WorldGuardExtraFlagsPlugin/blob/32e27117324e1d15ed70105cff0c36c4a889660d/Spigot/src/main/java/net/goldtreeservers/worldguardextraflags/listeners/PlayerListener.java#L79-L97
Hello Guys,
I don't thinks this is a bug. More than a usability feature. Can you add a space in code of chat prefix and suffix?
Currently it looks not so good. Adding a empty space into the flags doesn't work.
After a quick view I think this will solve this FR?
https://github.com/aromaa/WorldGuardExtraFlagsPlugin/blob/32e27117324e1d15ed70105cff0c36c4a889660d/Spigot/src/main/java/net/goldtreeservers/worldguardextraflags/listeners/PlayerListener.java#L79-L97