Fix forge-listener methods not subscribed correctly

This commit is contained in:
Blue (Lukas Rieger) 2020-08-16 17:41:34 +02:00
parent 0a3c96ef04
commit 17a94bcb2c

View File

@ -190,7 +190,8 @@ private File getFolderForWorld(ServerWorld world) throws IOException {
public File getConfigFolder() {
return new File("config/bluemap");
}
@SubscribeEvent
public void onPlayerJoin(PlayerLoggedInEvent evt) {
PlayerEntity playerInstance = evt.getPlayer();
if (!(playerInstance instanceof ServerPlayerEntity)) return;
@ -199,7 +200,8 @@ public void onPlayerJoin(PlayerLoggedInEvent evt) {
onlinePlayerMap.put(player.getUuid(), player);
onlinePlayerList.add(player);
}
@SubscribeEvent
public void onPlayerLeave(PlayerLoggedOutEvent evt) {
PlayerEntity player = evt.getPlayer();
if (!(player instanceof ServerPlayerEntity)) return;