diff --git a/Typa (Authentication)/.classpath b/Typa (Authentication)/.classpath
deleted file mode 100644
index 9604cd2e..00000000
--- a/Typa (Authentication)/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/Typa (Authentication)/.project b/Typa (Authentication)/.project
deleted file mode 100644
index 771bf21c..00000000
--- a/Typa (Authentication)/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- Typa (Authentication)
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
-
- org.eclipse.jdt.core.javanature
-
-
diff --git a/Typa (Authentication)/.settings/org.eclipse.jdt.core.prefs b/Typa (Authentication)/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 3a215370..00000000
--- a/Typa (Authentication)/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,11 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.8
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
diff --git a/Typa (Authentication)/bin/net/rifthq/typa/Typa.class b/Typa (Authentication)/bin/net/rifthq/typa/Typa.class
deleted file mode 100644
index c04d072b..00000000
Binary files a/Typa (Authentication)/bin/net/rifthq/typa/Typa.class and /dev/null differ
diff --git a/Typa (Authentication)/bin/net/rifthq/typa/listeners/PlayerBuildListeners.class b/Typa (Authentication)/bin/net/rifthq/typa/listeners/PlayerBuildListeners.class
deleted file mode 100644
index c9a892b2..00000000
Binary files a/Typa (Authentication)/bin/net/rifthq/typa/listeners/PlayerBuildListeners.class and /dev/null differ
diff --git a/Typa (Authentication)/bin/net/rifthq/typa/listeners/PlayerCommandListener.class b/Typa (Authentication)/bin/net/rifthq/typa/listeners/PlayerCommandListener.class
deleted file mode 100644
index 24625b41..00000000
Binary files a/Typa (Authentication)/bin/net/rifthq/typa/listeners/PlayerCommandListener.class and /dev/null differ
diff --git a/Typa (Authentication)/bin/net/rifthq/typa/listeners/PlayerDamageListener.class b/Typa (Authentication)/bin/net/rifthq/typa/listeners/PlayerDamageListener.class
deleted file mode 100644
index 84f59016..00000000
Binary files a/Typa (Authentication)/bin/net/rifthq/typa/listeners/PlayerDamageListener.class and /dev/null differ
diff --git a/Typa (Authentication)/bin/net/rifthq/typa/listeners/PlayerIntractListener.class b/Typa (Authentication)/bin/net/rifthq/typa/listeners/PlayerIntractListener.class
deleted file mode 100644
index 2503d4d6..00000000
Binary files a/Typa (Authentication)/bin/net/rifthq/typa/listeners/PlayerIntractListener.class and /dev/null differ
diff --git a/Typa (Authentication)/bin/net/rifthq/typa/listeners/PlayerJoinListener.class b/Typa (Authentication)/bin/net/rifthq/typa/listeners/PlayerJoinListener.class
deleted file mode 100644
index 403efa21..00000000
Binary files a/Typa (Authentication)/bin/net/rifthq/typa/listeners/PlayerJoinListener.class and /dev/null differ
diff --git a/Typa (Authentication)/bin/net/rifthq/typa/listeners/PlayerLeaveListener.class b/Typa (Authentication)/bin/net/rifthq/typa/listeners/PlayerLeaveListener.class
deleted file mode 100644
index b169b5e9..00000000
Binary files a/Typa (Authentication)/bin/net/rifthq/typa/listeners/PlayerLeaveListener.class and /dev/null differ
diff --git a/Typa (Authentication)/bin/net/rifthq/typa/listeners/PlayerMoveListener.class b/Typa (Authentication)/bin/net/rifthq/typa/listeners/PlayerMoveListener.class
deleted file mode 100644
index 930aaac5..00000000
Binary files a/Typa (Authentication)/bin/net/rifthq/typa/listeners/PlayerMoveListener.class and /dev/null differ
diff --git a/Typa (Authentication)/bin/net/rifthq/typa/managers/MySQL.class b/Typa (Authentication)/bin/net/rifthq/typa/managers/MySQL.class
deleted file mode 100644
index 9899d5f5..00000000
Binary files a/Typa (Authentication)/bin/net/rifthq/typa/managers/MySQL.class and /dev/null differ
diff --git a/Typa (Authentication)/config.yml b/Typa (Authentication)/config.yml
deleted file mode 100644
index 8bb58365..00000000
--- a/Typa (Authentication)/config.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-host: '127.0.0.1'
-port: 3306
-username: 'root'
-password: 'password'
-database: 'login'
-table: 'login_data'
\ No newline at end of file
diff --git a/Typa (Authentication)/plugin.yml b/Typa (Authentication)/plugin.yml
deleted file mode 100644
index 1e8fd9ee..00000000
--- a/Typa (Authentication)/plugin.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-name: Typa
-version: 1.0
-main: net.rifthq.typa.Typa
-author: [puttydotexe, CoderSYD]
-commands:
- register:
- description: Register Account!
- login:
- description: Login to Account!
\ No newline at end of file
diff --git a/Typa (Authentication)/src/net/rifthq/typa/Typa.java b/Typa (Authentication)/src/net/rifthq/typa/Typa.java
deleted file mode 100644
index 9291b7af..00000000
--- a/Typa (Authentication)/src/net/rifthq/typa/Typa.java
+++ /dev/null
@@ -1,213 +0,0 @@
-package net.rifthq.typa;
-
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.SQLException;
-import java.util.ArrayList;
-
-import org.bukkit.Bukkit;
-import org.bukkit.command.Command;
-import org.bukkit.command.CommandSender;
-import org.bukkit.command.ConsoleCommandSender;
-import org.bukkit.entity.Player;
-import org.bukkit.event.Listener;
-import org.bukkit.plugin.Plugin;
-import org.bukkit.plugin.PluginManager;
-import org.bukkit.plugin.RegisteredServiceProvider;
-import org.bukkit.plugin.java.JavaPlugin;
-
-import net.md_5.bungee.api.ChatColor;
-import net.milkbowl.vault.permission.Permission;
-import net.rifthq.typa.listeners.PlayerBuildListeners;
-import net.rifthq.typa.listeners.PlayerCommandListener;
-import net.rifthq.typa.listeners.PlayerDamageListener;
-import net.rifthq.typa.listeners.PlayerIntractListener;
-import net.rifthq.typa.listeners.PlayerJoinListener;
-import net.rifthq.typa.listeners.PlayerLeaveListener;
-import net.rifthq.typa.listeners.PlayerMoveListener;
-import net.rifthq.typa.managers.MySQL;
-
-public class Typa extends JavaPlugin
-{
- private static Typa instance;
- public static ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();
- public static PluginManager pm = Bukkit.getServer().getPluginManager();
- public String host;
- public String username;
- public String password;
- public String database;
- public String table;
- public int port;
- private Connection connection;
- private static Permission perms = null;
- public static ArrayList logged_in = new ArrayList();
-
- public static Typa getInstance()
- {
- if (instance == null)
- {
- instance = new Typa();
- }
- return instance;
- }
-
- @Override
- public void onEnable()
- {
- instance = this;
- console.sendMessage(ChatColor.GREEN + "[Typa] Has enabled 100%");
- this.MySQLSetup();
- this.getConfig().options().copyDefaults(true);
- this.saveConfig();
- setupPermissions();
- pm.registerEvents(new PlayerMoveListener(), this);
- pm.registerEvents(new PlayerJoinListener(), this);
- pm.registerEvents(new PlayerLeaveListener(), this);
- pm.registerEvents(new PlayerDamageListener(), this);
- pm.registerEvents(new PlayerBuildListeners(), this);
- pm.registerEvents(new PlayerCommandListener(), this);
- pm.registerEvents(new PlayerIntractListener(), this);
- }
-
- @Override
- public void onDisable()
- {
- instance = null;
- this.saveConfig();
- try
- {
- if (this.connection != null && !this.connection.isClosed())
- {
- this.connection.close();
- console.sendMessage("[Typa] Successfully closed connection to SQL.");
- }
- }
- catch (SQLException e)
- {
- e.printStackTrace();
- }
- }
-
- public void MySQLSetup()
- {
- this.host = this.getConfig().getString("host");
- this.port = this.getConfig().getInt("port");
- this.username = this.getConfig().getString("username");
- this.password = this.getConfig().getString("password");
- this.database = this.getConfig().getString("database");
- this.table = this.getConfig().getString("table");
- try
- {
- Typa login = this;
- synchronized (login)
- {
- if (this.getConnection() != null && !this.getConnection().isClosed()) { return; }
- Class.forName("com.mysql.jdbc.Driver");
- this.setConnection(DriverManager.getConnection("jdbc:mysql://" + this.host + ":" + this.port + "/" + this.database, this.username, this.password));
- console.sendMessage("[Typa] Successfully connected to SQL.");
- }
- }
- catch (SQLException e)
- {
- e.printStackTrace();
- Bukkit.getServer().shutdown();
- }
- catch (ClassNotFoundException e)
- {
- e.printStackTrace();
- Bukkit.getServer().shutdown();
- }
- }
-
- public Connection getConnection()
- {
- return this.connection;
- }
-
- public void setConnection(Connection connection)
- {
- this.connection = connection;
- }
-
- @Override
- public boolean onCommand(CommandSender sender, Command command, String label, String[] args)
- {
- Player p = (Player) sender;
- if (label.equalsIgnoreCase("register"))
- {
-
- if (sender instanceof Player)
- {
- if (!sender.hasPermission("rifthq.register"))
- {
- sender.sendMessage(ChatColor.RED + "You are already authenticated as a " + Typa.getPermissions().getPrimaryGroup(p) + ".");
- return true;
- }
- if (args.length == 1)
- {
- if (args[0].length() > 25)
- {
- p.sendMessage(ChatColor.RED + "Your password must contain less than 50 characters!");
- return true;
- }
- if (args[0].length() < 5)
- {
- p.sendMessage(ChatColor.RED + "Your password must contain more than 5 characters!");
- return true;
- }
- MySQL.registerPlayer(p.getUniqueId(), p, args[0], p.getAddress().getHostName().toString());
- }
- else
- {
- p.sendMessage(ChatColor.RED + "/register ");
- }
- }
- else
- {
- sender.sendMessage("Player Only Command!");
- }
- return true;
- }
- if (label.equalsIgnoreCase("login"))
- {
- if (sender instanceof Player)
- {
- if (!sender.hasPermission("rifthq.register"))
- {
- sender.sendMessage(ChatColor.RED + "You are already authenticated as a " + Typa.getPermissions().getPrimaryGroup(p) + ".");
- return true;
- }
- if (logged_in.contains(p.getName()))
- {
- p.sendMessage(ChatColor.RED + "You are already logged in!");
- return true;
- }
- if (args.length == 1)
- {
- MySQL.playerLogin(p.getUniqueId(), p, args[0]);
- }
- else
- {
- p.sendMessage(ChatColor.RED + "/login ");
- }
- }
- else
- {
- sender.sendMessage("Player Only Command!");
- }
- }
- return false;
- }
-
- private boolean setupPermissions()
- {
- RegisteredServiceProvider rsp = getServer().getServicesManager().getRegistration(Permission.class);
- perms = rsp.getProvider();
- return perms != null;
- }
-
- public static Permission getPermissions()
- {
- return perms;
- }
-}
diff --git a/Typa (Authentication)/src/net/rifthq/typa/listeners/PlayerBuildListeners.java b/Typa (Authentication)/src/net/rifthq/typa/listeners/PlayerBuildListeners.java
deleted file mode 100644
index d4d7a02c..00000000
--- a/Typa (Authentication)/src/net/rifthq/typa/listeners/PlayerBuildListeners.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package net.rifthq.typa.listeners;
-
-import org.bukkit.entity.Player;
-import org.bukkit.event.EventHandler;
-import org.bukkit.event.Listener;
-import org.bukkit.event.block.BlockBreakEvent;
-import org.bukkit.event.block.BlockPlaceEvent;
-
-import net.md_5.bungee.api.ChatColor;
-import net.rifthq.typa.Typa;
-
-public class PlayerBuildListeners implements Listener {
- @EventHandler
- public void place(BlockPlaceEvent e) {
- Player p = e.getPlayer();
- if (!Typa.logged_in.contains(p.getName()) && p.hasPermission("rifthq.login")) {
- e.setCancelled(true);
- p.sendMessage(ChatColor.RED + ("You must login before attempting to placing blocks!"));
- }
- }
-
- @EventHandler
- public void breakblock(BlockBreakEvent e) {
- Player p = e.getPlayer();
- if (!Typa.logged_in.contains(p.getName()) && p.hasPermission("rifthq.login")) {
- e.setCancelled(true);
- p.sendMessage(ChatColor.RED + ("You must login before attempting to breaking blocks!"));
- }
- }
-}
diff --git a/Typa (Authentication)/src/net/rifthq/typa/listeners/PlayerCommandListener.java b/Typa (Authentication)/src/net/rifthq/typa/listeners/PlayerCommandListener.java
deleted file mode 100644
index 4c183298..00000000
--- a/Typa (Authentication)/src/net/rifthq/typa/listeners/PlayerCommandListener.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package net.rifthq.typa.listeners;
-
-import org.bukkit.entity.Player;
-import org.bukkit.event.EventHandler;
-import org.bukkit.event.Listener;
-import org.bukkit.event.player.PlayerCommandPreprocessEvent;
-
-import net.md_5.bungee.api.ChatColor;
-import net.rifthq.typa.Typa;
-
-public class PlayerCommandListener implements Listener {
- @EventHandler
- public void on(PlayerCommandPreprocessEvent e) {
- Player p = e.getPlayer();
- if (!Typa.logged_in.contains(p.getName()) && p.hasPermission("rifthq.login")) {
- if (e.getMessage().startsWith("/login")) {
- return;
- }
- if (e.getMessage().startsWith("/register")) {
- return;
- }
- e.setCancelled(true);
- p.sendMessage(ChatColor.RED + ("You must login before attempting to execute a command!"));
- }
- }
-}
diff --git a/Typa (Authentication)/src/net/rifthq/typa/listeners/PlayerDamageListener.java b/Typa (Authentication)/src/net/rifthq/typa/listeners/PlayerDamageListener.java
deleted file mode 100644
index 798621a4..00000000
--- a/Typa (Authentication)/src/net/rifthq/typa/listeners/PlayerDamageListener.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package net.rifthq.typa.listeners;
-
-import org.bukkit.entity.Player;
-import org.bukkit.event.EventHandler;
-import org.bukkit.event.Listener;
-import org.bukkit.event.entity.EntityDamageByEntityEvent;
-
-import net.rifthq.typa.Typa;
-
-public class PlayerDamageListener implements Listener {
- @EventHandler
- public void damager(EntityDamageByEntityEvent e) {
- Player damager;
- if (e.getDamager() instanceof Player && !Typa.logged_in.contains((damager = (Player) e.getDamager()).getName())
- && damager.hasPermission("rifthq.login")) {
- e.setCancelled(true);
- }
- }
-
- @EventHandler
- public void victim(EntityDamageByEntityEvent e) {
- Player player;
- if (e.getEntity() instanceof Player && !Typa.logged_in.contains((player = (Player) e.getEntity()).getName())
- && player.hasPermission("rifthq.login")) {
- e.setCancelled(true);
- }
- }
-}
diff --git a/Typa (Authentication)/src/net/rifthq/typa/listeners/PlayerIntractListener.java b/Typa (Authentication)/src/net/rifthq/typa/listeners/PlayerIntractListener.java
deleted file mode 100644
index 92d04087..00000000
--- a/Typa (Authentication)/src/net/rifthq/typa/listeners/PlayerIntractListener.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package net.rifthq.typa.listeners;
-
-import org.bukkit.entity.Player;
-import org.bukkit.event.EventHandler;
-import org.bukkit.event.Listener;
-import org.bukkit.event.inventory.InventoryClickEvent;
-
-import net.rifthq.typa.Typa;
-
-public class PlayerIntractListener implements Listener {
-
- @EventHandler
- public void onInventoryClick(InventoryClickEvent event) {
- if (event.getClickedInventory() != null) {
- Player player = (Player) event.getWhoClicked();
- if (!Typa.logged_in.contains(player.getName()) && player.hasPermission("rifthq.login")) {
- player.closeInventory();
- event.setCancelled(true);
- }
- }
- }
-}
diff --git a/Typa (Authentication)/src/net/rifthq/typa/listeners/PlayerJoinListener.java b/Typa (Authentication)/src/net/rifthq/typa/listeners/PlayerJoinListener.java
deleted file mode 100644
index 4c3b0e12..00000000
--- a/Typa (Authentication)/src/net/rifthq/typa/listeners/PlayerJoinListener.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package net.rifthq.typa.listeners;
-
-import org.bukkit.entity.Player;
-import org.bukkit.event.EventHandler;
-import org.bukkit.event.Listener;
-import org.bukkit.event.player.PlayerJoinEvent;
-
-public class PlayerJoinListener implements Listener {
- @EventHandler
- public void on(PlayerJoinEvent e) {
- Player p = e.getPlayer();
- p.sendMessage(String.valueOf("\u00a7cIf you are new, please use command /register!"));
- p.sendMessage(String.valueOf("\u00a7cIf you have registered, please use command /login!"));
- }
-}
diff --git a/Typa (Authentication)/src/net/rifthq/typa/listeners/PlayerLeaveListener.java b/Typa (Authentication)/src/net/rifthq/typa/listeners/PlayerLeaveListener.java
deleted file mode 100644
index f7017714..00000000
--- a/Typa (Authentication)/src/net/rifthq/typa/listeners/PlayerLeaveListener.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package net.rifthq.typa.listeners;
-
-import org.bukkit.entity.Player;
-import org.bukkit.event.EventHandler;
-import org.bukkit.event.Listener;
-import org.bukkit.event.player.PlayerQuitEvent;
-
-import net.rifthq.typa.Typa;
-
-public class PlayerLeaveListener implements Listener {
- @EventHandler
- public void on(PlayerQuitEvent e) {
- Player p = e.getPlayer();
- if (Typa.logged_in.contains(p.getName()) && p.hasPermission("rifthq.login")) {
- Typa.logged_in.remove(p.getName());
- }
- }
-}
diff --git a/Typa (Authentication)/src/net/rifthq/typa/listeners/PlayerMoveListener.java b/Typa (Authentication)/src/net/rifthq/typa/listeners/PlayerMoveListener.java
deleted file mode 100644
index 01d1a3fd..00000000
--- a/Typa (Authentication)/src/net/rifthq/typa/listeners/PlayerMoveListener.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package net.rifthq.typa.listeners;
-
-import org.bukkit.entity.Player;
-import org.bukkit.event.EventHandler;
-import org.bukkit.event.Listener;
-import org.bukkit.event.player.PlayerMoveEvent;
-
-import net.rifthq.typa.Typa;
-
-public class PlayerMoveListener implements Listener
-{
- @EventHandler
- public void move(PlayerMoveEvent e)
- {
- Player p = e.getPlayer();
- if (!Typa.logged_in.contains(p.getName()) && p.hasPermission("rifthq.login"))
- {
- e.setTo(e.getFrom());
- }
- }
-}
\ No newline at end of file
diff --git a/Typa (Authentication)/src/net/rifthq/typa/managers/MySQL.java b/Typa (Authentication)/src/net/rifthq/typa/managers/MySQL.java
deleted file mode 100644
index 8fa4cf48..00000000
--- a/Typa (Authentication)/src/net/rifthq/typa/managers/MySQL.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package net.rifthq.typa.managers;
-
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.UUID;
-
-import org.bukkit.entity.Player;
-
-import net.rifthq.typa.Typa;
-
-public class MySQL {
- static Typa plugin = Typa.getPlugin(Typa.class);
-
- public static boolean dataExists(UUID uuid, Player player) {
- try {
- PreparedStatement statement = plugin.getConnection()
- .prepareStatement("SELECT * FROM " + MySQL.plugin.table + " WHERE UUID=?");
- statement.setString(1, uuid.toString());
- ResultSet results = statement.executeQuery();
- if (results.next()) {
- return true;
- }
- } catch (SQLException e) {
- e.printStackTrace();
- }
- return false;
- }
-
- public static void registerPlayer(UUID uuid, Player player, String password, String ip) {
- try {
- if (MySQL.dataExists(uuid, player)) {
-
- //Player login data not found, print command to create pin.
-
- return;
- }
- PreparedStatement statement = plugin.getConnection()
- .prepareStatement("INSERT INTO " + MySQL.plugin.table + " (UUID, PASSWORD, IP) VALUES (?,?,?)");
- statement.setString(1, uuid.toString());
- statement.setString(2, password);
- statement.setString(3, ip.toString());
- statement.executeUpdate();
-
- //Set pin susfully.
-
- Typa.logged_in.add(player.getName());
- } catch (SQLException e) {
- e.printStackTrace();
- //Couldn'tt set pin
-
- }
- }
-
- public static String getPlayerPassword(UUID uuid, Player player) {
- try {
- if (!dataExists(uuid, player)) {
- return null;
- }
- PreparedStatement statement = plugin.getConnection()
- .prepareStatement("SELECT * FROM " + plugin.table + " WHERE UUID=?");
- statement.setString(1, uuid.toString());
-
- ResultSet results = statement.executeQuery();
- results.first();
- return results.getString("PASSWORD");
- } catch (SQLException e) {
- e.printStackTrace();
- }
- return null;
- }
-
- public static String getPlayerIP(UUID uuid, Player player) {
- try {
- if (!dataExists(uuid, player)) {
- return null;
- }
- PreparedStatement statement = plugin.getConnection()
- .prepareStatement("SELECT * FROM " + plugin.table + " WHERE IP=?");
- statement.setString(1, uuid.toString());
-
- ResultSet results = statement.executeQuery();
- results.first();
- return results.getString("IP");
- } catch (SQLException e) {
- e.printStackTrace();
- }
- return null;
- }
-
- public static void playerLogin(UUID uuid, Player player, String password) {
- if (!MySQL.dataExists(uuid, player)) {
- //not set password, print create message.
- return;
- }
- if (password.equals(MySQL.getPlayerPassword(uuid, player))) {
- Typa.logged_in.add(player.getName());
-
- //correct passwrord message
-
- } else {
-
- //incorrect passwword message.
-
- }
- }
-}
diff --git a/Typa(Staff Utils) v1.0/.classpath b/Typa(Staff Utils) v1.0/.classpath
deleted file mode 100644
index 51246483..00000000
--- a/Typa(Staff Utils) v1.0/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/Typa(Staff Utils) v1.0/.project b/Typa(Staff Utils) v1.0/.project
deleted file mode 100644
index b745a159..00000000
--- a/Typa(Staff Utils) v1.0/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- Typa(Staff Utils) v1.0
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
-
- org.eclipse.jdt.core.javanature
-
-
diff --git a/Typa(Staff Utils) v1.0/README.md b/Typa(Staff Utils) v1.0/README.md
deleted file mode 100644
index 43149d8f..00000000
--- a/Typa(Staff Utils) v1.0/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# Typa Staff Authentication
-
-**Advice**
-> Always use latest release rather than cloning and compiling.
-> If security flaws/issues to arise please contact us via PM rather than publicly.
-> In the case that you find a error/glitch arises please make sure you follow the issue template.
->
-
-
diff --git a/Typa(Staff Utils) v1.0/config.yml b/Typa(Staff Utils) v1.0/config.yml
deleted file mode 100644
index e68601e8..00000000
--- a/Typa(Staff Utils) v1.0/config.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-host: 149.56.111.213
-port: 3306
-username: currency
-database: typa
-password: E8ZjXK4ueZ8VGfxD
-table: staff_data
-settings:
- pin:
- maxcharacters: 25
- mincharacters: 5
-
-lang:
- register:
- already: '&cYour already registered. Please use /login to authenticate.'
- toolong: '&cYour password must contain less than %max_characters% characters!'
- tooshort: '&cYour password must contain more than %min_characters% characters!'
- autologin: '&aSuccessfully registered and authenticated.'
- login:
- already: '&cYou are already authenticated!'
- notfound: '&cAccount not found! please use /register to start the authenticate process.'
- successful: '&aSuccessfully authenticated as %player%.'
- incorrect: '&cIncorrect password!'
- kickmesesage: |-
- &7&oAuthentication
- &cYou failed to authenticate therefore you were kicked!
-
-lang.resetip.successful: '&aSuccessfully updated %player%'s authentication profile'
-lang.resetip.self: '&cYou cannot update yourself'
-lang.resetip.notfound: '&cCould not find %player% in the authentication list!'
-
-lang.resetplayer.successful: '&aSuccessfully deleted %player%'s authentication profile'
-lang.resetplayer.self: '&cYou cannot remove yourself'
-lang.resetplayer.notfound: '&cCould not find %player% in the authentication list!'
diff --git a/Typa(Staff Utils) v1.0/net/rifthq/typa/Typa.class b/Typa(Staff Utils) v1.0/net/rifthq/typa/Typa.class
deleted file mode 100644
index d486b24b..00000000
Binary files a/Typa(Staff Utils) v1.0/net/rifthq/typa/Typa.class and /dev/null differ
diff --git a/Typa(Staff Utils) v1.0/net/rifthq/typa/Typa.java b/Typa(Staff Utils) v1.0/net/rifthq/typa/Typa.java
deleted file mode 100644
index 180a1d55..00000000
--- a/Typa(Staff Utils) v1.0/net/rifthq/typa/Typa.java
+++ /dev/null
@@ -1,155 +0,0 @@
-package net.rifthq.typa;
-
-import java.io.File;
-import java.sql.DriverManager;
-import java.sql.SQLException;
-
-import org.bukkit.Bukkit;
-import org.bukkit.command.ConsoleCommandSender;
-import org.bukkit.configuration.file.FileConfigurationOptions;
-import org.bukkit.entity.Player;
-import org.bukkit.plugin.java.JavaPlugin;
-import org.bukkit.potion.PotionEffect;
-import org.bukkit.potion.PotionEffectType;
-
-import com.mysql.jdbc.Connection;
-
-import net.md_5.bungee.api.ChatColor;
-import net.rifthq.typa.commands.LoginCommand;
-import net.rifthq.typa.commands.RegisterCommand;
-import net.rifthq.typa.commands.ResetIPCommand;
-import net.rifthq.typa.commands.ResetPlayerCommand;
-import net.rifthq.typa.listeners.PlayerLoginListeners;
-import net.rifthq.typa.listeners.PlayerMoveListeners;
-import net.rifthq.typa.managers.MySQL;
-import net.rifthq.typa.utils.Lists;
-
-public class Typa extends JavaPlugin {
- private static Typa instance;
- public String host;
- public String username;
- public String password;
- public String database;
- public static String table;
- public int port;
- public static Connection connection;
-
- public static Typa getInstance() {
- if (instance == null) {
- instance = new Typa();
- }
- return instance;
- }
-
- public void onEnable() {
- this.setup();
- }
-
- public void onDisable() {
- instance = null;
- this.saveConfig();
- try {
- if (connection != null && !connection.isClosed()) {
- connection.close();
- getServer().getConsoleSender().sendMessage("[Typa] Successfully closed connection to SQL.");
- }
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
-
- @SuppressWarnings("deprecation")
- private void setup() {
- instance = this;
- this.setupFiles();
- setupMySQL();
- loadCommands();
- loadListeners();
- for (Player online : Bukkit.getServer().getOnlinePlayers()) {
- if (online.hasPermission("typa.auth"))
- Lists.toLogin.add(online.getName());
- online.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 99999, 9999));
- online.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 99999, 9999));
- online.sendMessage(ChatColor.RED + "A server reload has caused you to be placed in authentication mode!");
-
- }
- }
-
- public void loadCommands() {
- getCommand("register").setExecutor(new RegisterCommand());
- getCommand("login").setExecutor(new LoginCommand());
- getCommand("resetpin").setExecutor(new ResetPlayerCommand());
- getCommand("resetplayer").setExecutor(new ResetIPCommand());
- }
-
- public void loadListeners() {
- getServer().getPluginManager().registerEvents(new PlayerLoginListeners(), this);
- getServer().getPluginManager().registerEvents(new PlayerMoveListeners(), this);
- }
-
- public ConsoleCommandSender getConsoleSender() {
- return Bukkit.getServer().getConsoleSender();
- }
-
- public FileConfigurationOptions getFileConfigurationOptions() {
- return this.getConfig().options();
- }
-
- private void setupFiles() {
- try {
- if (!this.getDataFolder().exists()) {
- this.getDataFolder().mkdirs();
- }
- if (!(new File(this.getDataFolder().getAbsolutePath(), "config.yml")).exists()) {
- this.getFileConfigurationOptions().copyDefaults(true);
- this.saveConfig();
- this.getConsoleSender().sendMessage("[Typa] The config file was not detected, because of the file does not exist it will created.");
- } else {
- this.getConsoleSender().sendMessage("[Typa] Successfully loaded all configuration files.");
- }
- } catch (Exception exception) {
- exception.printStackTrace();
- }
- }
-
- public void setupMySQL() {
- host = this.getConfig().getString("host");
- port = this.getConfig().getInt("port");
- username = this.getConfig().getString("username");
- password = this.getConfig().getString("password");
- database = this.getConfig().getString("database");
- table = this.getConfig().getString("table");
- try {
- Typa login = this;
- synchronized (login) {
- if (this.getConnection() != null && !this.getConnection().isClosed()) {
- return;
- }
- Class.forName("com.mysql.jdbc.Driver");
- this.setConnection((Connection) DriverManager.getConnection(
- "jdbc:mysql://" + this.host + ":" + this.port + "/" + this.database, this.username,
- this.password));
- MySQL.setupTables();
- getServer().getConsoleSender()
- .sendMessage("[Typa] Successfully connected to SQL Database using setttings: " + "jdbc:mysql://"
- + this.host + ":" + this.port + "/" + this.database + " using user" + this.username
- + " using password YES. ");
- }
- } catch (SQLException e) {
- e.printStackTrace();
- Bukkit.getServer().shutdown();
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- Bukkit.getServer().shutdown();
- }
- }
-
- public Connection getConnection() {
- return connection;
- }
-
- public void setConnection(Connection connection) {
- Typa.connection = connection;
- }
-
-}
diff --git a/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/LoginCommand.class b/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/LoginCommand.class
deleted file mode 100644
index 136cb682..00000000
Binary files a/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/LoginCommand.class and /dev/null differ
diff --git a/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/LoginCommand.java b/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/LoginCommand.java
deleted file mode 100644
index 3577008d..00000000
--- a/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/LoginCommand.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package net.rifthq.typa.commands;
-
-import org.bukkit.command.Command;
-import org.bukkit.command.CommandExecutor;
-import org.bukkit.command.CommandSender;
-import org.bukkit.entity.Player;
-
-import net.md_5.bungee.api.ChatColor;
-import net.rifthq.typa.Typa;
-import net.rifthq.typa.managers.MySQL;
-import net.rifthq.typa.utils.Lists;
-
-public class LoginCommand implements CommandExecutor {
-
- public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
- Player player = (Player) sender;
- if (label.equalsIgnoreCase("login")) {
- if (!(sender instanceof Player)) {
- sender.sendMessage(ChatColor.RED + "This command is for players only!");
- return true;
- }
- if (!player.hasPermission("typa.auth")) {
- player.sendMessage(ChatColor.RED + "You lack the correct permission(s) to use this command!");
- return true;
- }
- if (!(Lists.toLogin.contains(player.getName()))) {
- player.sendMessage(ChatColor.translateAlternateColorCodes('&', Typa.getInstance().getConfig().getString("lang.register.already")));
- return true;
- }
- if (Lists.toLogin.contains(player.getName())) {
- if (args.length == 1) {
- MySQL.playerLogin(player.getUniqueId(), player, args[0]);
- } else {
- player.sendMessage(ChatColor.RED + "/login ");
- return true;
- }
- }
- }
- return false;
- }
-}
\ No newline at end of file
diff --git a/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/RegisterCommand.class b/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/RegisterCommand.class
deleted file mode 100644
index bc8da2e3..00000000
Binary files a/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/RegisterCommand.class and /dev/null differ
diff --git a/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/RegisterCommand.java b/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/RegisterCommand.java
deleted file mode 100644
index b66fe6b5..00000000
--- a/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/RegisterCommand.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package net.rifthq.typa.commands;
-
-import org.bukkit.command.Command;
-import org.bukkit.command.CommandExecutor;
-import org.bukkit.command.CommandSender;
-import org.bukkit.entity.Player;
-
-import net.md_5.bungee.api.ChatColor;
-import net.rifthq.typa.Typa;
-import net.rifthq.typa.managers.MySQL;
-
-public class RegisterCommand implements CommandExecutor {
-
- public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
- Player player = (Player) sender;
- if (label.equalsIgnoreCase("register")) {
- if (!(sender instanceof Player)) {
- sender.sendMessage(ChatColor.RED + "This command is for players only!");
- return true;
- }
- if (!player.hasPermission("typa.auth")) {
- player.sendMessage(ChatColor.RED + "You lack the correct permission(s) to use this command!");
- return true;
- }
- if (MySQL.dataExists(player.getUniqueId(), player)) {
- player.sendMessage(ChatColor.translateAlternateColorCodes('&', Typa.getInstance().getConfig().getString("lang.register.already")));
- return true;
- }
- if (args.length == 1) {
- if (args[0].length() > Typa.getInstance().getConfig().getInt("settings.pin.maxcharacters")) {
- player.sendMessage(ChatColor.translateAlternateColorCodes('&', Typa.getInstance().getConfig().getString("lang.register.toolong").replace("%max_characters%", String.valueOf(Typa.getInstance().getConfig().getInt("settings.pin.maxcharacters")))));
- return true;
- }
- if (args[0].length() < Typa.getInstance().getConfig().getInt("settings.pin.mincharacters")) {
- player.sendMessage(ChatColor.translateAlternateColorCodes('&', Typa.getInstance().getConfig().getString("lang.register.tooshort").replace("%min_characters%", String.valueOf(Typa.getInstance().getConfig().getInt("settings.pin.mincharacters")))));
- return true;
- }
- MySQL.registerPlayer(player.getUniqueId(), player, args[0],
- player.getAddress().getAddress().getHostAddress());
- } else {
- player.sendMessage(ChatColor.RED + "/register ");
- }
-
- }
- return false;
- }
-}
\ No newline at end of file
diff --git a/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/ResetIPCommand.class b/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/ResetIPCommand.class
deleted file mode 100644
index 1e11ae7a..00000000
Binary files a/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/ResetIPCommand.class and /dev/null differ
diff --git a/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/ResetIPCommand.java b/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/ResetIPCommand.java
deleted file mode 100644
index 4d5db795..00000000
--- a/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/ResetIPCommand.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package net.rifthq.typa.commands;
-
-import org.bukkit.Bukkit;
-import org.bukkit.command.Command;
-import org.bukkit.command.CommandExecutor;
-import org.bukkit.command.CommandSender;
-import org.bukkit.entity.Player;
-
-import net.md_5.bungee.api.ChatColor;
-import net.rifthq.typa.Typa;
-import net.rifthq.typa.managers.MySQL;
-
-public class ResetIPCommand implements CommandExecutor {
-
- public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
- Player player = (Player) sender;
- if (label.equalsIgnoreCase("resetip")) {
- if (!(sender instanceof Player)) {
- sender.sendMessage(ChatColor.RED + "This command is for players only!");
- return true;
- }
- if (!player.hasPermission("typa.auth.admin")) {
- player.sendMessage(ChatColor.RED + "You lack the correct permission(s) to use this command!");
- return true;
- }
- if (args.length == 0) {
- player.sendMessage(ChatColor.RED + "/resetip ");
- return true;
- }
- Player target = Bukkit.getPlayer(args[0]);
- if (target == null) {
- player.sendMessage(ChatColor.RED + "Player not found!");
- return true;
- }
- if (target == player) {
- player.sendMessage(ChatColor.translateAlternateColorCodes('&', Typa.getInstance().getConfig().getString("lang.resetip.self")));
- return true;
- }
- if (args.length == 1) {
- MySQL.updatePlayer(target.getUniqueId(), target, target.getAddress().getAddress().getHostAddress(), player);
- } else {
- player.sendMessage(ChatColor.RED + "/resetip ");
- return true;
- }
- }
- return false;
- }
-}
\ No newline at end of file
diff --git a/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/ResetPlayerCommand.class b/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/ResetPlayerCommand.class
deleted file mode 100644
index f8a75175..00000000
Binary files a/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/ResetPlayerCommand.class and /dev/null differ
diff --git a/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/ResetPlayerCommand.java b/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/ResetPlayerCommand.java
deleted file mode 100644
index b4f20d21..00000000
--- a/Typa(Staff Utils) v1.0/net/rifthq/typa/commands/ResetPlayerCommand.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package net.rifthq.typa.commands;
-
-import org.bukkit.Bukkit;
-import org.bukkit.command.Command;
-import org.bukkit.command.CommandExecutor;
-import org.bukkit.command.CommandSender;
-import org.bukkit.entity.Player;
-
-import net.md_5.bungee.api.ChatColor;
-import net.rifthq.typa.Typa;
-import net.rifthq.typa.managers.MySQL;
-
-public class ResetPlayerCommand implements CommandExecutor {
-
- public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
- Player player = (Player) sender;
- if (label.equalsIgnoreCase("resetplayer")) {
- if (!(sender instanceof Player)) {
- sender.sendMessage(ChatColor.RED + "This command is for players only!");
- return true;
- }
- if (!player.hasPermission("typa.auth.admin")) {
- player.sendMessage(ChatColor.RED + "You lack the correct permission(s) to use this command!");
- return true;
- }
- if (args.length == 0) {
- player.sendMessage(ChatColor.RED + "/resetplayer ");
- return true;
- }
- Player target = Bukkit.getPlayer(args[0]);
- if (target == null) {
- player.sendMessage(ChatColor.RED + "Player not found!");
- return true;
- }
- if (target == player) {
- player.sendMessage(ChatColor.translateAlternateColorCodes('&', Typa.getInstance().getConfig().getString("lang.resetplayer.self")));
- return true;
- }
- if (args.length == 1) {
- MySQL.deletePlayer(target.getUniqueId(), target, player);
- } else {
- player.sendMessage(ChatColor.RED + "/resetplayer ");
- return true;
- }
- }
- return false;
- }
-}
\ No newline at end of file
diff --git a/Typa(Staff Utils) v1.0/net/rifthq/typa/listeners/PlayerLoginListeners.class b/Typa(Staff Utils) v1.0/net/rifthq/typa/listeners/PlayerLoginListeners.class
deleted file mode 100644
index ffa29ed4..00000000
Binary files a/Typa(Staff Utils) v1.0/net/rifthq/typa/listeners/PlayerLoginListeners.class and /dev/null differ
diff --git a/Typa(Staff Utils) v1.0/net/rifthq/typa/listeners/PlayerLoginListeners.java b/Typa(Staff Utils) v1.0/net/rifthq/typa/listeners/PlayerLoginListeners.java
deleted file mode 100644
index 1a2c7165..00000000
--- a/Typa(Staff Utils) v1.0/net/rifthq/typa/listeners/PlayerLoginListeners.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package net.rifthq.typa.listeners;
-
-import org.bukkit.entity.Player;
-import org.bukkit.event.EventHandler;
-import org.bukkit.event.EventPriority;
-import org.bukkit.event.Listener;
-import org.bukkit.event.player.PlayerJoinEvent;
-import org.bukkit.potion.PotionEffect;
-import org.bukkit.potion.PotionEffectType;
-
-import net.md_5.bungee.api.ChatColor;
-import net.rifthq.typa.managers.MySQL;
-import net.rifthq.typa.utils.Lists;
-
-public class PlayerLoginListeners implements Listener {
-
- @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
- public void onStaffJoin(PlayerJoinEvent event) {
- Player player = event.getPlayer();
- if (!event.getPlayer().hasPermission("typa.force")) {
- return;
- }
- if (MySQL.dataExists(event.getPlayer().getUniqueId(), event.getPlayer())) {
- Lists.toLogin.add(player.getName());
- player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 99999, 9999));
- player.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 99999, 9999));
- player.sendMessage(ChatColor.translateAlternateColorCodes('&', "&cPlease authenticate via /login!"));
- return;
- }
- if (!MySQL.dataExists(event.getPlayer().getUniqueId(), event.getPlayer())) {
- Lists.toLogin.add(player.getName());
- player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 99999, 9999));
- player.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 99999, 9999));
- player.sendMessage(ChatColor.translateAlternateColorCodes('&',
- "&cIt seems your a new staffmember, please register your account to our authtication system via /register"));
- return;
- }
- }
-
- @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
- public void onStaffIPJoin(PlayerJoinEvent event) {
-
- }
-
-}
\ No newline at end of file
diff --git a/Typa(Staff Utils) v1.0/net/rifthq/typa/listeners/PlayerMoveListeners.class b/Typa(Staff Utils) v1.0/net/rifthq/typa/listeners/PlayerMoveListeners.class
deleted file mode 100644
index fa26c427..00000000
Binary files a/Typa(Staff Utils) v1.0/net/rifthq/typa/listeners/PlayerMoveListeners.class and /dev/null differ
diff --git a/Typa(Staff Utils) v1.0/net/rifthq/typa/listeners/PlayerMoveListeners.java b/Typa(Staff Utils) v1.0/net/rifthq/typa/listeners/PlayerMoveListeners.java
deleted file mode 100644
index df5eb649..00000000
--- a/Typa(Staff Utils) v1.0/net/rifthq/typa/listeners/PlayerMoveListeners.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package net.rifthq.typa.listeners;
-
-import org.bukkit.Location;
-import org.bukkit.entity.Player;
-import org.bukkit.event.EventHandler;
-import org.bukkit.event.EventPriority;
-import org.bukkit.event.Listener;
-import org.bukkit.event.player.PlayerMoveEvent;
-
-import net.rifthq.typa.utils.Lists;
-
-public class PlayerMoveListeners implements Listener {
-
- @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
- public void onPlayerMove(PlayerMoveEvent event) {
- Location from = event.getFrom();
- Location to = event.getTo();
- if ((from.getBlockX() == to.getBlockX()) && (from.getBlockZ() == to.getBlockZ())) {
- return;
- }
- Player player = event.getPlayer();
- if (Lists.toLogin.contains(player.getName())) {
- event.setTo(event.getFrom());
- }
- }
-}
diff --git a/Typa(Staff Utils) v1.0/net/rifthq/typa/managers/MySQL.class b/Typa(Staff Utils) v1.0/net/rifthq/typa/managers/MySQL.class
deleted file mode 100644
index f6a9a24f..00000000
Binary files a/Typa(Staff Utils) v1.0/net/rifthq/typa/managers/MySQL.class and /dev/null differ
diff --git a/Typa(Staff Utils) v1.0/net/rifthq/typa/managers/MySQL.java b/Typa(Staff Utils) v1.0/net/rifthq/typa/managers/MySQL.java
deleted file mode 100644
index 0ebb92a8..00000000
--- a/Typa(Staff Utils) v1.0/net/rifthq/typa/managers/MySQL.java
+++ /dev/null
@@ -1,152 +0,0 @@
-package net.rifthq.typa.managers;
-
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.UUID;
-
-import org.bukkit.entity.Player;
-import org.bukkit.potion.PotionEffectType;
-
-import net.md_5.bungee.api.ChatColor;
-import net.rifthq.typa.Typa;
-import net.rifthq.typa.utils.Lists;
-
-public class MySQL {
- static Typa plugin = Typa.getPlugin(Typa.class);
-
- public static boolean dataExists(UUID uuid, Player player) {
- try {
- Typa.getInstance();
- PreparedStatement statement = plugin.getConnection()
- .prepareStatement("SELECT * FROM " + Typa.table + " WHERE UUID=?");
- statement.setString(1, uuid.toString());
- ResultSet results = statement.executeQuery();
- if (results.next()) {
- return true;
- }
- } catch (SQLException e) {
- e.printStackTrace();
- }
- return false;
- }
-
- public static void registerPlayer(UUID uuid, Player player, String password, String ip) {
- try {
- if (MySQL.dataExists(uuid, player)) {
- player.sendMessage(ChatColor.translateAlternateColorCodes('&', Typa.getInstance().getConfig().getString("lang.register.already")));
- return;
- }
- PreparedStatement statement = plugin.getConnection()
- .prepareStatement("INSERT INTO " + Typa.table + " (UUID, PASSWORD, IP) VALUES (?,?,?)");
- statement.setString(1, uuid.toString());
- statement.setString(2, password);
- statement.setString(3, ip.toString());
- statement.executeUpdate();
- player.sendMessage(ChatColor.translateAlternateColorCodes('&', Typa.getInstance().getConfig().getString("lang.register.autologin")));
- player.removePotionEffect(PotionEffectType.SLOW);
- player.removePotionEffect(PotionEffectType.BLINDNESS);
- Lists.toLogin.remove(player.getName());
- } catch (SQLException e) {
- e.printStackTrace();
- player.sendMessage(
- ChatColor.RED + "Error whilst atempting to register, please contact a Server Administrator.");
-
- }
- }
-
- public static void setupTables() {
- try {
- PreparedStatement statement = plugin.getConnection()
- .prepareStatement("CREATE TABLE IF NOT EXISTS `" + Typa.table + "` (`ID` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, `UUID` varchar(50), `PASSWORD` varchar(50), `IP` varchar(50))");
- statement.executeUpdate();
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
-
- public static void updatePlayer(UUID uuid, Player player, String ip, Player sender) {
- try {
- if (!dataExists(uuid, player)) {
- sender.sendMessage(ChatColor.translateAlternateColorCodes('&', Typa.getInstance().getConfig().getString("lang.resetip.notfound").replace("%player%", player.getName())));
- return;
- }
- PreparedStatement statement = plugin.getConnection()
- .prepareStatement("UPDATE '" + Typa.table + "' SET 'IP'=? WHERE 'UUID'=?");
- statement.setString(1, ip.toString());
- statement.setString(2, uuid.toString());
- statement.executeUpdate();
- sender.sendMessage(ChatColor.translateAlternateColorCodes('&', Typa.getInstance().getConfig().getString("lang.resetip.successful").replace("%player%", player.getName())));
- } catch (SQLException e) {
- e.printStackTrace();
- sender.sendMessage(ChatColor.RED + "Error whilst atempting to update player, please contact a Server Administrator.");
- }
- }
-
- public static String getPlayerPassword(UUID uuid, Player player) {
- try {
- if (!dataExists(uuid, player)) {
- return null;
- }
- PreparedStatement statement = plugin.getConnection()
- .prepareStatement("SELECT * FROM " + Typa.table + " WHERE UUID=?");
- statement.setString(1, uuid.toString());
-
- ResultSet results = statement.executeQuery();
- results.first();
- return results.getString("PASSWORD");
- } catch (SQLException e) {
- e.printStackTrace();
- }
- return null;
- }
-
- public static String deletePlayer(UUID uuid, Player player, Player sender) {
- try {
- if (!dataExists(uuid, player)) {
- sender.sendMessage(ChatColor.translateAlternateColorCodes('&', Typa.getInstance().getConfig().getString("lang.resetplayer.successful").replace("%player%", player.getName())));
- return null;
- }
- PreparedStatement statement = plugin.getConnection()
- .prepareStatement("DELETE FROM " + Typa.table + " WHERE UUID=?");
- statement.setString(1, uuid.toString());
- statement.executeUpdate();
- sender.sendMessage(ChatColor.translateAlternateColorCodes('&', Typa.getInstance().getConfig().getString("lang.resetplayer.successful").replace("%player%", player.getName())));
- if (Lists.toLogin.contains(player)) {
- Lists.toLogin.remove(player);
- player.removePotionEffect(PotionEffectType.SLOW);
- player.removePotionEffect(PotionEffectType.BLINDNESS);
- player.kickPlayer(ChatColor.translateAlternateColorCodes('&',
- "&7&oAuthentication\n&cYou have been removed from our authentication system\n&c therefore you were kicked!"));
- }
- } catch (SQLException e) {
- e.printStackTrace();
- sender.sendMessage(
- ChatColor.RED + "Error whilst atempting to remove player, please contact a Server Administrator.");
- }
- return null;
- }
-
- public static void playerLogin(UUID uuid, Player player, String password) {
- if (!MySQL.dataExists(uuid, player)) {
- player.sendMessage(ChatColor.translateAlternateColorCodes('&', Typa.getInstance().getConfig().getString("lang.login.notfound")));
- return;
- }
- if (password.equals(MySQL.getPlayerPassword(uuid, player))) {
- Lists.toLogin.remove(player.getName());
- player.removePotionEffect(PotionEffectType.SLOW);
- player.removePotionEffect(PotionEffectType.BLINDNESS);
-
- //player.sendMessage(ChatColor.GREEN + "Successfully authenticated as " + player.getName() + ".");
- player.sendMessage(ChatColor.translateAlternateColorCodes('&', Typa.getInstance().getConfig().getString("lang.login.successful").replace("%player%", player.getName())));
-
- } else {
- player.sendMessage(ChatColor.translateAlternateColorCodes('&', Typa.getInstance().getConfig().getString("lang.login.incorrect")));
- player.removePotionEffect(PotionEffectType.SLOW);
- player.removePotionEffect(PotionEffectType.BLINDNESS);
-
- player.kickPlayer(ChatColor.translateAlternateColorCodes('&', Typa.getInstance().getConfig().getString("lang.login.kickmessage")));
-
- }
- }
-}
diff --git a/Typa(Staff Utils) v1.0/net/rifthq/typa/utils/Lists.class b/Typa(Staff Utils) v1.0/net/rifthq/typa/utils/Lists.class
deleted file mode 100644
index b3227f9a..00000000
Binary files a/Typa(Staff Utils) v1.0/net/rifthq/typa/utils/Lists.class and /dev/null differ
diff --git a/Typa(Staff Utils) v1.0/net/rifthq/typa/utils/Lists.java b/Typa(Staff Utils) v1.0/net/rifthq/typa/utils/Lists.java
deleted file mode 100644
index d2cf4803..00000000
--- a/Typa(Staff Utils) v1.0/net/rifthq/typa/utils/Lists.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package net.rifthq.typa.utils;
-
-import java.util.ArrayList;
-
-public class Lists {
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- public static ArrayList toLogin = new ArrayList();
-
-}
diff --git a/Typa(Staff Utils) v1.0/plugin.yml b/Typa(Staff Utils) v1.0/plugin.yml
deleted file mode 100644
index 78ec097f..00000000
--- a/Typa(Staff Utils) v1.0/plugin.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-name: Typa
-version: 1.2
-main: net.rifthq.typa.Typa
-author: [puttydotexe]
-commands:
- register:
- description: Command used to register a staff account.
- login:
- description: Command used to log into a staff account.
- resetpin:
- description: Command used to reset a staff accounts pin.
- resetplayer:
- description: Command used to reset a staff account.
\ No newline at end of file
diff --git a/Typa(Staff Utils) v1.1/.classpath b/Typa(Staff Utils) v1.1/.classpath
deleted file mode 100644
index 51246483..00000000
--- a/Typa(Staff Utils) v1.1/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/Typa(Staff Utils) v1.1/.project b/Typa(Staff Utils) v1.1/.project
deleted file mode 100644
index c24be5c1..00000000
--- a/Typa(Staff Utils) v1.1/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- Typa(Staff Utils) v1.1
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
-
- org.eclipse.jdt.core.javanature
-
-
diff --git a/Typa(Staff Utils) v1.1/README.md b/Typa(Staff Utils) v1.1/README.md
deleted file mode 100644
index 43149d8f..00000000
--- a/Typa(Staff Utils) v1.1/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# Typa Staff Authentication
-
-**Advice**
-> Always use latest release rather than cloning and compiling.
-> If security flaws/issues to arise please contact us via PM rather than publicly.
-> In the case that you find a error/glitch arises please make sure you follow the issue template.
->
-
-
diff --git a/Typa(Staff Utils) v1.1/config.yml b/Typa(Staff Utils) v1.1/config.yml
deleted file mode 100644
index d70cd347..00000000
--- a/Typa(Staff Utils) v1.1/config.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-host: localhost
-port: 3306
-username: root
-database: typa
-password: password
-table: staff_data
-settings:
- pin:
- maxcharacters: 25
- mincharacters: 5
-
-lang:
- register:
- already: '&cYour already registered. Please use /login to authenticate.'
- toolong: '&cYour password must contain less than %max_characters% characters!'
- tooshort: '&cYour password must contain more than %min_characters% characters!'
- autologin: '&aSuccessfully registered and authenticated.'
- login:
- already: '&cYou are already authenticated!'
- notfound: '&cAccount not found! please use /register to start the authenticate process.'
- successful: '&aSuccessfully authenticated as %player%.'
- incorrect: '&cIncorrect password!'
- kickmesesage: |-
- &7&oAuthentication
- &cYou failed to authenticate therefore you were kicked!
-
-lang.resetip.successful: '&aSuccessfully updated %player%s authentication profile'
-lang.resetip.self: '&cYou cannot update yourself'
-lang.resetip.notfound: '&cCould not find %player% in the authentication list!'
-
-lang.resetplayer.successful: '&aSuccessfully deleted %player%s authentication profile'
-lang.resetplayer.self: '&cYou cannot remove yourself'
-lang.resetplayer.notfound: '&cCould not find %player% in the authentication list!'
diff --git a/Typa(Staff Utils) v1.1/net/rifthq/typa/Typa.class b/Typa(Staff Utils) v1.1/net/rifthq/typa/Typa.class
deleted file mode 100644
index 3951bbba..00000000
Binary files a/Typa(Staff Utils) v1.1/net/rifthq/typa/Typa.class and /dev/null differ
diff --git a/Typa(Staff Utils) v1.1/net/rifthq/typa/Typa.java b/Typa(Staff Utils) v1.1/net/rifthq/typa/Typa.java
deleted file mode 100644
index 2126c68a..00000000
--- a/Typa(Staff Utils) v1.1/net/rifthq/typa/Typa.java
+++ /dev/null
@@ -1,241 +0,0 @@
-package net.rifthq.typa;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.net.URLConnection;
-import java.sql.DriverManager;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.logging.Level;
-
-import org.bukkit.Bukkit;
-import org.bukkit.command.ConsoleCommandSender;
-import org.bukkit.configuration.file.FileConfigurationOptions;
-import org.bukkit.entity.Player;
-import org.bukkit.plugin.Plugin;
-import org.bukkit.plugin.java.JavaPlugin;
-import org.bukkit.potion.PotionEffect;
-import org.bukkit.potion.PotionEffectType;
-
-import com.mysql.jdbc.Connection;
-
-import net.md_5.bungee.api.ChatColor;
-import net.rifthq.typa.commands.LoginCommand;
-import net.rifthq.typa.commands.RegisterCommand;
-import net.rifthq.typa.commands.ResetIPCommand;
-import net.rifthq.typa.commands.ResetPlayerCommand;
-import net.rifthq.typa.listeners.PlayerLoginListeners;
-import net.rifthq.typa.listeners.PlayerMoveListeners;
-import net.rifthq.typa.managers.MySQL;
-import net.rifthq.typa.utils.Config;
-import net.rifthq.typa.utils.Lists;
-
-public class Typa extends JavaPlugin
-{
- private static Typa instance;
- public String host;
- public String username;
- public String password;
- public String database;
- public static String table;
- public int port;
- public static Connection connection;
- private Config mainConfig;
-
- public static Typa getInstance()
- {
- if (instance == null)
- {
- instance = new Typa();
- }
- return instance;
- }
-
- public void onEnable()
- {
- this.setup();
- }
-
- public void onDisable()
- {
- instance = null;
- this.saveConfig();
- try
- {
- if (connection != null && !connection.isClosed())
- {
- connection.close();
- getServer().getConsoleSender().sendMessage("[Typa] Successfully closed connection to SQL.");
- }
- }
- catch (SQLException e)
- {
- e.printStackTrace();
- }
- }
-
- @SuppressWarnings("deprecation")
- private void setup()
- {
- instance = this;
- this.setupFiles();
- setupMySQL();
- loadCommands();
- loadListeners();
- this.getAPI();
- (this.mainConfig = new Config(this, "", "config")).setDefault("Shit", false);
- this.mainConfig.setDefault("hwid", "");
- for (Player online : Bukkit.getServer().getOnlinePlayers())
- {
- if (online.hasPermission("typa.auth"))
- Lists.toLogin.add(online.getName());
- online.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 99999, 9999));
- online.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 99999, 9999));
- online.sendMessage(ChatColor.RED + "A server reload has caused you to be placed in authentication mode!");
- online.sendMessage(ChatColor.RED + "/login ");
- }
- }
-
- public void loadCommands()
- {
- getCommand("register").setExecutor(new RegisterCommand());
- getCommand("login").setExecutor(new LoginCommand());
- getCommand("resetpin").setExecutor(new ResetPlayerCommand());
- getCommand("resetplayer").setExecutor(new ResetIPCommand());
- }
-
- public void loadListeners()
- {
- getServer().getPluginManager().registerEvents(new PlayerLoginListeners(), this);
- getServer().getPluginManager().registerEvents(new PlayerMoveListeners(), this);
- }
-
- public ConsoleCommandSender getConsoleSender()
- {
- return Bukkit.getServer().getConsoleSender();
- }
-
- public FileConfigurationOptions getFileConfigurationOptions()
- {
- return this.getConfig().options();
- }
-
- private void setupFiles()
- {
- try
- {
- if (!this.getDataFolder().exists())
- {
- this.getDataFolder().mkdirs();
- }
- if (!(new File(this.getDataFolder().getAbsolutePath(), "config.yml")).exists())
- {
- this.getFileConfigurationOptions().copyDefaults(true);
- this.saveConfig();
- this.getConsoleSender().sendMessage("[Typa] The config file was not detected, because of the file does not exist it will created.");
- }
- else
- {
- this.getConsoleSender().sendMessage("[Typa] Successfully loaded all configuration files.");
- }
- }
- catch (Exception exception)
- {
- exception.printStackTrace();
- }
- }
-
- public void setupMySQL()
- {
- host = this.getConfig().getString("host");
- port = this.getConfig().getInt("port");
- username = this.getConfig().getString("username");
- password = this.getConfig().getString("password");
- database = this.getConfig().getString("database");
- table = this.getConfig().getString("table");
- try
- {
- Typa login = this;
- synchronized (login)
- {
- if (this.getConnection() != null && !this.getConnection().isClosed()) { return; }
- Class.forName("com.mysql.jdbc.Driver");
- this.setConnection((Connection) DriverManager.getConnection("jdbc:mysql://" + this.host + ":" + this.port + "/" + this.database, this.username, this.password));
- MySQL.setupTables();
- getServer().getConsoleSender().sendMessage("[Typa] Successfully connected to SQL Database using setttings: " + "jdbc:mysql://" + this.host + ":" + this.port + "/" + this.database + " using user" + this.username + " using password YES. ");
- }
- }
- catch (SQLException e)
- {
- e.printStackTrace();
- Bukkit.getServer().shutdown();
- }
- catch (ClassNotFoundException e)
- {
- e.printStackTrace();
- Bukkit.getServer().shutdown();
- }
- }
-
- public Connection getConnection()
- {
- return connection;
- }
-
- public void setConnection(Connection connection)
- {
- Typa.connection = connection;
- }
-
- /**
- *
- * HWID Whitelist
- *
- */
-
- public String wngnq;
-
- public Typa()
- {
- this.wngnq = "Incorrect HWID! Disabling plugin. If you need an HWID, get one from puttydotexe, Grimy! Or message us on MCMarket.";
- }
-
- private void wqminoiwn()
- {
- Bukkit.getPluginManager().disablePlugin((Plugin) this);
- }
-
- public void getAPI()
- {
- try
- {
- final URL url = new URL("https://pastebin.com/raw/XkZdX1W4");
- final ArrayList