SteamWar/BauSystem2.0
Archiviert
12
0

Trace Refactor #233

Zusammengeführt
YoyoNow hat 121 Commits von TracerGUI nach master 2024-04-21 16:03:26 +02:00 zusammengeführt
2 geänderte Dateien mit 14 neuen und 3 gelöschten Zeilen
Nur Änderungen aus Commit 8a3d8a9c33 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -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());
}
};
}

Datei anzeigen

@ -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