Changed the description of the "Island protected" message to an "hint"

related to #184
This commit is contained in:
Florian CUNY 2018-06-16 17:15:51 +02:00
parent b410d49c2b
commit 8ee42d3c47
2 changed files with 6 additions and 2 deletions

View File

@ -163,6 +163,10 @@ public class Flag implements Comparable<Flag> {
return "protection.flags." + this.id + ".description"; return "protection.flags." + this.id + ".description";
} }
public String getHintReference() {
return "protection.flags." + this.id + ".hint";
}
/** /**
* Converts a flag to a panel item. The content of the flag will change depending on who the user is and where they are. * Converts a flag to a panel item. The content of the flag will change depending on who the user is and where they are.
* @param plugin - plugin * @param plugin - plugin

View File

@ -83,7 +83,7 @@ public abstract class AbstractFlagListener implements Listener {
* @param flag - the flag that has been checked * @param flag - the flag that has been checked
*/ */
public void noGo(Event e, Flag flag) { public void noGo(Event e, Flag flag) {
noGo(e, flag,false); noGo(e, flag, false);
} }
/** /**
@ -98,7 +98,7 @@ public abstract class AbstractFlagListener implements Listener {
} }
if (user != null) { if (user != null) {
if (!silent) { if (!silent) {
user.notify("protection.protected", TextVariables.DESCRIPTION, user.getTranslation(flag.getDescriptionReference())); user.notify("protection.protected", TextVariables.DESCRIPTION, user.getTranslation(flag.getHintReference()));
} }
user.updateInventory(); user.updateInventory();
} }