Fixed remove method not properly deteling entries
This commit is contained in:
@@ -27,7 +27,7 @@ import com.redstoner.modules.CoreModule;
|
|||||||
import com.redstoner.modules.Module;
|
import com.redstoner.modules.Module;
|
||||||
|
|
||||||
@AutoRegisterListener
|
@AutoRegisterListener
|
||||||
@Version(major = 3, minor = 2, revision = 0, compatible = 3)
|
@Version(major = 3, minor = 2, revision = 1, compatible = 3)
|
||||||
public final class DataManager implements CoreModule, Listener
|
public final class DataManager implements CoreModule, Listener
|
||||||
{
|
{
|
||||||
protected final File dataFolder = new File(Main.plugin.getDataFolder(), "data");
|
protected final File dataFolder = new File(Main.plugin.getDataFolder(), "data");
|
||||||
@@ -322,6 +322,7 @@ public final class DataManager implements CoreModule, Listener
|
|||||||
{}
|
{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
protected void removeData_(String id, String module, String key)
|
protected void removeData_(String id, String module, String key)
|
||||||
{
|
{
|
||||||
if (data.containsKey(id))
|
if (data.containsKey(id))
|
||||||
@@ -330,6 +331,7 @@ public final class DataManager implements CoreModule, Listener
|
|||||||
if (moduleData == null)
|
if (moduleData == null)
|
||||||
return;
|
return;
|
||||||
moduleData.remove(key);
|
moduleData.remove(key);
|
||||||
|
data.put(module, data);
|
||||||
save_(id);
|
save_(id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user