Dieser Commit ist enthalten in:
Ursprung
dfd20f03b6
Commit
8a3d8a9c33
@ -78,7 +78,18 @@ public class TraceCommand extends SWCommand {
|
|||||||
BauSystem.MESSAGE.send("TRACE_MESSAGE_HIDE", player);
|
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)
|
@ClassMapper(value = BundleFilter.class, local = true)
|
||||||
public TypeMapper<BundleFilter> bundleFilterClassMapper() {
|
public TypeMapper<BundleFilter> bundleFilterClassMapper() {
|
||||||
@ -100,8 +111,6 @@ public class TraceCommand extends SWCommand {
|
|||||||
return Arrays.stream(BundleFilter.values())
|
return Arrays.stream(BundleFilter.values())
|
||||||
.map(Enum::toString)
|
.map(Enum::toString)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -70,10 +70,12 @@ public class TraceManager implements Listener {
|
|||||||
*
|
*
|
||||||
* @param id id of the trace to be removed
|
* @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())
|
for(Player player: viewFlagMap.keySet())
|
||||||
traces.get(id).hide(player);
|
traces.get(id).hide(player);
|
||||||
traces.remove(id);
|
traces.remove(id);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Clears all traces
|
/** Clears all traces
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren