Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions plugin.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: SimplePrefix
main: com.flabaliki.simpleprefix.SimplePrefix
version: 2.5.1
authors: [Flabaliki, chaseoes, BaranCODE]
description: Easy prefixes & suffixes
website: http://dev.bukkit.org/bukkit-plugins/simple-prefix/
version: 2.5.2
api-version: 1.13
softdepend: [Vault]
commands:
spr:
Expand Down
2 changes: 1 addition & 1 deletion src/com/flabaliki/simpleprefix/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public String getSuffix(Player player) {
public String getWorld(Player player) {
String world = "";
if (config.getString("Worlds." + player.getWorld().getName() + ".nickname") != null) {
world = config.getString("Worlds." + player.getWorld().getName() + ".nickname").replaceAll("(&([A-Fa-f0-9L-Ol-okKrR]))", "$2");
world = config.getString("Worlds." + player.getWorld().getName() + ".nickname").replaceAll("(&([A-Fa-f0-9L-Ol-okKrR]))", "§$2");
}
return world;
}
Expand Down
6 changes: 1 addition & 5 deletions src/com/flabaliki/simpleprefix/SimplePrefix.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ public void onEnable()
}
}

if (autoupdate){
new Updater(this, 31141, this.getFile(), Updater.UpdateType.DEFAULT, true);
}

if (Config.config.getBoolean("Use-Vault")) setupChat();
}

Expand Down Expand Up @@ -96,7 +92,7 @@ public void onPlayerChat(AsyncPlayerChatEvent event)
String message = event.getMessage().replaceAll("%", "%%");
if (template == null) template = "<[time] [world] [prefix][name][suffix]> ";
if (timeFormat == null) timeFormat = "[h:mm aa]";
String formattedName = template.replaceAll("\\[world\\]", world).replaceAll("\\[prefix\\]", prefix).replaceAll("\\[name\\]", player.getDisplayName()).replaceAll("\\[suffix\\]", suffix).replaceAll("(&([A-Fa-f0-9L-Ol-okKrR]))", "�$2");
String formattedName = template.replaceAll("\\[world\\]", world).replaceAll("\\[prefix\\]", prefix).replaceAll("\\[name\\]", player.getDisplayName()).replaceAll("\\[suffix\\]", suffix).replaceAll("(&([A-Fa-f0-9L-Ol-okKrR]))", "�$2");
if ((timeFormat != null) && (!timeFormat.equalsIgnoreCase("")) && (formattedName.contains("[time]"))) {
DateFormat dateFormat = new SimpleDateFormat(timeFormat);
Date date = new Date();
Expand Down
6 changes: 3 additions & 3 deletions src/com/flabaliki/simpleprefix/SprCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,15 @@ private void changeMessage(CommandSender sender, String item, String change, Str
if (change.equalsIgnoreCase("remove"))
sender.sendMessage(ChatColor.AQUA + "" + ChatColor.BOLD + " > " + ChatColor.WHITE + item + space + "for" + space + entityType + space + ChatColor.AQUA + entity + ChatColor.WHITE + space + ChatColor.RED + "removed.");
else if (change.equalsIgnoreCase("set"))
sender.sendMessage((ChatColor.AQUA + "" + ChatColor.BOLD + " > " + ChatColor.WHITE + item + space + "for" + space + entityType + space + ChatColor.AQUA + entity + ChatColor.WHITE + space + ChatColor.GREEN + "set to" + ChatColor.WHITE + ":" + space + input).replaceAll("(&([A-Fa-f0-9L-Ol-okKrR]))", "�$2"));
sender.sendMessage((ChatColor.AQUA + "" + ChatColor.BOLD + " > " + ChatColor.WHITE + item + space + "for" + space + entityType + space + ChatColor.AQUA + entity + ChatColor.WHITE + space + ChatColor.GREEN + "set to" + ChatColor.WHITE + ":" + space + input).replaceAll("(&([A-Fa-f0-9L-Ol-okKrR]))", "�$2"));
}

private void showColours(CommandSender sender)
{
sender.sendMessage(ChatColor.AQUA + "[" + SimplePrefix.pluginName + " Colours] ");
if ((sender instanceof Player)) {
sender.sendMessage("�0&0 �1&1 �2&2 �3&3 �4&4 �5&5 �6&6 �7&7 �8&8 �9&9 �A&A �B&B �C&C �D&D �E&E �F&F");
sender.sendMessage("�r�L&L�r �M&M�r �N&N�r �O&O�r �k&K�R (�r&R�r Reset)");
sender.sendMessage("�0&0 �1&1 �2&2 �3&3 �4&4 �5&5 �6&6 �7&7 �8&8 �9&9 �A&A �B&B �C&C �D&D �E&E �F&F");
sender.sendMessage("�r�L&L�r �M&M�r �N&N�r �O&O�r �k&K�R (�r&R�r Reset)");
} else {
sender.sendMessage("| &0 Black | &1 Dark Blue | &2 Dark Green | &3 Dark Aqua |");
sender.sendMessage("| &4 Dark Red | &5 Purple | &6 Gold | &7 Gray |");
Expand Down
Loading