mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-09 20:21:07 +00:00
Renamed Listeners and their package
This commit is contained in:
parent
82cffd8c31
commit
4470300624
@ -3,7 +3,7 @@ package de.epiceric.shopchest;
|
|||||||
import de.epiceric.shopchest.config.Config;
|
import de.epiceric.shopchest.config.Config;
|
||||||
import de.epiceric.shopchest.config.LanguageConfiguration;
|
import de.epiceric.shopchest.config.LanguageConfiguration;
|
||||||
import de.epiceric.shopchest.config.Regex;
|
import de.epiceric.shopchest.config.Regex;
|
||||||
import de.epiceric.shopchest.event.*;
|
import de.epiceric.shopchest.listeners.*;
|
||||||
import de.epiceric.shopchest.interfaces.JsonBuilder;
|
import de.epiceric.shopchest.interfaces.JsonBuilder;
|
||||||
import de.epiceric.shopchest.interfaces.jsonbuilder.*;
|
import de.epiceric.shopchest.interfaces.jsonbuilder.*;
|
||||||
import de.epiceric.shopchest.language.LanguageUtils;
|
import de.epiceric.shopchest.language.LanguageUtils;
|
||||||
@ -321,15 +321,15 @@ public class ShopChest extends JavaPlugin {
|
|||||||
|
|
||||||
initializeShops();
|
initializeShops();
|
||||||
|
|
||||||
getServer().getPluginManager().registerEvents(new UpdateHolograms(), this);
|
getServer().getPluginManager().registerEvents(new HologramUpdateListener(), this);
|
||||||
getServer().getPluginManager().registerEvents(new RegenerateShopItem(), this);
|
getServer().getPluginManager().registerEvents(new ItemProtectListener(), this);
|
||||||
getServer().getPluginManager().registerEvents(new InteractShop(this), this);
|
getServer().getPluginManager().registerEvents(new ShopInteractListener(this), this);
|
||||||
getServer().getPluginManager().registerEvents(new NotifyUpdate(this), this);
|
getServer().getPluginManager().registerEvents(new NotifyUpdateOnJoinListener(this), this);
|
||||||
getServer().getPluginManager().registerEvents(new ProtectChest(), this);
|
getServer().getPluginManager().registerEvents(new ChestProtectListener(), this);
|
||||||
getServer().getPluginManager().registerEvents(new ItemCustomNameListener(), this);
|
getServer().getPluginManager().registerEvents(new ItemCustomNameListener(), this);
|
||||||
|
|
||||||
if (getServer().getPluginManager().getPlugin("ClearLag") != null)
|
if (getServer().getPluginManager().getPlugin("ClearLag") != null)
|
||||||
getServer().getPluginManager().registerEvents(new RegenerateShopItemAfterRemove(), this);
|
getServer().getPluginManager().registerEvents(new ClearLagListener(), this);
|
||||||
|
|
||||||
if (getServer().getPluginManager().getPlugin("LWC") != null)
|
if (getServer().getPluginManager().getPlugin("LWC") != null)
|
||||||
new LWCMagnetListener(this).initializeListener();
|
new LWCMagnetListener(this).initializeListener();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package de.epiceric.shopchest.event;
|
package de.epiceric.shopchest.listeners;
|
||||||
|
|
||||||
import de.epiceric.shopchest.ShopChest;
|
import de.epiceric.shopchest.ShopChest;
|
||||||
import de.epiceric.shopchest.config.Config;
|
import de.epiceric.shopchest.config.Config;
|
||||||
@ -23,7 +23,7 @@ import org.bukkit.inventory.InventoryHolder;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class ProtectChest implements Listener {
|
public class ChestProtectListener implements Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onBlockBreak(BlockBreakEvent e) {
|
public void onBlockBreak(BlockBreakEvent e) {
|
@ -1,4 +1,4 @@
|
|||||||
package de.epiceric.shopchest.event;
|
package de.epiceric.shopchest.listeners;
|
||||||
|
|
||||||
import me.minebuilders.clearlag.events.EntityRemoveEvent;
|
import me.minebuilders.clearlag.events.EntityRemoveEvent;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
@ -8,7 +8,7 @@ import org.bukkit.event.Listener;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class RegenerateShopItemAfterRemove implements Listener {
|
public class ClearLagListener implements Listener {
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGH)
|
@EventHandler(priority = EventPriority.HIGH)
|
||||||
public void onEntityRemove(EntityRemoveEvent e) {
|
public void onEntityRemove(EntityRemoveEvent e) {
|
@ -1,4 +1,4 @@
|
|||||||
package de.epiceric.shopchest.event;
|
package de.epiceric.shopchest.listeners;
|
||||||
|
|
||||||
import de.epiceric.shopchest.config.Config;
|
import de.epiceric.shopchest.config.Config;
|
||||||
import de.epiceric.shopchest.shop.Shop;
|
import de.epiceric.shopchest.shop.Shop;
|
||||||
@ -9,9 +9,9 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.player.PlayerMoveEvent;
|
import org.bukkit.event.player.PlayerMoveEvent;
|
||||||
|
|
||||||
public class UpdateHolograms implements Listener {
|
public class HologramUpdateListener implements Listener {
|
||||||
|
|
||||||
public UpdateHolograms() {
|
public HologramUpdateListener() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
@ -1,4 +1,4 @@
|
|||||||
package de.epiceric.shopchest.event;
|
package de.epiceric.shopchest.listeners;
|
||||||
|
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
@ -1,4 +1,4 @@
|
|||||||
package de.epiceric.shopchest.event;
|
package de.epiceric.shopchest.listeners;
|
||||||
|
|
||||||
|
|
||||||
import org.bukkit.entity.Item;
|
import org.bukkit.entity.Item;
|
||||||
@ -10,10 +10,7 @@ import org.bukkit.event.inventory.InventoryPickupItemEvent;
|
|||||||
import org.bukkit.event.inventory.InventoryType;
|
import org.bukkit.event.inventory.InventoryType;
|
||||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||||
|
|
||||||
public class RegenerateShopItem implements Listener {
|
public class ItemProtectListener implements Listener {
|
||||||
|
|
||||||
public RegenerateShopItem() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGH)
|
@EventHandler(priority = EventPriority.HIGH)
|
||||||
public void onItemDespawn(ItemDespawnEvent e) {
|
public void onItemDespawn(ItemDespawnEvent e) {
|
@ -1,4 +1,4 @@
|
|||||||
package de.epiceric.shopchest.event;
|
package de.epiceric.shopchest.listeners;
|
||||||
|
|
||||||
import com.griefcraft.lwc.LWC;
|
import com.griefcraft.lwc.LWC;
|
||||||
import com.griefcraft.scripting.JavaModule;
|
import com.griefcraft.scripting.JavaModule;
|
@ -1,4 +1,4 @@
|
|||||||
package de.epiceric.shopchest.event;
|
package de.epiceric.shopchest.listeners;
|
||||||
|
|
||||||
import de.epiceric.shopchest.ShopChest;
|
import de.epiceric.shopchest.ShopChest;
|
||||||
import de.epiceric.shopchest.config.Regex;
|
import de.epiceric.shopchest.config.Regex;
|
||||||
@ -13,12 +13,12 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
|
|
||||||
public class NotifyUpdate implements Listener {
|
public class NotifyUpdateOnJoinListener implements Listener {
|
||||||
|
|
||||||
private ShopChest plugin;
|
private ShopChest plugin;
|
||||||
private Permission perm;
|
private Permission perm;
|
||||||
|
|
||||||
public NotifyUpdate(ShopChest plugin) {
|
public NotifyUpdateOnJoinListener(ShopChest plugin) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
perm = plugin.getPermission();
|
perm = plugin.getPermission();
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package de.epiceric.shopchest.event;
|
package de.epiceric.shopchest.listeners;
|
||||||
|
|
||||||
import com.griefcraft.lwc.LWC;
|
import com.griefcraft.lwc.LWC;
|
||||||
import com.griefcraft.model.Protection;
|
import com.griefcraft.model.Protection;
|
||||||
@ -36,14 +36,14 @@ import org.yi.acru.bukkit.Lockette.Lockette;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class InteractShop implements Listener {
|
public class ShopInteractListener implements Listener {
|
||||||
|
|
||||||
private ShopChest plugin;
|
private ShopChest plugin;
|
||||||
private Permission perm;
|
private Permission perm;
|
||||||
private Economy econ;
|
private Economy econ;
|
||||||
private Database database;
|
private Database database;
|
||||||
|
|
||||||
public InteractShop(ShopChest plugin) {
|
public ShopInteractListener(ShopChest plugin) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
this.perm = plugin.getPermission();
|
this.perm = plugin.getPermission();
|
||||||
this.econ = plugin.getEconomy();
|
this.econ = plugin.getEconomy();
|
Loading…
Reference in New Issue
Block a user