Merge from DroppingAnvil/1.6.x
This commit is contained in:
commit
9b9633aa68
@ -2,7 +2,6 @@ package com.massivecraft.factions;
|
|||||||
|
|
||||||
import ch.njol.skript.Skript;
|
import ch.njol.skript.Skript;
|
||||||
import ch.njol.skript.SkriptAddon;
|
import ch.njol.skript.SkriptAddon;
|
||||||
import com.earth2me.essentials.Essentials;
|
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
import com.massivecraft.factions.cmd.CmdAutoHelp;
|
import com.massivecraft.factions.cmd.CmdAutoHelp;
|
||||||
@ -189,7 +188,10 @@ public class FactionsPlugin extends MPlugin {
|
|||||||
}
|
}
|
||||||
this.loadSuccessful = false;
|
this.loadSuccessful = false;
|
||||||
|
|
||||||
saveDefaultConfig();
|
if (!new File(this.getDataFolder() + "/config.yml").exists()) {
|
||||||
|
this.saveResource("config.yml", false);
|
||||||
|
this.reloadConfig();
|
||||||
|
}
|
||||||
//Attempt to generate a permission list
|
//Attempt to generate a permission list
|
||||||
PermissionList.generateFile();
|
PermissionList.generateFile();
|
||||||
|
|
||||||
@ -266,7 +268,7 @@ public class FactionsPlugin extends MPlugin {
|
|||||||
this.getServer().getScheduler().runTaskTimer(this, CheckTask::cleanupTask, 0L, 1200L);
|
this.getServer().getScheduler().runTaskTimer(this, CheckTask::cleanupTask, 0L, 1200L);
|
||||||
this.getServer().getScheduler().runTaskTimerAsynchronously(this, new WeeWooTask(this), 600L, 600L);
|
this.getServer().getScheduler().runTaskTimerAsynchronously(this, new WeeWooTask(this), 600L, 600L);
|
||||||
}
|
}
|
||||||
if(Conf.useDiscordSystem) {
|
if(Conf.useDiscordSystem && !Conf.discordBotToken.equals("<token here>")) {
|
||||||
new FactionChatHandler(this);
|
new FactionChatHandler(this);
|
||||||
} else {
|
} else {
|
||||||
System.out.println("\n\n\n SABER-FACTIONS-DISCORD-INTEGRATION - You are not using Discord integration features, set conf.json option useDiscordSystem to true and put a valid token in before using!\n\n\n");
|
System.out.println("\n\n\n SABER-FACTIONS-DISCORD-INTEGRATION - You are not using Discord integration features, set conf.json option useDiscordSystem to true and put a valid token in before using!\n\n\n");
|
||||||
|
@ -14,10 +14,7 @@ import org.bukkit.inventory.ItemFlag;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class MissionGUI implements FactionGUI {
|
public class MissionGUI implements FactionGUI {
|
||||||
private FactionsPlugin plugin;
|
private FactionsPlugin plugin;
|
||||||
@ -79,7 +76,15 @@ public class MissionGUI implements FactionGUI {
|
|||||||
if (configurationSection == null) {
|
if (configurationSection == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
for (int fill = 0; fill < configurationSection.getInt("FillItem.Rows") * 9; ++fill) {
|
||||||
|
ItemStack fillItem = new ItemStack(XMaterial.matchXMaterial(configurationSection.getString("FillItem.Material")).parseItem());
|
||||||
|
ItemMeta meta = fillItem.getItemMeta();
|
||||||
|
meta.setDisplayName("");
|
||||||
|
fillItem.setItemMeta(meta);
|
||||||
|
inventory.setItem(fill, fillItem);
|
||||||
|
}
|
||||||
for (String key : configurationSection.getKeys(false)) {
|
for (String key : configurationSection.getKeys(false)) {
|
||||||
|
if (!key.equals("FillItem")) {
|
||||||
ConfigurationSection section = configurationSection.getConfigurationSection(key);
|
ConfigurationSection section = configurationSection.getConfigurationSection(key);
|
||||||
int slot = section.getInt("Slot");
|
int slot = section.getInt("Slot");
|
||||||
|
|
||||||
@ -105,6 +110,7 @@ public class MissionGUI implements FactionGUI {
|
|||||||
slots.put(slot, key);
|
slots.put(slot, key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Inventory getInventory() {
|
public Inventory getInventory() {
|
||||||
return inventory;
|
return inventory;
|
||||||
|
@ -756,6 +756,9 @@ DenyMissionsMoreThenOnce: true #this setting to true, means that if they complet
|
|||||||
|
|
||||||
#Mission Types: KILL, MINE, PLACE, FISH, TAME, ENCHANT, CONSUME
|
#Mission Types: KILL, MINE, PLACE, FISH, TAME, ENCHANT, CONSUME
|
||||||
Missions:
|
Missions:
|
||||||
|
FillItem:
|
||||||
|
Material: BLACK_STAINED_GLASS_PANE
|
||||||
|
Rows: 3
|
||||||
sugarcane:
|
sugarcane:
|
||||||
Slot: 11
|
Slot: 11
|
||||||
Material: "SUGAR_CANE"
|
Material: "SUGAR_CANE"
|
||||||
|
Loading…
Reference in New Issue
Block a user