mirror of
https://github.com/songoda/EpicHoppers.git
synced 2024-11-22 18:25:59 +01:00
Toggle for block break will not be saved. (MySQL will need updating).
This commit is contained in:
parent
c7cc59ef79
commit
633d0293b6
@ -261,6 +261,8 @@ public class EpicHoppersPlugin extends JavaPlugin implements EpicHoppers {
|
||||
String blackLoc = row.get("black").asString();
|
||||
Location black = blackLoc == null ? null : Methods.unserializeLocation(blackLoc);
|
||||
|
||||
boolean autoBreak = row.get("autobreak").asBoolean();
|
||||
|
||||
EFilter filter = new EFilter();
|
||||
|
||||
filter.setWhiteList(whiteList);
|
||||
@ -270,6 +272,8 @@ public class EpicHoppersPlugin extends JavaPlugin implements EpicHoppers {
|
||||
|
||||
EHopper hopper = new EHopper(location, levelManager.getLevel(level), lastPlayer, placedBy, blocks, filter, teleportTrigger, autoCrafting);
|
||||
|
||||
if (autoBreak) hopper.toggleAutoBreaking();
|
||||
|
||||
hopperManager.addHopper(location, hopper);
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.songoda.epichoppers.storage;
|
||||
import com.songoda.epichoppers.EpicHoppersPlugin;
|
||||
import com.songoda.epichoppers.api.hopper.Hopper;
|
||||
import com.songoda.epichoppers.boost.BoostData;
|
||||
import com.songoda.epichoppers.hopper.EHopper;
|
||||
import com.songoda.epichoppers.utils.ConfigWrapper;
|
||||
import com.songoda.epichoppers.utils.Methods;
|
||||
import org.bukkit.Material;
|
||||
@ -50,6 +51,7 @@ public abstract class Storage {
|
||||
new StorageItem("whitelist", hopper.getFilter().getWhiteList()),
|
||||
new StorageItem("blacklist", hopper.getFilter().getBlackList()),
|
||||
new StorageItem("void", hopper.getFilter().getVoidList()),
|
||||
new StorageItem("autobreak", ((EHopper)hopper).isAutoBreaking()),
|
||||
new StorageItem("black", hopper.getFilter().getEndPoint() == null ? null : Methods.serializeLocation(hopper.getFilter().getEndPoint())));
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,7 @@ public class MySQLDatabase {
|
||||
"\t`blacklist` TEXT NULL,\n" +
|
||||
"\t`void` TEXT NULL,\n" +
|
||||
"\t`black` TEXT NULL\n" +
|
||||
"\t`autobreak` TEXT NULL\n" +
|
||||
")");
|
||||
|
||||
connection.createStatement().execute("CREATE TABLE IF NOT EXISTS `" + instance.getConfig().getString("Database.Prefix") + "boosts` (\n" +
|
||||
|
Loading…
Reference in New Issue
Block a user