mirror of
https://github.com/songoda/EpicFarming.git
synced 2024-11-27 21:15:28 +01:00
touch ups
This commit is contained in:
parent
a0da2bbbf8
commit
48bdc44b09
@ -151,8 +151,6 @@ public class BlockListeners implements Listener {
|
||||
Farm farm = instance.getFarmManager().removeFarm(event.getBlock().getLocation());
|
||||
|
||||
if (farm == null) {
|
||||
if (event.getBlock().getType() == Material.END_ROD)
|
||||
event.getBlock().getLocation().getWorld().dropItemNaturally(event.getBlock().getLocation().add(.5,.5,.5), new ItemStack(Material.END_ROD));
|
||||
return;
|
||||
}
|
||||
instance.getFarmTask().getCrops(farm, false);
|
||||
|
@ -10,7 +10,7 @@ public class StorageItem {
|
||||
|
||||
private String key = null;
|
||||
|
||||
private final Object object;
|
||||
private Object object;
|
||||
|
||||
public StorageItem(Object object) {
|
||||
this.object = object;
|
||||
@ -22,8 +22,10 @@ public class StorageItem {
|
||||
}
|
||||
|
||||
public StorageItem(String key, List<ItemStack> material) {
|
||||
if (material == null || material.isEmpty()) return;
|
||||
StringBuilder object = new StringBuilder();
|
||||
for (ItemStack m : material) {
|
||||
if (m == null) continue;
|
||||
object.append(Serializers.serialize(m));
|
||||
object.append(";;");
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ public class StorageMysql extends Storage {
|
||||
@Override
|
||||
public void clearFile() {
|
||||
try {
|
||||
database.getConnection().createStatement().execute("TRUNCATE `" + instance.getConfig().getString("Database.Prefix") + "sync`");
|
||||
database.getConnection().createStatement().execute("TRUNCATE `" + instance.getConfig().getString("Database.Prefix") + "farms`");
|
||||
database.getConnection().createStatement().execute("TRUNCATE `" + instance.getConfig().getString("Database.Prefix") + "boosts`");
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -27,7 +27,7 @@ public class MySQLDatabase {
|
||||
"\t`location` TEXT NULL,\n" +
|
||||
"\t`level` INT NULL,\n" +
|
||||
"\t`placedby` TEXT NULL,\n" +
|
||||
"\t`contents` TEXT NULL, \n"+
|
||||
"\t`contents` TEXT NULL \n"+
|
||||
")");
|
||||
|
||||
connection.createStatement().execute("CREATE TABLE IF NOT EXISTS `" + instance.getConfig().getString("Database.Prefix") + "boosts` (\n" +
|
||||
|
@ -207,7 +207,7 @@ public class SettingsManager implements Listener {
|
||||
d2("Database.Username","root"),
|
||||
d3("Database.Password","password"),
|
||||
d4("Database.Database Name","EpicFarming"),
|
||||
d5("Database.Prefix","EF-"),
|
||||
d5("Database.Prefix","EFA-"),
|
||||
|
||||
o12("Interfaces.Economy Icon", "SUNFLOWER"),
|
||||
o13("Interfaces.XP Icon", "EXPERIENCE_BOTTLE"),
|
||||
|
Loading…
Reference in New Issue
Block a user