Set players to creative and flying on join

This commit is contained in:
Spencer 2017-12-30 21:39:00 -05:00 committed by Alexander Meech
parent dcafcbef76
commit 9707b46f50
2 changed files with 5 additions and 0 deletions

View File

@ -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);

View File

@ -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