Trace Refactor #233
@ -310,6 +310,33 @@ public class Trace {
|
|||||||
render(player, viewFlags, BundleFilter.STRICT);
|
render(player, viewFlags, BundleFilter.STRICT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**Makes the first passed player follow the trace render of the second passed player
|
||||||
|
*
|
||||||
|
* @param player
|
||||||
|
* @param toFollow
|
||||||
|
*/
|
||||||
|
public void follow(Player player, Player toFollow){
|
||||||
|
for(REntityServer server :serverMap.values()){
|
||||||
|
server.removePlayer(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
serverMap.get(toFollow).addPlayer(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Makes the passed player stop following any other players trace render
|
||||||
|
*
|
||||||
|
* @param player
|
||||||
|
*/
|
||||||
|
public void unfollow(Player player){
|
||||||
|
for(REntityServer server :serverMap.values()){
|
||||||
|
server.removePlayer(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(serverMap.get(player) != null){
|
||||||
|
serverMap.get(player).addPlayer(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Hides this trail for the given player
|
/** Hides this trail for the given player
|
||||||
*
|
*
|
||||||
* @param player
|
* @param player
|
||||||
|
@ -101,8 +101,24 @@ public class TraceCommand extends SWCommand {
|
|||||||
trace.renderAt(player, start, end);
|
trace.renderAt(player, start, end);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@Register(value="share", description = "TRACE_COMMAND_HELP_SHOW")
|
||||||
|
public void share(Player player){
|
||||||
|
//TODO Rücksprache
|
||||||
|
}
|
||||||
|
|
||||||
|
@Register(value="follow", description = "TRACE_COMMAND_HELP_SHOW")
|
||||||
|
public void follow(Player player, Player toFollow){
|
||||||
|
for(Trace trace: manager.getAll()){
|
||||||
|
trace.follow(player, toFollow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Register(value="unfollow", description = "TRACE_COMMAND_HELP_SHOW")
|
||||||
|
public void unfollow(Player player){
|
||||||
|
for(Trace trace: manager.getAll()){
|
||||||
|
trace.unfollow(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ClassMapper(value = Trace.class, local = true)
|
@ClassMapper(value = Trace.class, local = true)
|
||||||
public TypeMapper<Trace> traceClassMapper(){
|
public TypeMapper<Trace> traceClassMapper(){
|
||||||
|
@ -149,5 +149,5 @@ public class TraceManager implements Listener {
|
|||||||
|
|
||||||
viewFlagMap.remove(player);
|
viewFlagMap.remove(player);
|
||||||
bundleFilterMap.remove(player);
|
bundleFilterMap.remove(player);
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren