Showing Dropping Anvil Something (Ignore)
This commit is contained in:
parent
c4e81286b7
commit
d98f5d9723
@ -6,15 +6,12 @@ import com.massivecraft.factions.struct.Permission;
|
|||||||
import com.massivecraft.factions.zcore.util.TL;
|
import com.massivecraft.factions.zcore.util.TL;
|
||||||
import net.milkbowl.vault.economy.Economy;
|
import net.milkbowl.vault.economy.Economy;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.OfflinePlayer;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.PlayerInventory;
|
import org.bukkit.inventory.PlayerInventory;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class CmdBanner extends FCommand {
|
public class CmdBanner extends FCommand {
|
||||||
public CmdBanner() {
|
public CmdBanner() {
|
||||||
this.aliases.add("banner");
|
this.aliases.add("banner");
|
||||||
|
@ -23,20 +23,25 @@ public class ConvertConfigHandler {
|
|||||||
static FileConfiguration sv = YamlConfiguration.loadConfiguration(savageConfigFile);
|
static FileConfiguration sv = YamlConfiguration.loadConfiguration(savageConfigFile);
|
||||||
static File configFile = new File("plugins/Factions/config.yml");
|
static File configFile = new File("plugins/Factions/config.yml");
|
||||||
static FileConfiguration sb = YamlConfiguration.loadConfiguration(configFile);
|
static FileConfiguration sb = YamlConfiguration.loadConfiguration(configFile);
|
||||||
|
static JavaPlugin plugin = JavaPlugin.getProvidingPlugin(FactionsPlugin.class);
|
||||||
|
|
||||||
public static void setString(String s) {
|
public static void setString(String s) {
|
||||||
sb.set(s, sv.getString(s));
|
sb.set(s, sv.getString(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setInt(String s) {
|
public static void setInt(String s) {
|
||||||
sb.set(s, sv.getInt(s));
|
sb.set(s, sv.getInt(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setConfigSec(String s) {
|
public static void setConfigSec(String s) {
|
||||||
ConfigurationSection cs = sv.getConfigurationSection(s);
|
ConfigurationSection cs = sv.getConfigurationSection(s);
|
||||||
sb.set(s, cs);
|
sb.set(s, cs);
|
||||||
}
|
}
|
||||||
static JavaPlugin plugin = JavaPlugin.getProvidingPlugin(FactionsPlugin.class);
|
|
||||||
public static void setBoolean(String s) {
|
public static void setBoolean(String s) {
|
||||||
sb.set(s, sv.getBoolean(s));
|
sb.set(s, sv.getBoolean(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void convertconfig(Player player) {
|
public static void convertconfig(Player player) {
|
||||||
if (new File("plugins/Factions/SavageFactions/config.yml").exists()) {
|
if (new File("plugins/Factions/SavageFactions/config.yml").exists()) {
|
||||||
BukkitScheduler scheduler = plugin.getServer().getScheduler();
|
BukkitScheduler scheduler = plugin.getServer().getScheduler();
|
||||||
|
@ -736,7 +736,8 @@ public class FactionsPlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
if (me.getAutoClaimFor() != null) {
|
if (me.getAutoClaimFor() != null) {
|
||||||
me.attemptClaim(me.getAutoClaimFor(), event.getTo(), true);
|
me.attemptClaim(me.getAutoClaimFor(), event.getTo(), true);
|
||||||
if (Conf.disableFlightOnFactionClaimChange && event.getPlayer().getGameMode() != GameMode.CREATIVE) CmdFly.disableFlight(me);
|
if (Conf.disableFlightOnFactionClaimChange && event.getPlayer().getGameMode() != GameMode.CREATIVE)
|
||||||
|
CmdFly.disableFlight(me);
|
||||||
} else if (me.isAutoSafeClaimEnabled()) {
|
} else if (me.isAutoSafeClaimEnabled()) {
|
||||||
if (!Permission.MANAGE_SAFE_ZONE.has(player)) {
|
if (!Permission.MANAGE_SAFE_ZONE.has(player)) {
|
||||||
me.setIsAutoSafeClaimEnabled(false);
|
me.setIsAutoSafeClaimEnabled(false);
|
||||||
|
@ -4,14 +4,12 @@ import com.massivecraft.factions.FPlayer;
|
|||||||
import com.massivecraft.factions.FPlayers;
|
import com.massivecraft.factions.FPlayers;
|
||||||
import com.massivecraft.factions.FactionsPlugin;
|
import com.massivecraft.factions.FactionsPlugin;
|
||||||
import com.massivecraft.factions.zcore.util.TL;
|
import com.massivecraft.factions.zcore.util.TL;
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.block.BlockBreakEvent;
|
import org.bukkit.event.block.BlockBreakEvent;
|
||||||
import org.bukkit.event.block.BlockPlaceEvent;
|
import org.bukkit.event.block.BlockPlaceEvent;
|
||||||
import org.bukkit.event.entity.EntityBreedEvent;
|
|
||||||
import org.bukkit.event.entity.EntityDeathEvent;
|
import org.bukkit.event.entity.EntityDeathEvent;
|
||||||
import org.bukkit.event.player.PlayerFishEvent;
|
import org.bukkit.event.player.PlayerFishEvent;
|
||||||
|
|
||||||
|
@ -34,7 +34,8 @@ public class PermissableActionFrame {
|
|||||||
List<GuiItem> GUIItems = new ArrayList<>();
|
List<GuiItem> GUIItems = new ArrayList<>();
|
||||||
ItemStack dumby = buildDummyItem();
|
ItemStack dumby = buildDummyItem();
|
||||||
// Fill background of GUI with dumbyitem & replace GUI assets after
|
// Fill background of GUI with dumbyitem & replace GUI assets after
|
||||||
for (int x = 0; x <= (gui.getRows() * 9) - 1; x++) GUIItems.add(new GuiItem(dumby, e -> e.setCancelled(true)));
|
for (int x = 0; x <= (gui.getRows() * 9) - 1; x++)
|
||||||
|
GUIItems.add(new GuiItem(dumby, e -> e.setCancelled(true)));
|
||||||
for (PermissableAction action : PermissableAction.values()) {
|
for (PermissableAction action : PermissableAction.values()) {
|
||||||
if (action.getSlot() == -1) continue;
|
if (action.getSlot() == -1) continue;
|
||||||
GUIItems.set(action.getSlot(), new GuiItem(action.buildAsset(fplayer, perm), e -> {
|
GUIItems.set(action.getSlot(), new GuiItem(action.buildAsset(fplayer, perm), e -> {
|
||||||
|
@ -33,7 +33,8 @@ public class PermissableRelationFrame {
|
|||||||
List<GuiItem> GUIItems = new ArrayList<>();
|
List<GuiItem> GUIItems = new ArrayList<>();
|
||||||
ItemStack dumby = buildDummyItem();
|
ItemStack dumby = buildDummyItem();
|
||||||
// Fill background of GUI with dumbyitem & replace GUI assets after
|
// Fill background of GUI with dumbyitem & replace GUI assets after
|
||||||
for (int x = 0; x <= (gui.getRows() * 9) - 1; x++) GUIItems.add(new GuiItem(dumby, e -> e.setCancelled(true)));
|
for (int x = 0; x <= (gui.getRows() * 9) - 1; x++)
|
||||||
|
GUIItems.add(new GuiItem(dumby, e -> e.setCancelled(true)));
|
||||||
ConfigurationSection sec = FactionsPlugin.getInstance().getConfig().getConfigurationSection("fperm-gui.relation");
|
ConfigurationSection sec = FactionsPlugin.getInstance().getConfig().getConfigurationSection("fperm-gui.relation");
|
||||||
for (String key : sec.getConfigurationSection("slots").getKeys(false)) {
|
for (String key : sec.getConfigurationSection("slots").getKeys(false)) {
|
||||||
GUIItems.set(sec.getInt("slots." + key), new GuiItem(buildAsset("fperm-gui.relation.materials." + key, key), e -> {
|
GUIItems.set(sec.getInt("slots." + key), new GuiItem(buildAsset("fperm-gui.relation.materials." + key, key), e -> {
|
||||||
|
Loading…
Reference in New Issue
Block a user