mirror of
https://github.com/PikaMug/Quests.git
synced 2025-02-12 18:41:22 +01:00
NEW console logging of taking and quitting quests
This commit is contained in:
parent
198cf2f9b2
commit
c0f5b17975
@ -587,9 +587,9 @@ public class QuestFactory implements ConversationAbandonedListener {
|
||||
plugin.reload(callback);
|
||||
context.getForWhom().sendRawMessage(ChatColor.GREEN + Lang.get("questDeleted"));
|
||||
if (plugin.getSettings().getConsoleLogging() > 0) {
|
||||
final String name = context.getForWhom() instanceof Player ?
|
||||
final String identifier = context.getForWhom() instanceof Player ?
|
||||
"Player " + ((Player)context.getForWhom()).getUniqueId() : "CONSOLE";
|
||||
plugin.getLogger().info(name + " deleted quest " + quest);
|
||||
plugin.getLogger().info(identifier + " deleted quest " + quest);
|
||||
}
|
||||
}
|
||||
|
||||
@ -632,9 +632,9 @@ public class QuestFactory implements ConversationAbandonedListener {
|
||||
savePlanner(context, section);
|
||||
saveOptions(context, section);
|
||||
if (plugin.getSettings().getConsoleLogging() > 0) {
|
||||
final String name = context.getForWhom() instanceof Player ?
|
||||
final String identifier = context.getForWhom() instanceof Player ?
|
||||
"Player " + ((Player)context.getForWhom()).getUniqueId() : "CONSOLE";
|
||||
plugin.getLogger().info(name + " saved quest " + (String) context.getSessionData(CK.Q_NAME));
|
||||
plugin.getLogger().info(identifier + " saved quest " + (String) context.getSessionData(CK.Q_NAME));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -539,6 +539,9 @@ public class Quester {
|
||||
addEmptiesFor(q, 0);
|
||||
try {
|
||||
currentQuests.put(q, 0);
|
||||
if (plugin.getSettings().getConsoleLogging() > 1) {
|
||||
plugin.getLogger().info(getPlayer().getUniqueId() + " started quest " + q.getName());
|
||||
}
|
||||
} catch (final NullPointerException npe) {
|
||||
plugin.getLogger().severe("Unable to add quest" + q.getName() + " for player " + player.getName()
|
||||
+ ". Consider resetting player data or report on Github");
|
||||
@ -671,6 +674,9 @@ public class Quester {
|
||||
return;
|
||||
}
|
||||
hardQuit(quest);
|
||||
if (plugin.getSettings().getConsoleLogging() > 1) {
|
||||
plugin.getLogger().info(getPlayer().getUniqueId() + " quit quest " + quest.getName());
|
||||
}
|
||||
for (final String message : messages) {
|
||||
if (message != null && !message.equals("") && getPlayer().isOnline()) {
|
||||
getPlayer().sendMessage(message);
|
||||
|
@ -302,9 +302,9 @@ public class ActionFactory implements ConversationAbandonedListener {
|
||||
plugin.reload(callback);
|
||||
context.getForWhom().sendRawMessage(ChatColor.YELLOW + Lang.get("eventEditorDeleted"));
|
||||
if (plugin.getSettings().getConsoleLogging() > 0) {
|
||||
final String name = context.getForWhom() instanceof Player ?
|
||||
final String identifier = context.getForWhom() instanceof Player ?
|
||||
"Player " + ((Player)context.getForWhom()).getUniqueId() : "CONSOLE";
|
||||
plugin.getLogger().info(name + " deleted action " + action);
|
||||
plugin.getLogger().info(identifier + " deleted action " + action);
|
||||
}
|
||||
for (final Quester q : plugin.getQuesters()) {
|
||||
for (final Quest quest : q.getCurrentQuests().keySet()) {
|
||||
@ -465,9 +465,9 @@ public class ActionFactory implements ConversationAbandonedListener {
|
||||
plugin.reload(callback);
|
||||
context.getForWhom().sendRawMessage(ChatColor.YELLOW + Lang.get("eventEditorSaved"));
|
||||
if (plugin.getSettings().getConsoleLogging() > 0) {
|
||||
final String name = context.getForWhom() instanceof Player ?
|
||||
final String identifier = context.getForWhom() instanceof Player ?
|
||||
"Player " + ((Player)context.getForWhom()).getUniqueId() : "CONSOLE";
|
||||
plugin.getLogger().info(name + " saved action " + (String) context.getSessionData(CK.E_NAME));
|
||||
plugin.getLogger().info(identifier + " saved action " + (String) context.getSessionData(CK.E_NAME));
|
||||
}
|
||||
for (final Quester q : plugin.getQuesters()) {
|
||||
for (final Quest quest : q.getCurrentQuests().keySet()) {
|
||||
|
@ -144,9 +144,9 @@ public class ConditionFactory implements ConversationAbandonedListener {
|
||||
plugin.reload(callback);
|
||||
context.getForWhom().sendRawMessage(ChatColor.YELLOW + Lang.get("conditionEditorDeleted"));
|
||||
if (plugin.getSettings().getConsoleLogging() > 0) {
|
||||
final String name = context.getForWhom() instanceof Player ?
|
||||
final String identifier = context.getForWhom() instanceof Player ?
|
||||
"Player " + ((Player)context.getForWhom()).getUniqueId() : "CONSOLE";
|
||||
plugin.getLogger().info(name + " deleted condition " + condition);
|
||||
plugin.getLogger().info(identifier + " deleted condition " + condition);
|
||||
}
|
||||
for (final Quester q : plugin.getQuesters()) {
|
||||
for (final Quest quest : q.getCurrentQuests().keySet()) {
|
||||
@ -215,9 +215,9 @@ public class ConditionFactory implements ConversationAbandonedListener {
|
||||
plugin.reload(callback);
|
||||
context.getForWhom().sendRawMessage(ChatColor.YELLOW + Lang.get("conditionEditorSaved"));
|
||||
if (plugin.getSettings().getConsoleLogging() > 0) {
|
||||
final String name = context.getForWhom() instanceof Player ?
|
||||
final String identifier = context.getForWhom() instanceof Player ?
|
||||
"Player " + ((Player)context.getForWhom()).getUniqueId() : "CONSOLE";
|
||||
plugin.getLogger().info(name + " saved condition " + (String) context.getSessionData(CK.C_NAME));
|
||||
plugin.getLogger().info(identifier + " saved condition " + (String) context.getSessionData(CK.C_NAME));
|
||||
}
|
||||
for (final Quester q : plugin.getQuesters()) {
|
||||
for (final Quest quest : q.getCurrentQuests().keySet()) {
|
||||
|
Loading…
Reference in New Issue
Block a user