mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-02 17:00:19 +01:00
Fix GamemodeInventories incompatibility; resolves #184
This commit is contained in:
parent
d900c80cf7
commit
3801466746
@ -31,6 +31,7 @@ import org.bukkit.block.Block;
|
||||
import org.bukkit.block.Sign;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.block.SignChangeEvent;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
/**
|
||||
* Represents a player in a DEditWorld.
|
||||
@ -41,10 +42,17 @@ public class DEditPlayer extends DInstancePlayer {
|
||||
|
||||
private String[] linesCopy;
|
||||
|
||||
public DEditPlayer(Player player, DEditWorld world) {
|
||||
public DEditPlayer(final Player player, DEditWorld world) {
|
||||
super(player, world.getWorld());
|
||||
|
||||
// Set gamemode a few ticks later to avoid incompatibilities with plugins that force a gamemode
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
player.setGameMode(GameMode.CREATIVE);
|
||||
}
|
||||
}.runTaskLater(plugin, 10L);
|
||||
|
||||
clearPlayerData();
|
||||
|
||||
Location teleport = world.getLobbyLocation();
|
||||
|
Loading…
Reference in New Issue
Block a user