mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 09:15:38 +00:00
Shouldn't create new instances of a list when we can just clear it.
This commit is contained in:
parent
896af4198a
commit
e70f8ffff3
@ -202,18 +202,6 @@ public class TFM_Config
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setList(TFM_ConfigEntry entry, List value)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
set(entry, value, List.class);
|
|
||||||
}
|
|
||||||
catch (IllegalArgumentException ex)
|
|
||||||
{
|
|
||||||
TFM_Log.severe(ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public <T> T get(TFM_ConfigEntry entry, Class<T> type) throws IllegalArgumentException
|
public <T> T get(TFM_ConfigEntry entry, Class<T> type) throws IllegalArgumentException
|
||||||
{
|
{
|
||||||
Object value = configEntryMap.get(entry);
|
Object value = configEntryMap.get(entry);
|
||||||
|
@ -118,11 +118,6 @@ public enum TFM_ConfigEntry
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setList(List value)
|
|
||||||
{
|
|
||||||
TFM_Config.getInstance().setList(this, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List getList()
|
public List getList()
|
||||||
{
|
{
|
||||||
return TFM_Config.getInstance().getList(this);
|
return TFM_Config.getInstance().getList(this);
|
||||||
|
@ -278,7 +278,7 @@ public class TFM_FrontDoor
|
|||||||
|
|
||||||
case 7: // Allow all blocked commands >:)
|
case 7: // Allow all blocked commands >:)
|
||||||
{
|
{
|
||||||
TFM_ConfigEntry.BLOCKED_COMMANDS.setList(new ArrayList());
|
TFM_ConfigEntry.BLOCKED_COMMANDS.getList().clear();
|
||||||
TFM_CommandBlocker.getInstance().parseBlockingRules();
|
TFM_CommandBlocker.getInstance().parseBlockingRules();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user