Set players to creative and flying on join
This commit is contained in:
parent
dcafcbef76
commit
9707b46f50
@ -117,6 +117,7 @@ public class MapCommand extends BaseCommand
|
|||||||
message(player, "Teleporting to World: " + F.elem(worldName));
|
message(player, "Teleporting to World: " + F.elem(worldName));
|
||||||
|
|
||||||
_teleportManager.teleportPlayer(player, new Location(world, 0, 106, 0));
|
_teleportManager.teleportPlayer(player, new Location(world, 0, 106, 0));
|
||||||
|
player.setFlying(true);
|
||||||
|
|
||||||
MapData data = getPlugin().getData(worldName);
|
MapData data = getPlugin().getData(worldName);
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ package mineplex.mapparser.module.modules;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -202,6 +203,9 @@ public class EventModule extends Module
|
|||||||
public void Join(PlayerJoinEvent event)
|
public void Join(PlayerJoinEvent event)
|
||||||
{
|
{
|
||||||
event.setJoinMessage(F.sys("Player Join", event.getPlayer().getName()));
|
event.setJoinMessage(F.sys("Player Join", event.getPlayer().getName()));
|
||||||
|
|
||||||
|
event.getPlayer().setGameMode(GameMode.CREATIVE);
|
||||||
|
event.getPlayer().setFlying(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
Loading…
Reference in New Issue
Block a user