Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/bin/
.classpath
.project
*.jar
File renamed without changes.
8 changes: 5 additions & 3 deletions src/net/richardprojects/autismchat3/AutismChat3.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import net.richardprojects.autismchat3.events.PDeathEvent;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
Expand Down Expand Up @@ -84,13 +85,14 @@ public void onEnable() {
manager = Bukkit.getScoreboardManager();
board = manager.getNewScoreboard();
yellowTeam = board.registerNewTeam("yellowTeam");
yellowTeam.setPrefix(Utils.colorCodes(Messages.color_yellow));
yellowTeam.setColor(ChatColor.YELLOW);
blueTeam = board.registerNewTeam("blueTeam");
blueTeam.setPrefix(Utils.colorCodes(Messages.color_blue));
blueTeam.setColor(ChatColor.BLUE);
redTeam = board.registerNewTeam("redTeam");
redTeam.setColor(ChatColor.DARK_RED);
redTeam.setPrefix(Utils.colorCodes(Messages.color_red));
greenTeam = board.registerNewTeam("greenTeam");
greenTeam.setPrefix(Utils.colorCodes(Messages.color_green));
greenTeam.setColor(ChatColor.DARK_GREEN);

loadPlayerData();
loadPartyData();
Expand Down
9 changes: 3 additions & 6 deletions src/net/richardprojects/autismchat3/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@
package net.richardprojects.autismchat3;

import java.io.BufferedReader;
import java.io.PrintWriter;
import java.io.InputStreamReader;

import net.md_5.bungee.api.ChatColor;

import java.io.PrintWriter;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.craftbukkit.libs.jline.internal.Log;
import net.md_5.bungee.api.ChatColor;

public class Config {

Expand Down Expand Up @@ -54,7 +51,7 @@ public static void setupConfig(AutismChat3 plugin) {
config = new YamlConfiguration();
config.load(plugin.config);
} catch (Exception e) {
Log.info(" There was an error setting up the config file...");
AutismChat3.log.info(" There was an error setting up the config file...");
e.printStackTrace();
}
}
Expand Down
4 changes: 1 addition & 3 deletions src/net/richardprojects/autismchat3/Messages.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;

import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.craftbukkit.libs.jline.internal.Log;

public class Messages {
public static String color_red;
Expand Down Expand Up @@ -102,7 +100,7 @@ public static void setupMessages() {
messagesConfig = new YamlConfiguration();
messagesConfig.load(AutismChat3.messages);
} catch (Exception e) {
Log.info(" There was an error setting up the config file...");
AutismChat3.log.info(" There was an error setting up the config file...");
e.printStackTrace();
}
}
Expand Down
6 changes: 0 additions & 6 deletions src/net/richardprojects/autismchat3/PartyUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,13 @@
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;

import org.bukkit.craftbukkit.libs.jline.internal.Log;
import org.bukkit.entity.Player;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ public boolean onCommand(CommandSender sender, Command arg1, String arg2, String
msg = msg.replace("{yellow_list}", yellowList);
player.sendMessage(msg);

System.out.println("in yellow command");
// update the player teams
Team playerTeam = AutismChat3.board.getPlayerTeam(player);
System.out.println("current team is " + playerTeam);
if(playerTeam != null) {
String name = playerTeam.getName();
if(name.equals("greenTeam")) {
Expand All @@ -68,6 +70,7 @@ public boolean onCommand(CommandSender sender, Command arg1, String arg2, String
AutismChat3.yellowTeam.addPlayer(player);
for(Player cPlayer : plugin.getServer().getOnlinePlayers()) {
cPlayer.setScoreboard(AutismChat3.board);
System.out.println("updating scoreboard for " + cPlayer + " " + AutismChat3.board);
}

new SwitchYellowTask(player.getUniqueId()).runTaskAsynchronously(plugin);
Expand Down