feat: add debug view for selection

This commit is contained in:
Sekwah 2023-12-17 06:33:18 +00:00
parent b84f3a9921
commit 21e7481a1a
2 changed files with 11 additions and 15 deletions

View File

@ -83,7 +83,7 @@ public class ShowDestiSubCommand implements SubCommand, SubCommand.SubCommandOnI
for(PlayerContainer player : serverContainer.getPlayers()) {
var tempData = tempDataServices.getPlayerTempData(player);
if(!tempData.isDestiVisible()) {
return;
continue;
}
for (Destination destination : destinationServices.getDestinations()) {
@ -92,8 +92,6 @@ public class ShowDestiSubCommand implements SubCommand, SubCommand.SubCommandOnI
Debug.addMarker(player, pos.toBlockPos(), destination.getArgValues("name")[0], new Color(100, 100, 100, 100), 1000);
}
}
//Debug.addMarker(player, pos, "", new Color(255, 0, 0, 100), 1000 * 10);
}
}, 1, 20);
}

View File

@ -6,10 +6,14 @@ import com.sekwah.advancedportals.core.commands.SubCommand;
import com.sekwah.advancedportals.core.connector.containers.CommandSenderContainer;
import com.sekwah.advancedportals.core.connector.containers.PlayerContainer;
import com.sekwah.advancedportals.core.connector.containers.ServerContainer;
import com.sekwah.advancedportals.core.serializeddata.BlockLocation;
import com.sekwah.advancedportals.core.serializeddata.PlayerTempData;
import com.sekwah.advancedportals.core.services.PortalTempDataServices;
import com.sekwah.advancedportals.core.util.Debug;
import com.sekwah.advancedportals.core.util.GameScheduler;
import com.sekwah.advancedportals.core.util.Lang;
import java.awt.*;
import java.util.List;
/**
@ -70,21 +74,15 @@ public class ShowPortalSubCommand implements SubCommand, SubCommand.SubCommandOn
gameScheduler.intervalTickEvent("show_portal", () -> {
for(PlayerContainer player : serverContainer.getPlayers()) {
var tempData = tempDataServices.getPlayerTempData(player);
if(!tempData.isDestiVisible()) {
return;
if(!tempData.isPortalVisible()) {
continue;
}
}
/*sender.sendMessage("Debug");
if(sender.getPlayerContainer() != null) {
PlayerContainer playerContainer = sender.getPlayerContainer();
PlayerTempData tempData = tempDataServices.getPlayerTempData(playerContainer);
if(tempData.getPos1() != null) {
Debug.addMarker(sender.getPlayerContainer(), tempData.getPos1(), "Pos1", new Color(0, 255, 0), 1000 * 10);
Debug.addMarker(player, tempData.getPos1(), "Pos1", new Color(0, 255, 0), 1000);
}
if(tempData.getPos2() != null) {
Debug.addMarker(sender.getPlayerContainer(), tempData.getPos2(), "Pos2", new Color(255, 0, 0), 1000 * 10);
Debug.addMarker(player, tempData.getPos2(), "Pos2", new Color(255, 0, 0), 1000);
}
if (tempData.getPos1() != null && tempData.getPos2() != null) {
@ -106,13 +104,13 @@ public class ShowPortalSubCommand implements SubCommand, SubCommand.SubCommandOn
var pos = new BlockLocation(tempData.getPos1().worldName, x, y, z);
if (pos.equals(tempData.getPos1()) || pos.equals(tempData.getPos2()))
continue;
Debug.addMarker(sender.getPlayerContainer(), pos, "", new Color(255, 0, 0, 100), 1000 * 10);
Debug.addMarker(player, pos, "", new Color(255, 0, 0, 100), 1000);
}
}
}
}
}
}*/
}
}, 1, 20);
}
}