Thanks for your reply, when i commented out the first if statement, there is nothing wrong with the code.
The Location.LOBBY checks a region.
Locations.java (for the lobby looks like this)
[SPOIL]
Code:
LOBBY(new int[]{3091, 3100, 3096, 3097, 3092, 3100}, new int[]{3507, 3513, 3510, 3512, 3512, 3507}, false, false, false, false, false, false) {
@Override
public void process(Player p) {
//p.getPacketSender().sendMessage("You are in bounds.");
p.getDueling().process();
p.getPacketSender().sendInteractionOption("null", 1, false); //Remove challenge option
}
[/SPOIL]
In different classes the following code does work
Code:
If(player.getLocation() == Location.LOBBY) {
Example
}
When I tried to test the Lobbyclass code with
Code:
public static void addPlayer(Player player) {
System.out.println(player.getLocation() + " - " + Location.LOBBY);
player.getPacketSender().sendMessage("Test.");
}
It didnt gave me anything.
So it has something to do with the Location.LOBBY check, not sure what the problem is.
Thanks for your post, When I want to check it for myself with System.out.println(player.getLocation + " - " + Location.LOBBY);. It didnt show anything it putted it like this:
Did I use it wrong?
Thanks for the post , yes I think so. I want the add the lobby step by step so I could understand and toubleshoot one step at a time.