Showing Dropping Anvil Something (Ignore)

This commit is contained in:
Driftay 2019-09-15 05:02:53 -04:00
parent c4e81286b7
commit d98f5d9723
285 changed files with 28732 additions and 28729 deletions

View File

@ -6,15 +6,12 @@ import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.zcore.util.TL;
import net.milkbowl.vault.economy.Economy;
import org.bukkit.Material;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.inventory.meta.ItemMeta;
import java.util.List;
public class CmdBanner extends FCommand {
public CmdBanner() {
this.aliases.add("banner");

View File

@ -23,20 +23,25 @@ public class ConvertConfigHandler {
static FileConfiguration sv = YamlConfiguration.loadConfiguration(savageConfigFile);
static File configFile = new File("plugins/Factions/config.yml");
static FileConfiguration sb = YamlConfiguration.loadConfiguration(configFile);
public static void setString(String s){
static JavaPlugin plugin = JavaPlugin.getProvidingPlugin(FactionsPlugin.class);
public static void setString(String 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));
}
public static void setConfigSec(String s){
public static void setConfigSec(String s) {
ConfigurationSection cs = sv.getConfigurationSection(s);
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));
}
public static void convertconfig(Player player) {
if (new File("plugins/Factions/SavageFactions/config.yml").exists()) {
BukkitScheduler scheduler = plugin.getServer().getScheduler();

View File

@ -328,14 +328,14 @@ public class FactionsBlockListener implements Listener {
}
@EventHandler
public void onBannerBreak(BlockBreakEvent e){
public void onBannerBreak(BlockBreakEvent e) {
FPlayer fme = FPlayers.getInstance().getByPlayer(e.getPlayer());
if (FactionsPlugin.getInstance().mc17) {
return;
}
if(bannerLocations.containsValue(e.getBlock().getLocation())){
if(e.getBlock().getType().name().contains("BANNER")) {
if (bannerLocations.containsValue(e.getBlock().getLocation())) {
if (e.getBlock().getType().name().contains("BANNER")) {
e.setCancelled(true);
fme.msg(TL.BANNER_CANNOT_BREAK);
}

View File

@ -736,7 +736,8 @@ public class FactionsPlayerListener implements Listener {
}
if (me.getAutoClaimFor() != null) {
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()) {
if (!Permission.MANAGE_SAFE_ZONE.has(player)) {
me.setIsAutoSafeClaimEnabled(false);
@ -805,7 +806,7 @@ public class FactionsPlayerListener implements Listener {
Player player = event.getPlayer();
// Check if the material is bypassing protection
if (block == null) return; // clicked in air, apparently
if(event.getItem() != null) {
if (event.getItem() != null) {
if (Conf.territoryBypassProtectedMaterials.contains(event.getItem().getType())) return;
}
if (GetPermissionFromUsableBlock(event.getClickedBlock().getType()) != null) {

View File

@ -4,14 +4,12 @@ import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.FPlayers;
import com.massivecraft.factions.FactionsPlugin;
import com.massivecraft.factions.zcore.util.TL;
import org.bukkit.Bukkit;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.entity.EntityBreedEvent;
import org.bukkit.event.entity.EntityDeathEvent;
import org.bukkit.event.player.PlayerFishEvent;

View File

@ -34,7 +34,8 @@ public class PermissableActionFrame {
List<GuiItem> GUIItems = new ArrayList<>();
ItemStack dumby = buildDummyItem();
// 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()) {
if (action.getSlot() == -1) continue;
GUIItems.set(action.getSlot(), new GuiItem(action.buildAsset(fplayer, perm), e -> {

View File

@ -33,7 +33,8 @@ public class PermissableRelationFrame {
List<GuiItem> GUIItems = new ArrayList<>();
ItemStack dumby = buildDummyItem();
// 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");
for (String key : sec.getConfigurationSection("slots").getKeys(false)) {
GUIItems.set(sec.getInt("slots." + key), new GuiItem(buildAsset("fperm-gui.relation.materials." + key, key), e -> {