Trace Refactor #233
@ -78,7 +78,18 @@ public class TraceCommand extends SWCommand {
|
||||
BauSystem.MESSAGE.send("TRACE_MESSAGE_HIDE", player);
|
||||
}
|
||||
|
||||
@Register(value = "delete", description = "TRACE_COMMAND_HELP_SHOW")
|
||||
public void delete(Player player){
|
||||
manager.clear();
|
||||
//BauSystem.MESSAGE.send("TRACE_MESSAGE_DELETE_ALL", player);
|
||||
}
|
||||
|
||||
//TODO Manage non exsistent trace
|
||||
@Register(value = "delete", description = "TRACE_COMMAND_HELP_SHOW")
|
||||
public void delete(Player player, int id){
|
||||
manager.remove(id);
|
||||
//BauSystem.MESSAGE.send("TRACE_MESSAGE_DELETE", player);
|
||||
}
|
||||
|
||||
@ClassMapper(value = BundleFilter.class, local = true)
|
||||
public TypeMapper<BundleFilter> bundleFilterClassMapper() {
|
||||
@ -100,8 +111,6 @@ public class TraceCommand extends SWCommand {
|
||||
return Arrays.stream(BundleFilter.values())
|
||||
.map(Enum::toString)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -70,10 +70,12 @@ public class TraceManager implements Listener {
|
||||
*
|
||||
* @param id id of the trace to be removed
|
||||
*/
|
||||
public void remove(int id){
|
||||
public boolean remove(int id){
|
||||
if(id >= nextOpenId) return false;
|
||||
for(Player player: viewFlagMap.keySet())
|
||||
traces.get(id).hide(player);
|
||||
traces.remove(id);
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Clears all traces
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren