mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 08:59:01 +00:00
Log Player tried to say
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -14,6 +14,7 @@ public class Words {
|
||||
|
||||
public static ArrayList<Words> words = new ArrayList<Words>();
|
||||
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);
|
||||
|
||||
@@ -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"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user