This commit is contained in:
Gabriele C 2015-08-01 09:52:13 +02:00
parent 4f7f2c395f
commit 8c49bfdbf4
12 changed files with 37 additions and 24 deletions

15
pom.xml
View File

@ -54,24 +54,28 @@
<groupId>com.j256.ormlite</groupId> <groupId>com.j256.ormlite</groupId>
<artifactId>ormlite-jdbc</artifactId> <artifactId>ormlite-jdbc</artifactId>
<version>4.48</version> <version>4.48</version>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.logging.log4j</groupId> <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId> <artifactId>log4j-core</artifactId>
<version>2.0-beta9</version> <version>2.0-beta9</version>
<scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId> <artifactId>bukkit</artifactId>
<version>1.8.7-R0.1-SNAPSHOT</version> <version>1.8.8-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.mcstats.bukkit</groupId> <groupId>org.mcstats.bukkit</groupId>
<artifactId>metrics</artifactId> <artifactId>metrics</artifactId>
<version>R7</version> <version>R7</version>
<scope>compile</scope>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
@ -88,6 +92,7 @@
<groupId>net.milkbowl.vault</groupId> <groupId>net.milkbowl.vault</groupId>
<artifactId>Vault</artifactId> <artifactId>Vault</artifactId>
<version>1.5.2</version> <version>1.5.2</version>
<scope>provided</scope>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
@ -104,6 +109,7 @@
<groupId>info.somethingodd</groupId> <groupId>info.somethingodd</groupId>
<artifactId>odditem</artifactId> <artifactId>odditem</artifactId>
<version>0.9.5</version> <version>0.9.5</version>
<scope>compile</scope>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
@ -121,6 +127,7 @@
<groupId>com.herocraftonline.heroes</groupId> <groupId>com.herocraftonline.heroes</groupId>
<artifactId>Heroes</artifactId> <artifactId>Heroes</artifactId>
<version>1.5.5.6-SNAPSHOT</version> <version>1.5.5.6-SNAPSHOT</version>
<scope>provided</scope>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
@ -137,6 +144,7 @@
<groupId>com.griefcraft.lwc</groupId> <groupId>com.griefcraft.lwc</groupId>
<artifactId>lwc</artifactId> <artifactId>lwc</artifactId>
<version>4.3.1</version> <version>4.3.1</version>
<scope>provided</scope>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
@ -153,6 +161,7 @@
<groupId>com.daemitus.deadbolt</groupId> <groupId>com.daemitus.deadbolt</groupId>
<artifactId>deadbolt</artifactId> <artifactId>deadbolt</artifactId>
<version>2.2</version> <version>2.2</version>
<scope>provided</scope>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
@ -169,6 +178,7 @@
<groupId>com.sk89q</groupId> <groupId>com.sk89q</groupId>
<artifactId>worldguard</artifactId> <artifactId>worldguard</artifactId>
<version>6.1.1-SNAPSHOT</version> <version>6.1.1-SNAPSHOT</version>
<scope>provided</scope>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
@ -185,6 +195,7 @@
<groupId>com.webkonsept.bukkit.simplechestlock</groupId> <groupId>com.webkonsept.bukkit.simplechestlock</groupId>
<artifactId>simplechestlock</artifactId> <artifactId>simplechestlock</artifactId>
<version>1.2.1</version> <version>1.2.1</version>
<scope>provided</scope>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
@ -201,6 +212,7 @@
<groupId>org.yi.acru.bukkit.lockette</groupId> <groupId>org.yi.acru.bukkit.lockette</groupId>
<artifactId>lockette</artifactId> <artifactId>lockette</artifactId>
<version>1.8.14</version> <version>1.8.14</version>
<scope>provided</scope>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
@ -217,6 +229,7 @@
<groupId>net.t00thpick1</groupId> <groupId>net.t00thpick1</groupId>
<artifactId>residence</artifactId> <artifactId>residence</artifactId>
<version>3.0.0q-SNAPSHOT</version> <version>3.0.0q-SNAPSHOT</version>
<scope>provided</scope>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>

View File

@ -22,7 +22,7 @@ public class Configuration {
* @param file File to load * @param file File to load
* @param clazz Class to modify * @param clazz Class to modify
*/ */
public static void pairFileAndClass(File file, Class clazz) { public static void pairFileAndClass(File file, Class<?> clazz) {
FileConfiguration config = YamlConfiguration.loadConfiguration(file); FileConfiguration config = YamlConfiguration.loadConfiguration(file);
try { try {
@ -79,6 +79,8 @@ public class Configuration {
lastLine = scanner.nextLine(); lastLine = scanner.nextLine();
} }
if (scanner != null)
scanner.close();
return lastLine.isEmpty(); return lastLine.isEmpty();
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
e.printStackTrace(); e.printStackTrace();

View File

@ -44,7 +44,7 @@ public class Database {
* @param clazz Class with fields * @param clazz Class with fields
* @return If table was succesfully created * @return If table was succesfully created
*/ */
public boolean createFromClass(Class clazz) { public boolean createFromClass(Class<?> clazz) {
if (!clazz.isAnnotationPresent(Entity.class) || !clazz.isAnnotationPresent(javax.persistence.Table.class)) { if (!clazz.isAnnotationPresent(Entity.class) || !clazz.isAnnotationPresent(javax.persistence.Table.class)) {
return false; return false;
} }

View File

@ -15,9 +15,9 @@ import java.util.List;
* @author Acrobot * @author Acrobot
*/ */
public class EntityParser { public class EntityParser {
private Class entity; private Class<?> entity;
public EntityParser(Class table) { public EntityParser(Class<?> table) {
if (!table.isAnnotationPresent(Entity.class) || !table.isAnnotationPresent(javax.persistence.Table.class)) { if (!table.isAnnotationPresent(Entity.class) || !table.isAnnotationPresent(javax.persistence.Table.class)) {
throw new AnnotationFormatError("The class hasn't got Entity or Table annotation!"); throw new AnnotationFormatError("The class hasn't got Entity or Table annotation!");
} }

View File

@ -33,7 +33,6 @@ package com.Acrobot.Breeze.Utils.Encoding;
* @author rob@iharder.net * @author rob@iharder.net
* @version 2.3.7 * @version 2.3.7
*/ */
@SuppressWarnings("ALL")
public class Base64 { public class Base64 {
/* ******** P U B L I C F I E L D S ******** */ /* ******** P U B L I C F I E L D S ******** */
@ -1272,7 +1271,7 @@ public class Base64 {
@Override @Override
public Class<?> resolveClass(java.io.ObjectStreamClass streamClass) public Class<?> resolveClass(java.io.ObjectStreamClass streamClass)
throws java.io.IOException, ClassNotFoundException { throws java.io.IOException, ClassNotFoundException {
Class c = Class.forName(streamClass.getName(), false, loader); Class<?> c = Class.forName(streamClass.getName(), false, loader);
if (c == null) { if (c == null) {
return super.resolveClass(streamClass); return super.resolveClass(streamClass);
} else { } else {

View File

@ -15,7 +15,6 @@ import java.util.UUID;
*/ */
public class NameUtil { public class NameUtil {
private static final UUID INVALID_UUID = UUID.fromString("00000000-0000-0000-0000-000000000000"); private static final UUID INVALID_UUID = UUID.fromString("00000000-0000-0000-0000-000000000000");
private static final String PROFILE_AGENT = "minecraft";
/** /**
* Get the UUID of a player * Get the UUID of a player

View File

@ -36,14 +36,6 @@ import com.Acrobot.ChestShop.Metadata.ItemDatabase;
import com.Acrobot.ChestShop.Signs.RestrictedSign; import com.Acrobot.ChestShop.Signs.RestrictedSign;
import com.Acrobot.ChestShop.UUIDs.NameManager; import com.Acrobot.ChestShop.UUIDs.NameManager;
import com.Acrobot.ChestShop.Updater.Updater; import com.Acrobot.ChestShop.Updater.Updater;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Marker;
import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.core.config.LoggerConfig;
import org.apache.logging.log4j.core.filter.AbstractFilter;
import org.apache.logging.log4j.message.Message;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Server; import org.bukkit.Server;
import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.configuration.file.YamlConfiguration;
@ -294,10 +286,6 @@ public class ChestShop extends JavaPlugin {
getServer().getPluginManager().registerEvents(listener, this); getServer().getPluginManager().registerEvents(listener, this);
} }
private void scheduleTask(Runnable runnable, long startTime, long repetitionTime) {
server.getScheduler().runTaskTimerAsynchronously(this, runnable, startTime, repetitionTime);
}
private void startStatistics() { private void startStatistics() {
try { try {
new Metrics(this).start(); new Metrics(this).start();

View File

@ -23,8 +23,6 @@ import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.material.Directional; import org.bukkit.material.Directional;
import org.bukkit.material.PistonBaseMaterial; import org.bukkit.material.PistonBaseMaterial;
import org.bukkit.metadata.FixedMetadataValue; import org.bukkit.metadata.FixedMetadataValue;
import org.bukkit.metadata.MetadataValue;
import java.util.*; import java.util.*;
import static com.Acrobot.Breeze.Utils.BlockUtil.getAttachedBlock; import static com.Acrobot.Breeze.Utils.BlockUtil.getAttachedBlock;

View File

@ -47,6 +47,12 @@ public class ErrorMessageSender implements Listener {
case NOT_ENOUGH_MONEY: case NOT_ENOUGH_MONEY:
message = Messages.NOT_ENOUGH_MONEY; message = Messages.NOT_ENOUGH_MONEY;
break; break;
case OTHER:
break;
case SHOP_CREATED_SUCCESSFULLY:
break;
default:
break;
} }
if (message != null) { if (message != null) {

View File

@ -1,6 +1,5 @@
package com.Acrobot.ChestShop.Listeners.PreShopCreation; package com.Acrobot.ChestShop.Listeners.PreShopCreation;
import com.Acrobot.Breeze.Utils.NumberUtil;
import com.Acrobot.Breeze.Utils.PriceUtil; import com.Acrobot.Breeze.Utils.PriceUtil;
import com.Acrobot.ChestShop.Events.PreShopCreationEvent; import com.Acrobot.ChestShop.Events.PreShopCreationEvent;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;

View File

@ -73,6 +73,16 @@ public class ErrorMessageSender implements Listener {
case INVALID_SHOP: case INVALID_SHOP:
message = Messages.INVALID_SHOP_DETECTED; message = Messages.INVALID_SHOP_DETECTED;
break; break;
case CREATIVE_MODE_PROTECTION:
break;
case OTHER:
break;
case SPAM_CLICKING_PROTECTION:
break;
case TRANSACTION_SUCCESFUL:
break;
default:
break;
} }
if (message != null) { if (message != null) {

View File

@ -22,7 +22,6 @@ import java.util.UUID;
* *
* @author Andrzej Pomirski (Acrobot) * @author Andrzej Pomirski (Acrobot)
*/ */
@SuppressWarnings("UnusedAssignment") //I deliberately set the variables to null while initializing
public class NameManager { public class NameManager {
private static Dao<Account, String> accounts; private static Dao<Account, String> accounts;