Skip to content

Commit

Permalink
feat: add debug view for selection
Browse files Browse the repository at this point in the history
  • Loading branch information
sekwah41 committed Dec 17, 2023
1 parent b84f3a9 commit 21e7481
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void registered() {
for(PlayerContainer player : serverContainer.getPlayers()) {
var tempData = tempDataServices.getPlayerTempData(player);
if(!tempData.isDestiVisible()) {
return;
continue;
}

for (Destination destination : destinationServices.getDestinations()) {
Expand All @@ -92,8 +92,6 @@ public void registered() {
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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
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;

/**
Expand Down Expand Up @@ -70,21 +74,15 @@ public void registered() {
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) {
Expand All @@ -106,13 +104,13 @@ public void registered() {
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);
}
}

0 comments on commit 21e7481

Please sign in to comment.