Skip to content

Commit

Permalink
Merge pull request #59 from RedstoneFuture/Improvements/Commands
Browse files Browse the repository at this point in the history
Improvements/commands (A)
  • Loading branch information
daniel-naegele authored Jan 9, 2023
2 parents b14e95d + a4142c4 commit d6d4761
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,15 @@ public static Location getFallbackSpawn() {

return location;
}

public static void setFallbackSpawn(Location spawnLocation) {
cfg.set("fallback_spawn.world", spawnLocation.getWorld().getName());
cfg.set("fallback_spawn.x", spawnLocation.getX());
cfg.set("fallback_spawn.y", spawnLocation.getY());
cfg.set("fallback_spawn.z", spawnLocation.getZ());
cfg.set("fallback_spawn.yaw", spawnLocation.getYaw());
cfg.set("fallback_spawn.pitch", spawnLocation.getPitch());
}

public static YamlConfiguration getConfig() {
return cfg;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public void run() {
}.runTaskLater(MissileWars.getInstance(), 2);
}

private PlayerArenaJoinEvent registerPlayerArenaJoinEvent(Player player, Game game) {
public PlayerArenaJoinEvent registerPlayerArenaJoinEvent(Player player, Game game) {
PlayerArenaJoinEvent onJoinGame = new PlayerArenaJoinEvent(player, game);
Bukkit.getPluginManager().callEvent(onJoinGame);

Expand All @@ -166,7 +166,7 @@ private PlayerArenaJoinEvent registerPlayerArenaJoinEvent(Player player, Game ga
return onJoinGame;
}

private PlayerArenaLeaveEvent registerPlayerArenaLeaveEvent(Player player, Game game) {
public PlayerArenaLeaveEvent registerPlayerArenaLeaveEvent(Player player, Game game) {
PlayerArenaLeaveEvent onLeaveGame = new PlayerArenaLeaveEvent(player, game);
Bukkit.getPluginManager().callEvent(onLeaveGame);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public void onBlockPhysics(BlockPhysicsEvent event) {
getGame().getTeam1().setGameResult(GameResult.LOSE);
getGame().getTeam2().setGameResult(GameResult.WIN);
}

getGame().sendGameResult();
getGame().stopGame();
}
Expand Down

0 comments on commit d6d4761

Please sign in to comment.