|
13 | 13 | * see <http://www.gnu.org/licenses/>. |
14 | 14 | */ |
15 | 15 |
|
16 | | -package org.enginehub.craftbook.mechanics; |
| 16 | +package org.enginehub.craftbook.bukkit.mechanics; |
17 | 17 |
|
18 | | -import com.sk89q.util.yaml.YAMLProcessor; |
19 | 18 | import com.sk89q.worldedit.util.formatting.text.TextComponent; |
20 | 19 | import com.sk89q.worldedit.util.formatting.text.TranslatableComponent; |
21 | 20 | import net.kyori.adventure.text.Component; |
|
36 | 35 | import org.bukkit.event.block.SignChangeEvent; |
37 | 36 | import org.bukkit.event.player.PlayerInteractEvent; |
38 | 37 | import org.bukkit.inventory.EquipmentSlot; |
39 | | -import org.enginehub.craftbook.AbstractCraftBookMechanic; |
40 | 38 | import org.enginehub.craftbook.ChangedSign; |
41 | 39 | import org.enginehub.craftbook.CraftBook; |
42 | 40 | import org.enginehub.craftbook.CraftBookPlayer; |
43 | 41 | import org.enginehub.craftbook.bukkit.CraftBookPlugin; |
44 | 42 | import org.enginehub.craftbook.mechanic.CraftBookMechanic; |
45 | 43 | import org.enginehub.craftbook.mechanic.MechanicType; |
| 44 | +import org.enginehub.craftbook.mechanics.HiddenSwitch; |
46 | 45 | import org.enginehub.craftbook.util.EventUtil; |
47 | 46 | import org.enginehub.craftbook.util.LocationUtil; |
48 | 47 | import org.enginehub.craftbook.util.ProtectionUtil; |
|
51 | 50 | import java.util.ArrayList; |
52 | 51 | import java.util.List; |
53 | 52 |
|
54 | | -public class HiddenSwitch extends AbstractCraftBookMechanic implements Listener { |
| 53 | +public class BukkitHiddenSwitch extends HiddenSwitch implements Listener { |
55 | 54 |
|
56 | | - public HiddenSwitch(MechanicType<? extends CraftBookMechanic> mechanicType) { |
| 55 | + public BukkitHiddenSwitch(MechanicType<? extends CraftBookMechanic> mechanicType) { |
57 | 56 | super(mechanicType); |
58 | 57 | } |
59 | 58 |
|
@@ -208,12 +207,4 @@ private boolean toggleSwitches(Block sign, BlockFace direction) { |
208 | 207 |
|
209 | 208 | return toggledSwitch; |
210 | 209 | } |
211 | | - |
212 | | - private boolean allowAnyFace; |
213 | | - |
214 | | - @Override |
215 | | - public void loadFromConfiguration(YAMLProcessor config) { |
216 | | - config.setComment("allow-any-face", "Allows the Hidden Switch to be activated from any face of the block."); |
217 | | - allowAnyFace = config.getBoolean("allow-any-face", true); |
218 | | - } |
219 | 210 | } |
0 commit comments