Skip to content

Commit

Permalink
Make one single unified Jar for bungee and Spigot
Browse files Browse the repository at this point in the history
  • Loading branch information
HeroCC committed Jun 20, 2016
1 parent 513f0bb commit 032a775
Show file tree
Hide file tree
Showing 17 changed files with 41 additions and 69 deletions.
14 changes: 0 additions & 14 deletions CommandSyncClient/CommandSyncClient.iml

This file was deleted.

14 changes: 0 additions & 14 deletions CommandSyncServer/CommandSyncServer.iml

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void onEnable() {

public void onDisable() {
saveData();
debugger.close();
debugger.close();
}

private String[] loadConfig() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

public class CSS extends Plugin {

public static List<String> oq = Collections.synchronizedList(new ArrayList<String>());
public static String spacer = "@#@";
public ServerSocket server;
public static List<String> oq = Collections.synchronizedList(new ArrayList<String>());
public static String spacer = "@#@";
public ServerSocket server;
public Set<String> c = Collections.synchronizedSet(new HashSet<String>());
public Map<String, List<String>> pq = Collections.synchronizedMap(new HashMap<String, List<String>>());
public Map<String, Integer> qc = Collections.synchronizedMap(new HashMap<String, Integer>());
Expand Down
33 changes: 33 additions & 0 deletions src/main/java/com/fuzzoland/CommandSyncServer/CommandThread.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package com.fuzzoland.CommandSyncServer;

import net.md_5.bungee.api.connection.ProxiedPlayer;

import java.util.List;

public class CommandThread implements Runnable {

private CSS plugin;
private ProxiedPlayer player;
private String name;
private List<String> commands;

public CommandThread(CSS plugin, ProxiedPlayer player) {
this.plugin = plugin;
this.player = player;
this.name = player.getName();
this.commands = plugin.pq.get(name);
}

public void run() {
try {
for (String command : commands) {
player.chat(command);
plugin.debugger.debug("Ran command " + command + " for player " + name + ".");
}
plugin.pq.remove(name);
return;
} catch (IllegalStateException e1) {
e1.printStackTrace();
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CommandSync
main: com.fuzzoland.CommandSyncServer.CSS
version: 2.3
author: YoFuzzy3
version: 2.4
author: YoFuzzy3
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CommandSync
main: com.fuzzoland.CommandSyncClient.CSC
version: 2.3
version: 2.4
author: YoFuzzy3

commands:
Expand All @@ -10,4 +10,4 @@ commands:
permissions:
sync.use:
description: Access to /sync.
default: op
default: op

0 comments on commit 032a775

Please sign in to comment.