From 7bbcb7e5a01d6ab908663d14edbfe52f75260ae2 Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Sun, 6 Nov 2016 17:39:21 -0500 Subject: [PATCH] eclipse's being glitchy --- src/alisolarflare/uhc/UHCModule.java | 1 + src/alisolarflare/uhc/idle/AddToUHC.java | 2 +- src/alisolarflare/uhc/idle/JoinUHC.java | 2 +- src/alisolarflare/uhc/memory/UHCMatch.java | 34 +++++++++++++++++++--- 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/src/alisolarflare/uhc/UHCModule.java b/src/alisolarflare/uhc/UHCModule.java index eebbb43..1f1b5e4 100644 --- a/src/alisolarflare/uhc/UHCModule.java +++ b/src/alisolarflare/uhc/UHCModule.java @@ -31,5 +31,6 @@ public class UHCModule extends Module { registerCommand(plugin, new StartMatch(match)); registerCommand(plugin, new ConfigureMatch(match)); registerCommand(plugin, new ScheduleMatch(match)); + } } diff --git a/src/alisolarflare/uhc/idle/AddToUHC.java b/src/alisolarflare/uhc/idle/AddToUHC.java index f4e2dad..92f2b44 100644 --- a/src/alisolarflare/uhc/idle/AddToUHC.java +++ b/src/alisolarflare/uhc/idle/AddToUHC.java @@ -38,7 +38,7 @@ public class AddToUHC extends TBMCCommandBase { // Adds players to memory sender.sendMessage("Adding Players to matchList!"); for (int i = 0; i > args.length; i++) { - match.playerList.add(args[i]); + match.getPlayerList().add(args[i]); }sender.sendMessage("Finished!"); case PEACE: case TENSION: diff --git a/src/alisolarflare/uhc/idle/JoinUHC.java b/src/alisolarflare/uhc/idle/JoinUHC.java index 5ebcb69..1f61fea 100644 --- a/src/alisolarflare/uhc/idle/JoinUHC.java +++ b/src/alisolarflare/uhc/idle/JoinUHC.java @@ -34,7 +34,7 @@ public class JoinUHC extends TBMCCommandBase{ case SETUP: case INTRO: player.sendMessage("Adding you to the UltraHardcore match!"); - match.playerList.add(player.getName()); + match.getPlayerList().add(player.getName()); break; //During the game diff --git a/src/alisolarflare/uhc/memory/UHCMatch.java b/src/alisolarflare/uhc/memory/UHCMatch.java index 4c4049a..1583eef 100644 --- a/src/alisolarflare/uhc/memory/UHCMatch.java +++ b/src/alisolarflare/uhc/memory/UHCMatch.java @@ -3,16 +3,25 @@ package alisolarflare.uhc.memory; import java.util.ArrayList; import java.util.List; +import org.bukkit.Location; +import org.bukkit.World; import org.bukkit.configuration.file.FileConfiguration; public class UHCMatch { - public List playerList = new ArrayList(); + private FileConfiguration config; private MatchState matchState = MatchState.IDLE; - private FileConfiguration fileConfiguration; + private List playerList = new ArrayList(); + private Location lobbyLocation; + private Location spawnLocation; + + private World ultraHardcoreWorld; + + private int worldBorderMaxRadius; + private int worldBorderMinRadius; public UHCMatch(FileConfiguration fileConfiguration, MatchState state) { - this.fileConfiguration = fileConfiguration; + this.config = fileConfiguration; this.matchState = state; } @@ -22,11 +31,28 @@ public class UHCMatch { public void setMatchState(MatchState newMS){ matchState = newMS; - fileConfiguration.set("UHCMatchState", newMS.toString()); + config.set("UHCMatchState", newMS.toString()); switch(newMS){ default: break; } } + + public List getPlayerList() { + return playerList; + } + + public void setPlayerList(List playerList) { + this.playerList = playerList; + } + + public Location getLobbyLocation() { + + return lobbyLocation; + } + + public void setLobbyLocation(Location lobbyLocation) { + this.lobbyLocation = lobbyLocation; + } }