Cleanup part 1 (#213)

* Clean up part 1

- Removed lots of dead code
- Removed unncessary files not in use
- Cleaned up small bits of code
- Removed a few warnings
- Server.java ---> GameEngine.java
- Constants.java ---> GameConstants.java

* Cape Dye

Rewrote cape dying

* Packaging

- redone ----> com.rebotted

* PacketSender/clean up

- ActionSender ---> PacketSender
- Moved many more packets to packetsender
- Cleaned up more dead code

* Merge Client/Player

- Merged Client.java with Player.java (both were doing same thing so redundant to have both)
- Removed some more dead code
- Tidy a few small things up

* Quests/more clean up

- Removed more dead code
- Made quests static in order to clean them up a bit

* More cleanup

- Removed some more of the dead quest code
- Correcting naming of some of the shop variables
This commit is contained in:
Mr Extremez
2019-11-25 11:08:56 -06:00
committed by Daniel Ginovker
parent 3d1ae1b288
commit d876a923b9
379 changed files with 80684 additions and 83170 deletions
@@ -0,0 +1,36 @@
package com.rebotted.util;
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.List;
public class HostBlacklist {
private static final String BLACKLIST_DIR = "./data/blacklist.txt";
private static List<String> blockedHostnames = new ArrayList<String>();
public static List<String> getBlockedHostnames() {
return blockedHostnames;
}
public static boolean isBlocked(String host) {
return blockedHostnames.contains(host.toLowerCase());
}
public static void loadBlacklist() {
String word = null;
try {
BufferedReader in = new BufferedReader(
new FileReader(BLACKLIST_DIR));
while ((word = in.readLine()) != null) {
blockedHostnames.add(word.toLowerCase());
}
in.close();
in = null;
} catch (final Exception e) {
System.out.println("Could not load blacklisted hosts.");
}
}
}