mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-25 20:25:19 +01:00
customizable chat prefix
This commit is contained in:
parent
b35d5f05cd
commit
f77e1e71ec
@ -30,11 +30,12 @@ public class Settings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public enum Setting {
|
public enum Setting {
|
||||||
|
CHAT_PREFIX("npc.chat.prefix", "[<npc>]: "),
|
||||||
DEBUG_MODE("general.debug-mode", false),
|
DEBUG_MODE("general.debug-mode", false),
|
||||||
USE_DATABASE("use-database", false),
|
QUICK_SELECT("npc.selection.quick-select", false),
|
||||||
SELECTION_ITEM("npc.selection.item", 280),
|
SELECTION_ITEM("npc.selection.item", 280),
|
||||||
SELECTION_MESSAGE("npc.selection.message", "<b>You selected <a><npc><b>!"),
|
SELECTION_MESSAGE("npc.selection.message", "<b>You selected <a><npc><b>!"),
|
||||||
QUICK_SELECT("npc.selection.quick-select", false);
|
USE_DATABASE("use-database", false);
|
||||||
|
|
||||||
private String path;
|
private String path;
|
||||||
private Object value;
|
private Object value;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.citizensnpcs.npc;
|
package net.citizensnpcs.npc;
|
||||||
|
|
||||||
|
import net.citizensnpcs.Settings.Setting;
|
||||||
import net.citizensnpcs.api.event.NPCDespawnEvent;
|
import net.citizensnpcs.api.event.NPCDespawnEvent;
|
||||||
import net.citizensnpcs.api.event.NPCSpawnEvent;
|
import net.citizensnpcs.api.event.NPCSpawnEvent;
|
||||||
import net.citizensnpcs.api.npc.AbstractNPC;
|
import net.citizensnpcs.api.npc.AbstractNPC;
|
||||||
@ -28,6 +29,12 @@ public abstract class CitizensNPC extends AbstractNPC {
|
|||||||
inventory = new NPCInventory(this);
|
inventory = new NPCInventory(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void chat(String message) {
|
||||||
|
for (Player player : Bukkit.getOnlinePlayers())
|
||||||
|
Messaging.sendWithNPC(player, Setting.CHAT_PREFIX.asString() + message, this);
|
||||||
|
}
|
||||||
|
|
||||||
protected abstract EntityLiving createHandle(Location loc);
|
protected abstract EntityLiving createHandle(Location loc);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user