Added message for last accessed player of block

This commit is contained in:
Anuken
2020-10-11 11:47:22 -04:00
parent e11a8565d0
commit 3fe79531a6
7 changed files with 31 additions and 10 deletions

View File

@@ -58,7 +58,7 @@ public class ConstructBlock extends Block{
}
@Remote(called = Loc.server)
public static void constructFinish(Tile tile, Block block, Unit builder, byte rotation, Team team, Object config){
public static void constructFinish(Tile tile, Block block, @Nullable Unit builder, byte rotation, Team team, Object config){
if(tile == null) return;
float healthf = tile.build == null ? 1f : tile.build.healthf();
@@ -76,6 +76,10 @@ public class ConstructBlock extends Block{
if(prev != null && prev.size > 0){
tile.build.overwrote(prev);
}
if(builder != null && builder.isPlayer()){
tile.build.lastAccessed = builder.getPlayer().name;
}
}
//last builder was this local client player, call placed()