Changed chat formatting to support (and depend on) TownyChat

This commit is contained in:
Norbi Peti 2015-09-04 20:16:24 +02:00
parent 83c8379656
commit 4cea49f0ad
9 changed files with 15 additions and 7 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -10,4 +10,6 @@ commands:
usage: "&cUsage: /nrp <message>&r"
ooc:
description: Send message in Out-of-Character
usage: "&cUsage: /ooc <message>&r"
usage: "&cUsage: /ooc <message>&r"
author: NorbiPeti
depend: [Essentials, Towny]

View file

@ -174,12 +174,18 @@ public class PlayerListener implements Listener { // 2015.07.16.
}
}
event.setFormat("<"
+ (player.RPMode ? (ShowRPTag ? "§2[RP]§r" : "") : "§8[OOC]§r")
+ event.getFormat().substring(
event.getFormat().indexOf("<") + 1,
event.getFormat().indexOf(">")) + flair + "> "
+ message); // 2015.08.08.
/*
* event.setFormat("<" + (player.RPMode ? (ShowRPTag ? "§2[RP]§r" : "")
* : "§8[OOC]§r") + event.getFormat().substring(
* event.getFormat().indexOf("<") + 1, event.getFormat().indexOf(">")) +
* flair + "> " + message); // 2015.08.08.
*/
event.setFormat(event
.getFormat()
.replace(
"{rptag}",
(player.RPMode ? (ShowRPTag ? "§2[RP]§r" : "")
: "§8[OOC]§r")).replace("{buttonflair}", flair)); // 2015.09.04.
}
/*