mirror of
https://github.com/PikaMug/Quests.git
synced 2025-01-21 07:41:33 +01:00
Correct deletion of actions for non-legacy files
This commit is contained in:
parent
cb87effb69
commit
a5251dd8ce
@ -277,9 +277,14 @@ public class ActionFactory implements ConversationAbandonedListener {
|
|||||||
.replace("<file>", actionsFile.getName()));
|
.replace("<file>", actionsFile.getName()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String event = (String) context.getSessionData(CK.ED_EVENT_DELETE);
|
String action = (String) context.getSessionData(CK.ED_EVENT_DELETE);
|
||||||
ConfigurationSection sec = data.getConfigurationSection("events");
|
String key = "actions";
|
||||||
sec.set(event, null);
|
ConfigurationSection sec = data.getConfigurationSection(key);
|
||||||
|
if (sec == null) {
|
||||||
|
key = "events";
|
||||||
|
sec = data.getConfigurationSection(key);
|
||||||
|
}
|
||||||
|
sec.set(action, null);
|
||||||
try {
|
try {
|
||||||
data.save(actionsFile);
|
data.save(actionsFile);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user