Implement first Listeners

master
Ruakij 4 years ago
parent 87d6d4bd70
commit abde30e2e1

@ -1,5 +1,8 @@
package eu.ruekov.ruakij.LinkedBeaconTeleporters; package eu.ruekov.ruakij.LinkedBeaconTeleporters;
import eu.ruekov.ruakij.LinkedBeaconTeleporters.listener.OnBlockBreak;
import eu.ruekov.ruakij.LinkedBeaconTeleporters.listener.OnBlockPlace;
import eu.ruekov.ruakij.LinkedBeaconTeleporters.listener.OnPrepareItemCraftEvent;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.configuration.file.YamlConfiguration;
@ -25,7 +28,9 @@ public class Main extends JavaPlugin {
plugin = this; plugin = this;
PluginManager pluginManager = Bukkit.getPluginManager(); PluginManager pluginManager = Bukkit.getPluginManager();
pluginManager.registerEvents(new OnBlockBreak(), this);
pluginManager.registerEvents(new OnBlockPlace(), this);
pluginManager.registerEvents(new OnPrepareItemCraftEvent(), this);
loadConfigs(); loadConfigs();

@ -0,0 +1,14 @@
package eu.ruekov.ruakij.LinkedBeaconTeleporters.listener;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
public class OnBlockBreak implements Listener {
@EventHandler(priority = EventPriority.LOW)
public void onBlockBreakEvent(BlockBreakEvent e){
}
}

@ -0,0 +1,16 @@
package eu.ruekov.ruakij.LinkedBeaconTeleporters.listener;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPlaceEvent;
public class OnBlockPlace implements Listener {
@EventHandler(priority = EventPriority.LOW)
public void onBlockPlaceEvent(BlockPlaceEvent e){
}
}

@ -0,0 +1,18 @@
package eu.ruekov.ruakij.LinkedBeaconTeleporters.listener;
import org.bukkit.Material;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.PrepareItemCraftEvent;
import org.bukkit.inventory.CraftingInventory;
import org.bukkit.inventory.InventoryView;
import org.bukkit.inventory.ItemStack;
public class OnPrepareItemCraftEvent implements Listener {
@EventHandler(priority = EventPriority.LOW)
public void onPrepareItemCraftEvent(CraftingInventory what, InventoryView view, boolean isRepair){
}
}
Loading…
Cancel
Save