mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-12-01 23:13:28 +01:00
Fix error on sponge servers trying to update players
This commit is contained in:
parent
e659eb63aa
commit
b80088671b
@ -36,7 +36,6 @@
|
|||||||
import org.spongepowered.api.entity.living.player.gamemode.GameMode;
|
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.gamemode.GameModes;
|
||||||
import org.spongepowered.api.entity.living.player.server.ServerPlayer;
|
import org.spongepowered.api.entity.living.player.server.ServerPlayer;
|
||||||
import org.spongepowered.api.world.LightTypes;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -160,8 +159,9 @@ public void update() {
|
|||||||
this.rotation = SpongePlugin.fromSpongePoweredVector(player.rotation());
|
this.rotation = SpongePlugin.fromSpongePoweredVector(player.rotation());
|
||||||
this.sneaking = player.get(Keys.IS_SNEAKING).orElse(false);
|
this.sneaking = player.get(Keys.IS_SNEAKING).orElse(false);
|
||||||
|
|
||||||
this.skyLight = player.world().light(LightTypes.SKY, player.blockPosition());
|
// not implemented in sponge
|
||||||
this.blockLight = player.world().light(LightTypes.BLOCK, player.blockPosition());
|
this.skyLight = 15; //player.world().light(LightTypes.SKY, player.blockPosition());
|
||||||
|
this.blockLight = 0; //player.world().light(LightTypes.BLOCK, player.blockPosition());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var world = SpongePlugin.getInstance().getWorld(player.world());
|
var world = SpongePlugin.getInstance().getWorld(player.world());
|
||||||
|
@ -25,9 +25,9 @@
|
|||||||
package de.bluecolored.bluemap.sponge;
|
package de.bluecolored.bluemap.sponge;
|
||||||
|
|
||||||
import com.flowpowered.math.vector.Vector3d;
|
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.Gamemode;
|
||||||
import de.bluecolored.bluemap.common.serverinterface.Player;
|
import de.bluecolored.bluemap.common.serverinterface.Player;
|
||||||
import de.bluecolored.bluemap.common.plugin.text.Text;
|
|
||||||
import org.spongepowered.api.Sponge;
|
import org.spongepowered.api.Sponge;
|
||||||
import org.spongepowered.api.data.Keys;
|
import org.spongepowered.api.data.Keys;
|
||||||
import org.spongepowered.api.effect.VanishState;
|
import org.spongepowered.api.effect.VanishState;
|
||||||
@ -36,7 +36,6 @@
|
|||||||
import org.spongepowered.api.entity.living.player.gamemode.GameMode;
|
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.gamemode.GameModes;
|
||||||
import org.spongepowered.api.entity.living.player.server.ServerPlayer;
|
import org.spongepowered.api.entity.living.player.server.ServerPlayer;
|
||||||
import org.spongepowered.api.world.LightTypes;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -159,8 +158,9 @@ public void update() {
|
|||||||
this.rotation = SpongePlugin.fromSpongePoweredVector(player.rotation());
|
this.rotation = SpongePlugin.fromSpongePoweredVector(player.rotation());
|
||||||
this.sneaking = player.get(Keys.IS_SNEAKING).orElse(false);
|
this.sneaking = player.get(Keys.IS_SNEAKING).orElse(false);
|
||||||
|
|
||||||
this.skyLight = player.world().light(LightTypes.SKY, player.blockPosition());
|
// not implemented in sponge
|
||||||
this.blockLight = player.world().light(LightTypes.BLOCK, player.blockPosition());
|
this.skyLight = 15; //player.world().light(LightTypes.SKY, player.blockPosition());
|
||||||
|
this.blockLight = 0; //player.world().light(LightTypes.BLOCK, player.blockPosition());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var world = SpongePlugin.getInstance().getWorld(player.world());
|
var world = SpongePlugin.getInstance().getWorld(player.world());
|
||||||
|
Loading…
Reference in New Issue
Block a user