eclipse's being glitchy

This commit is contained in:
alisolarflare 2016-11-06 17:39:21 -05:00
parent 71458fb730
commit 7bbcb7e5a0
4 changed files with 33 additions and 6 deletions

View file

@ -31,5 +31,6 @@ public class UHCModule extends Module {
registerCommand(plugin, new StartMatch(match));
registerCommand(plugin, new ConfigureMatch(match));
registerCommand(plugin, new ScheduleMatch(match));
}
}

View file

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

View file

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

View file

@ -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<String> playerList = new ArrayList<String>();
private FileConfiguration config;
private MatchState matchState = MatchState.IDLE;
private FileConfiguration fileConfiguration;
private List<String> playerList = new ArrayList<String>();
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<String> getPlayerList() {
return playerList;
}
public void setPlayerList(List<String> playerList) {
this.playerList = playerList;
}
public Location getLobbyLocation() {
return lobbyLocation;
}
public void setLobbyLocation(Location lobbyLocation) {
this.lobbyLocation = lobbyLocation;
}
}