diff --git a/config.yml b/config.yml index 20e5f37..d2b4765 100644 --- a/config.yml +++ b/config.yml @@ -48,6 +48,9 @@ hangoverDays: 7 colorInBarrels: true colorInBrewer: false +# In den Serverlog loggen was der Spieler tatsächlich geschrieben hat, bevor seine Worte verändert wurden [false] +logRealChat: false + # Autosave Intervall in Minuten [3] autosave: 3 diff --git a/src/com/dre/brewery/LanguageReader.java b/src/com/dre/brewery/LanguageReader.java index 535e649..f94020e 100644 --- a/src/com/dre/brewery/LanguageReader.java +++ b/src/com/dre/brewery/LanguageReader.java @@ -54,10 +54,11 @@ public class LanguageReader { defaults.put("Player_WakeHint2", "To Cancel: &9/br wakeup cancel"); defaults.put("Player_WakeCancel", "&6Wakeup Point Check was cancelled"); defaults.put("Player_WakeNoCheck", "&cNo Wakeup Point Check is currently active"); + defaults.put("Player_TriedToSay", "&v1 tried to say: &0&v2"); /* Brew */ defaults.put("Brew_Distilled", "Distilled"); - defaults.put("Brew_BarrelRiped", "Barrelriped"); + defaults.put("Brew_BarrelRiped", "Barrel aged"); defaults.put("Brew_Undefined", "Indefinable Brew"); defaults.put("Brew_DistillUndefined", "Indefinable Distillate"); defaults.put("Brew_BadPotion", "Ruined Potion"); @@ -108,6 +109,7 @@ public class LanguageReader { /* Etc. */ defaults.put("Etc_Usage", "Usage:"); defaults.put("Etc_Page", "Page"); + defaults.put("Etc_Barrel", "Barrel"); } private void check() { diff --git a/src/com/dre/brewery/P.java b/src/com/dre/brewery/P.java index 2f1bd7d..6a0a1dd 100644 --- a/src/com/dre/brewery/P.java +++ b/src/com/dre/brewery/P.java @@ -183,6 +183,7 @@ public class P extends JavaPlugin { BPlayer.homeType = config.getString("homeType", null); Brew.colorInBarrels = config.getBoolean("colorInBarrels", false); Brew.colorInBrewer = config.getBoolean("colorInBrewer", false); + Words.log = config.getBoolean("logRealChat", false); // loading recipes ConfigurationSection configSection = config.getConfigurationSection("recipes"); diff --git a/src/com/dre/brewery/Words.java b/src/com/dre/brewery/Words.java index 8a22a0b..201ff6f 100644 --- a/src/com/dre/brewery/Words.java +++ b/src/com/dre/brewery/Words.java @@ -14,6 +14,7 @@ public class Words { public static ArrayList words = new ArrayList(); public static FileConfiguration config; + public static Boolean log; private String from; private String to; @@ -68,6 +69,9 @@ public class Words { } if (!words.isEmpty()) { String message = event.getMessage(); + if (log) { + P.p.log(P.p.languageReader.get("Player_TriedToSay", event.getPlayer().getName(), message)); + } for (Words word : words) { if (word.alcohol <= bPlayer.getDrunkeness()) { message = word.distort(message); diff --git a/src/com/dre/brewery/listeners/BlockListener.java b/src/com/dre/brewery/listeners/BlockListener.java index 61160ec..3898ce3 100644 --- a/src/com/dre/brewery/listeners/BlockListener.java +++ b/src/com/dre/brewery/listeners/BlockListener.java @@ -18,7 +18,7 @@ public class BlockListener implements Listener { public void onSignChange(SignChangeEvent event) { String[] lines = event.getLines(); - if (lines[0].equalsIgnoreCase("Fass")) { + if (lines[0].equalsIgnoreCase(P.p.languageReader.get("Etc_Barrel"))) { if (Barrel.create(event.getBlock())) { P.p.msg(event.getPlayer(), P.p.languageReader.get("Player_BarrelCreated")); }