Prev commit fixed #34, #21 is still WIP

This commit is contained in:
Norbi Peti 2016-06-23 01:09:49 +02:00
parent bce31de137
commit 838fa9fe03
11 changed files with 399 additions and 414 deletions

View file

@ -1,4 +1,4 @@
package io.github.norbipeti.thebuttonmc; package io.github.norbipeti.thebuttonmcchat;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View file

@ -1,4 +1,4 @@
package io.github.norbipeti.thebuttonmc; package io.github.norbipeti.thebuttonmcchat;
public class Channel { public class Channel {
public final String DisplayName; public final String DisplayName;

View file

@ -1,6 +1,6 @@
package io.github.norbipeti.thebuttonmc; package io.github.norbipeti.thebuttonmcchat;
import io.github.norbipeti.thebuttonmc.commands.UnlolCommand; import io.github.norbipeti.thebuttonmcchat.commands.UnlolCommand;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.net.URL; import java.net.URL;

View file

@ -1,4 +1,4 @@
package io.github.norbipeti.thebuttonmc; package io.github.norbipeti.thebuttonmcchat;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
@ -214,21 +214,6 @@ public class Commands implements CommandExecutor {
if (player == null || player.isOp() if (player == null || player.isOp()
|| player.getName().equals("NorbiPeti")) { || player.getName().equals("NorbiPeti")) {
switch (args[1].toLowerCase()) { switch (args[1].toLowerCase()) {
case "add":
if (args.length < 3) {
SendMessage(player, "§cUsage: /u announce add <message>");
return;
}
StringBuilder sb = new StringBuilder();
for (int i = 2; i < args.length; i++) {
sb.append(args[i]);
if (i != args.length - 1)
sb.append(" ");
}
String finalmessage = sb.toString().replace('&', '§');
PluginMain.AnnounceMessages.add(finalmessage);
SendMessage(player, "§bAnnouncement added.§r");
break;
case "remove": case "remove":
if (args.length < 3) { if (args.length < 3) {
SendMessage(player, "§cUsage: /u announce remove <index>"); SendMessage(player, "§cUsage: /u announce remove <index>");

View file

@ -1,4 +1,4 @@
package io.github.norbipeti.thebuttonmc; package io.github.norbipeti.thebuttonmcchat;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.List; import java.util.List;

View file

@ -1,4 +1,4 @@
package io.github.norbipeti.thebuttonmc; package io.github.norbipeti.thebuttonmcchat;
public enum FlairStates { public enum FlairStates {
Accepted, Ignored, Recognised, Commented, NoComment Accepted, Ignored, Recognised, Commented, NoComment

View file

@ -1,4 +1,4 @@
package io.github.norbipeti.thebuttonmc; package io.github.norbipeti.thebuttonmcchat;
import java.io.BufferedInputStream; import java.io.BufferedInputStream;
import java.io.BufferedOutputStream; import java.io.BufferedOutputStream;

View file

@ -1,4 +1,4 @@
package io.github.norbipeti.thebuttonmc; package io.github.norbipeti.thebuttonmcchat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;

View file

@ -1,4 +1,4 @@
package io.github.norbipeti.thebuttonmc; package io.github.norbipeti.thebuttonmcchat;
import java.util.TimerTask; import java.util.TimerTask;

View file

@ -1,4 +1,4 @@
package io.github.norbipeti.thebuttonmc; package io.github.norbipeti.thebuttonmcchat;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;

View file

@ -1,4 +1,4 @@
package io.github.norbipeti.thebuttonmc; package io.github.norbipeti.thebuttonmcchat;
import net.milkbowl.vault.chat.Chat; import net.milkbowl.vault.chat.Chat;
import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.economy.Economy;
@ -25,7 +25,7 @@ import com.palmergames.bukkit.towny.object.Nation;
import com.palmergames.bukkit.towny.object.Town; import com.palmergames.bukkit.towny.object.Town;
import com.palmergames.bukkit.towny.object.TownyUniverse; import com.palmergames.bukkit.towny.object.TownyUniverse;
import io.github.norbipeti.thebuttonmc.commands.TBMCCommandBase; import io.github.norbipeti.thebuttonmcchat.commands.TBMCCommandBase;
import java.io.*; import java.io.*;
import java.lang.String; import java.lang.String;