Skip to content

Commit

Permalink
Fix error on sponge servers trying to update players
Browse files Browse the repository at this point in the history
  • Loading branch information
TBlueF committed Jan 1, 2023
1 parent e659eb6 commit b800886
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import org.spongepowered.api.entity.living.player.gamemode.GameMode;
import org.spongepowered.api.entity.living.player.gamemode.GameModes;
import org.spongepowered.api.entity.living.player.server.ServerPlayer;
import org.spongepowered.api.world.LightTypes;

import java.io.IOException;
import java.util.*;
Expand Down Expand Up @@ -160,8 +159,9 @@ public void update() {
this.rotation = SpongePlugin.fromSpongePoweredVector(player.rotation());
this.sneaking = player.get(Keys.IS_SNEAKING).orElse(false);

this.skyLight = player.world().light(LightTypes.SKY, player.blockPosition());
this.blockLight = player.world().light(LightTypes.BLOCK, player.blockPosition());
// not implemented in sponge
this.skyLight = 15; //player.world().light(LightTypes.SKY, player.blockPosition());
this.blockLight = 0; //player.world().light(LightTypes.BLOCK, player.blockPosition());

try {
var world = SpongePlugin.getInstance().getWorld(player.world());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
package de.bluecolored.bluemap.sponge;

import com.flowpowered.math.vector.Vector3d;
import de.bluecolored.bluemap.common.plugin.text.Text;
import de.bluecolored.bluemap.common.serverinterface.Gamemode;
import de.bluecolored.bluemap.common.serverinterface.Player;
import de.bluecolored.bluemap.common.plugin.text.Text;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.data.Keys;
import org.spongepowered.api.effect.VanishState;
Expand All @@ -36,7 +36,6 @@
import org.spongepowered.api.entity.living.player.gamemode.GameMode;
import org.spongepowered.api.entity.living.player.gamemode.GameModes;
import org.spongepowered.api.entity.living.player.server.ServerPlayer;
import org.spongepowered.api.world.LightTypes;

import java.io.IOException;
import java.util.*;
Expand Down Expand Up @@ -159,8 +158,9 @@ public void update() {
this.rotation = SpongePlugin.fromSpongePoweredVector(player.rotation());
this.sneaking = player.get(Keys.IS_SNEAKING).orElse(false);

this.skyLight = player.world().light(LightTypes.SKY, player.blockPosition());
this.blockLight = player.world().light(LightTypes.BLOCK, player.blockPosition());
// not implemented in sponge
this.skyLight = 15; //player.world().light(LightTypes.SKY, player.blockPosition());
this.blockLight = 0; //player.world().light(LightTypes.BLOCK, player.blockPosition());

try {
var world = SpongePlugin.getInstance().getWorld(player.world());
Expand Down

0 comments on commit b800886

Please sign in to comment.