Compare commits

..

28 Commits

Author SHA1 Message Date
Driftay
bdc658922f small fix with placeholder 2019-10-13 11:08:17 -04:00
DroppingAnvil
40d6054275 So many improvements 2019-10-13 02:53:45 -05:00
DroppingAnvil
93744347db Moved code 2 lines up to not bypass the reload time count 2019-10-13 02:52:23 -05:00
DroppingAnvil
b13afcb6a2 Fixed /f corner cannot claim spam, Fixed some issues with no blocks placeable near faction vault with certain circumstances, /f reload now reloads corners, Message for needing more power to claim missing space fixed. 2019-10-13 02:48:53 -05:00
DroppingAnvil
cd33572460 Merge from DroppingAnvil/1.6.x
Bug and spelling fixes + version change
2019-10-12 15:24:43 -05:00
DroppingAnvil
c9eca60c18 Bug and spelling fixes + version change 2019-10-12 15:23:11 -05:00
DroppingAnvil
9b9633aa68 Merge from DroppingAnvil/1.6.x 2019-10-12 13:37:30 -05:00
DroppingAnvil
b46009f633 MissionGUI improvements with a small fix for first run of the plugin 2019-10-12 13:34:36 -05:00
DroppingAnvil
b1d51f40ce Merge from Driftay/1.6.x 2019-10-10 13:08:14 -05:00
Driftay
f6fc529898 Merge pull request #24 from DroppingAnvil/1.6.x
Now 1.7 compatible again
2019-10-10 01:06:36 -04:00
DroppingAnvil
f730023b42 Now 1.7 compatible again 2019-10-09 16:53:32 -05:00
Driftay
7339afd60e Merge pull request #23 from DroppingAnvil/1.6.x
This update makes the plugin easier to set up (:
2019-10-09 17:17:17 -04:00
DroppingAnvil
2b0bfae44c This update makes the plugin easier to set up (: 2019-10-08 17:48:46 -05:00
Driftay
533bd1b984 Merge pull request #22 from DroppingAnvil/1.6.x
More permission kit fixes
2019-10-07 20:56:49 -04:00
DroppingAnvil
0b626397a5 More permission kit fixes 2019-10-07 19:11:55 -05:00
DroppingAnvil
db669ce2c2 More permission kit fixes 2019-10-06 17:30:08 -05:00
Driftay
65e7061135 Merge pull request #21 from DroppingAnvil/1.6.x
More permission kit fixes
2019-10-04 18:55:52 -04:00
DroppingAnvil
4b23117262 More permission kit fixes 2019-10-04 17:54:22 -05:00
Driftay
06395b5c4a Merge pull request #20 from DroppingAnvil/1.6.x
Players unable to use /f perms due to lack of permissions
2019-10-04 18:48:50 -04:00
DroppingAnvil
7973d807e6 Merge from Driftay/1.6.x
Merge from Driftay 1.6.x
2019-10-04 17:38:56 -05:00
DroppingAnvil
666d6ab21d Players unable to use /f perms due to lack of permissions 2019-10-04 17:35:25 -05:00
Driftay
fac351d35a Update README.md 2019-10-02 13:56:28 -04:00
Driftay
bd4f92e133 Update README.md 2019-10-02 13:49:41 -04:00
Driftay
4bf1676b2b Update README.md 2019-10-02 13:47:34 -04:00
Driftay
6ba970ac13 2 typos 2019-10-01 12:34:02 -04:00
Driftay
a057a235b8 Fixed a Bunch of Misc stuff & Made config.yml CLEAN 2019-10-01 12:18:44 -04:00
Driftay
10f06baadc Version Change 2019-09-30 16:04:41 -04:00
Driftay
07fa138d58 Disabled Discord Features By Default 2019-09-30 16:03:44 -04:00
22 changed files with 372 additions and 285 deletions

View File

@@ -1,5 +1,7 @@
# SaberFactions # SaberFactions
![Downloads](https://img.shields.io/github/downloads/driftay/saber-factions/total.svg) [![CodeFactor](https://www.codefactor.io/repository/github/driftay/saber-factions/badge)](https://www.codefactor.io/repository/github/driftay/saber-factions)
SaberFactions is a fork of both FactionsUUID and SavageFactions. Creators of those plugins include DtrShock and ProSavage. Credits to them. SaberFactions is a fork of both FactionsUUID and SavageFactions. Creators of those plugins include DtrShock and ProSavage. Credits to them.
SaberFactions is the newest, latest and greatest factions plugin designed for the best and most functional factions experience minecraft has seen! SaberFactions is the newest, latest and greatest factions plugin designed for the best and most functional factions experience minecraft has seen!

View File

@@ -4,7 +4,7 @@
<groupId>com.massivecraft</groupId> <groupId>com.massivecraft</groupId>
<artifactId>Factions</artifactId> <artifactId>Factions</artifactId>
<version>1.6.9.5-U0.2.1-2.0.1-BETA</version> <version>1.6.9.5-U0.2.1-2.0.3-BETA</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>SaberFactions</name> <name>SaberFactions</name>

View File

@@ -98,7 +98,7 @@ public class Conf {
public static boolean worldGuardChecking = false; public static boolean worldGuardChecking = false;
public static boolean worldGuardBuildPriority = false; public static boolean worldGuardBuildPriority = false;
//DISCORD //DISCORD
public static boolean useDiscordSystem = true; public static boolean useDiscordSystem = false;
public static String discordBotToken = "<token here>"; public static String discordBotToken = "<token here>";
public static String fromDiscordFactionChatPrefix = "&f[&dDiscord&f] "; public static String fromDiscordFactionChatPrefix = "&f[&dDiscord&f] ";
public static String avatarUrl = "http://cravatar.eu/helmavatar/%uuid%.png"; public static String avatarUrl = "http://cravatar.eu/helmavatar/%uuid%.png";
@@ -161,22 +161,22 @@ public class Conf {
public static boolean territoryDenyBuildWhenOffline = true; public static boolean territoryDenyBuildWhenOffline = true;
public static boolean territoryPainBuild = false; public static boolean territoryPainBuild = false;
public static boolean territoryPainBuildWhenOffline = false; public static boolean territoryPainBuildWhenOffline = false;
public static boolean territoryDenyUseage = true; public static boolean territoryDenyUsage = true;
public static boolean territoryEnemyDenyBuild = true; public static boolean territoryEnemyDenyBuild = true;
public static boolean territoryEnemyDenyBuildWhenOffline = true; public static boolean territoryEnemyDenyBuildWhenOffline = true;
public static boolean territoryEnemyPainBuild = false; public static boolean territoryEnemyPainBuild = false;
public static boolean territoryEnemyPainBuildWhenOffline = false; public static boolean territoryEnemyPainBuildWhenOffline = false;
public static boolean territoryEnemyDenyUseage = true; public static boolean territoryEnemyDenyUsage = true;
public static boolean territoryAllyDenyBuild = true; public static boolean territoryAllyDenyBuild = true;
public static boolean territoryAllyDenyBuildWhenOffline = true; public static boolean territoryAllyDenyBuildWhenOffline = true;
public static boolean territoryAllyPainBuild = false; public static boolean territoryAllyPainBuild = false;
public static boolean territoryAllyPainBuildWhenOffline = false; public static boolean territoryAllyPainBuildWhenOffline = false;
public static boolean territoryAllyDenyUseage = true; public static boolean territoryAllyDenyUsage = true;
public static boolean territoryTruceDenyBuild = true; public static boolean territoryTruceDenyBuild = true;
public static boolean territoryTruceDenyBuildWhenOffline = true; public static boolean territoryTruceDenyBuildWhenOffline = true;
public static boolean territoryTrucePainBuild = false; public static boolean territoryTrucePainBuild = false;
public static boolean territoryTrucePainBuildWhenOffline = false; public static boolean territoryTrucePainBuildWhenOffline = false;
public static boolean territoryTruceDenyUseage = true; public static boolean territoryTruceDenyUsage = true;
public static boolean territoryBlockCreepers = false; public static boolean territoryBlockCreepers = false;
public static boolean territoryBlockCreepersWhenOffline = false; public static boolean territoryBlockCreepersWhenOffline = false;
public static boolean territoryBlockFireballs = false; public static boolean territoryBlockFireballs = false;
@@ -186,12 +186,12 @@ public class Conf {
public static boolean territoryDenyEndermanBlocks = true; public static boolean territoryDenyEndermanBlocks = true;
public static boolean territoryDenyEndermanBlocksWhenOffline = true; public static boolean territoryDenyEndermanBlocksWhenOffline = true;
public static boolean safeZoneDenyBuild = true; public static boolean safeZoneDenyBuild = true;
public static boolean safeZoneDenyUseage = true; public static boolean safeZoneDenyUsage = true;
public static boolean safeZoneBlockTNT = true; public static boolean safeZoneBlockTNT = true;
public static boolean safeZonePreventAllDamageToPlayers = false; public static boolean safeZonePreventAllDamageToPlayers = false;
public static boolean safeZoneDenyEndermanBlocks = true; public static boolean safeZoneDenyEndermanBlocks = true;
public static boolean warZoneDenyBuild = true; public static boolean warZoneDenyBuild = true;
public static boolean warZoneDenyUseage = true; public static boolean warZoneDenyUsage = true;
public static boolean warZoneBlockCreepers = false; public static boolean warZoneBlockCreepers = false;
public static boolean warZoneBlockFireballs = false; public static boolean warZoneBlockFireballs = false;
public static boolean warZoneBlockTNT = true; public static boolean warZoneBlockTNT = true;
@@ -199,7 +199,7 @@ public class Conf {
public static boolean warZoneFriendlyFire = false; public static boolean warZoneFriendlyFire = false;
public static boolean warZoneDenyEndermanBlocks = true; public static boolean warZoneDenyEndermanBlocks = true;
public static boolean wildernessDenyBuild = false; public static boolean wildernessDenyBuild = false;
public static boolean wildernessDenyUseage = false; public static boolean wildernessDenyUsage = false;
public static boolean wildernessBlockCreepers = false; public static boolean wildernessBlockCreepers = false;
public static boolean wildernessBlockFireballs = false; public static boolean wildernessBlockFireballs = false;
public static boolean wildernessBlockTNT = false; public static boolean wildernessBlockTNT = false;
@@ -217,9 +217,9 @@ public class Conf {
public static boolean ownedMessageByChunk = false; public static boolean ownedMessageByChunk = false;
public static boolean pistonProtectionThroughDenyBuild = true; public static boolean pistonProtectionThroughDenyBuild = true;
public static Set<Material> territoryProtectedMaterials = EnumSet.noneOf(Material.class); public static Set<Material> territoryProtectedMaterials = EnumSet.noneOf(Material.class);
public static Set<Material> territoryDenyUseageMaterials = EnumSet.noneOf(Material.class); public static Set<Material> territoryDenyUsageMaterials = EnumSet.noneOf(Material.class);
public static Set<Material> territoryProtectedMaterialsWhenOffline = EnumSet.noneOf(Material.class); public static Set<Material> territoryProtectedMaterialsWhenOffline = EnumSet.noneOf(Material.class);
public static Set<Material> territoryDenyUseageMaterialsWhenOffline = EnumSet.noneOf(Material.class); public static Set<Material> territoryDenyUsageMaterialsWhenOffline = EnumSet.noneOf(Material.class);
public static transient Set<EntityType> safeZoneNerfedCreatureTypes = EnumSet.noneOf(EntityType.class); public static transient Set<EntityType> safeZoneNerfedCreatureTypes = EnumSet.noneOf(EntityType.class);
/// <summary> /// <summary>
/// This defines a set of materials which should always be allowed to use, regardless of factions permissions. /// This defines a set of materials which should always be allowed to use, regardless of factions permissions.
@@ -388,25 +388,25 @@ public class Conf {
// Config is not loading if value is empty ??? // Config is not loading if value is empty ???
territoryBypassProtectedMaterials.add(Material.COOKIE); territoryBypassProtectedMaterials.add(Material.COOKIE);
territoryDenyUseageMaterials.add(XMaterial.FIRE_CHARGE.parseMaterial()); territoryDenyUsageMaterials.add(XMaterial.FIRE_CHARGE.parseMaterial());
territoryDenyUseageMaterials.add(Material.FLINT_AND_STEEL); territoryDenyUsageMaterials.add(Material.FLINT_AND_STEEL);
territoryDenyUseageMaterials.add(Material.BUCKET); territoryDenyUsageMaterials.add(Material.BUCKET);
territoryDenyUseageMaterials.add(Material.WATER_BUCKET); territoryDenyUsageMaterials.add(Material.WATER_BUCKET);
territoryDenyUseageMaterials.add(Material.LAVA_BUCKET); territoryDenyUsageMaterials.add(Material.LAVA_BUCKET);
if (!FactionsPlugin.getInstance().mc17) { if (!FactionsPlugin.getInstance().mc17) {
territoryDenyUseageMaterials.add(Material.ARMOR_STAND); territoryDenyUsageMaterials.add(Material.ARMOR_STAND);
} }
territoryProtectedMaterialsWhenOffline.add(Material.BEACON); territoryProtectedMaterialsWhenOffline.add(Material.BEACON);
territoryDenyUseageMaterialsWhenOffline.add(XMaterial.FIRE_CHARGE.parseMaterial()); territoryDenyUsageMaterialsWhenOffline.add(XMaterial.FIRE_CHARGE.parseMaterial());
territoryDenyUseageMaterialsWhenOffline.add(Material.FLINT_AND_STEEL); territoryDenyUsageMaterialsWhenOffline.add(Material.FLINT_AND_STEEL);
territoryDenyUseageMaterialsWhenOffline.add(Material.BUCKET); territoryDenyUsageMaterialsWhenOffline.add(Material.BUCKET);
territoryDenyUseageMaterialsWhenOffline.add(Material.WATER_BUCKET); territoryDenyUsageMaterialsWhenOffline.add(Material.WATER_BUCKET);
territoryDenyUseageMaterialsWhenOffline.add(Material.LAVA_BUCKET); territoryDenyUsageMaterialsWhenOffline.add(Material.LAVA_BUCKET);
if (!FactionsPlugin.getInstance().mc17) { if (!FactionsPlugin.getInstance().mc17) {
territoryDenyUseageMaterialsWhenOffline.add(Material.ARMOR_STAND); territoryDenyUsageMaterialsWhenOffline.add(Material.ARMOR_STAND);
} }
safeZoneNerfedCreatureTypes.add(EntityType.BLAZE); safeZoneNerfedCreatureTypes.add(EntityType.BLAZE);
safeZoneNerfedCreatureTypes.add(EntityType.CAVE_SPIDER); safeZoneNerfedCreatureTypes.add(EntityType.CAVE_SPIDER);

View File

@@ -146,18 +146,10 @@ public class FactionsPlugin extends MPlugin {
public void onEnable() { public void onEnable() {
log("==== Setup ===="); log("==== Setup ====");
// Vault dependency check.
if (getServer().getPluginManager().getPlugin("Vault") == null) {
log("Vault is not present, the plugin will not run properly.");
getServer().getPluginManager().disablePlugin(instance);
return;
}
int version = Integer.parseInt(ReflectionUtils.PackageType.getServerVersion().split("_")[1]); int version = Integer.parseInt(ReflectionUtils.PackageType.getServerVersion().split("_")[1]);
switch (version) { switch (version) {
case 7: case 7:
FactionsPlugin.instance.log("Minecraft Version 1.7 found, disabling banners, itemflags inside GUIs, and Titles."); FactionsPlugin.instance.log("Minecraft Version 1.7 found, disabling banners, itemflags inside GUIs, corners, and Titles.");
mc17 = true; mc17 = true;
break; break;
case 8: case 8:
@@ -176,6 +168,18 @@ public class FactionsPlugin extends MPlugin {
mc114 = true; mc114 = true;
break; break;
} }
//Dependency checks
if (Bukkit.getPluginManager().isPluginEnabled("Vault") && Bukkit.getPluginManager().isPluginEnabled("Essentials")) {
RegisteredServiceProvider<Economy> rsp = FactionsPlugin.this.getServer().getServicesManager().getRegistration(Economy.class);
FactionsPlugin.econ = rsp.getProvider();
} else {
divider();
System.out.println("You are missing dependencies!");
System.out.println("Please verify EssentialsX and Vault are installed!");
Bukkit.getPluginManager().disablePlugin(instance);
divider();
return;
}
migrateFPlayerLeaders(); migrateFPlayerLeaders();
log("==== End Setup ===="); log("==== End Setup ====");
@@ -184,7 +188,12 @@ 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
PermissionList.generateFile();
// Load Conf from disk // Load Conf from disk
Conf.load(); Conf.load();
@@ -259,8 +268,10 @@ 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 {
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");
} }
ShopConfig.setup(); ShopConfig.setup();
@@ -287,10 +298,6 @@ public class FactionsPlugin extends MPlugin {
if (!CommodoreProvider.isSupported()) this.getCommand(refCommand).setTabCompleter(this); if (!CommodoreProvider.isSupported()) this.getCommand(refCommand).setTabCompleter(this);
RegisteredServiceProvider<Economy> rsp = FactionsPlugin.this.getServer().getServicesManager().getRegistration(Economy.class);
FactionsPlugin.econ = rsp.getProvider();
if (getDescription().getFullName().contains("BETA")) { if (getDescription().getFullName().contains("BETA")) {
divider(); divider();
System.out.println("You are using a BETA version of the plugin!"); System.out.println("You are using a BETA version of the plugin!");

View File

@@ -2,6 +2,7 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Conf; import com.massivecraft.factions.Conf;
import com.massivecraft.factions.FactionsPlugin; import com.massivecraft.factions.FactionsPlugin;
import com.massivecraft.factions.listeners.FactionsPlayerListener;
import com.massivecraft.factions.shop.ShopConfig; import com.massivecraft.factions.shop.ShopConfig;
import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.zcore.util.TL; import com.massivecraft.factions.zcore.util.TL;
@@ -28,6 +29,11 @@ public class CmdReload extends FCommand {
if (FactionsPlugin.getInstance().getConfig().getBoolean("enable-faction-flight")) { if (FactionsPlugin.getInstance().getConfig().getBoolean("enable-faction-flight")) {
FactionsPlugin.getInstance().factionsFlight = true; FactionsPlugin.getInstance().factionsFlight = true;
} }
if (!FactionsPlugin.getInstance().mc17) {
FactionsPlayerListener.loadCorners();
}
long timeReload = (System.currentTimeMillis() - timeInitStart); long timeReload = (System.currentTimeMillis() - timeInitStart);
context.msg(TL.COMMAND_RELOAD_TIME, timeReload); context.msg(TL.COMMAND_RELOAD_TIME, timeReload);

View File

@@ -44,7 +44,7 @@ public class CmdUnban extends FCommand {
context.faction.unban(target); context.faction.unban(target);
context.msg(TL.COMMAND_UNBAN_UNBANNED, context.fPlayer.getName(), target.getName()); context.msg(TL.COMMAND_UNBAN_UNBANNED, context.fPlayer.getName(), target.getName());
target.msg(TL.COMMAND_UNBAN_TARGET, context.faction.getTag(target)); target.msg(TL.COMMAND_UNBAN_TARGET.toString(), context.faction.getTag(target));
} }
@Override @Override

View File

@@ -77,6 +77,9 @@ public class CheckTask implements Runnable {
} }
faction.msg(TL.CHECK_WALLS_CHECK); faction.msg(TL.CHECK_WALLS_CHECK);
if (!Conf.useDiscordSystem) return;
String channelId = faction.getWallNotifyChannelId(); String channelId = faction.getWallNotifyChannelId();
if (channelId == null) { if (channelId == null) {
continue; continue;
@@ -122,6 +125,10 @@ public class CheckTask implements Runnable {
CheckTask.bufferChecks.add(faction.getId()); CheckTask.bufferChecks.add(faction.getId());
} }
faction.msg(TL.CHECK_BUFFERS_CHECK); faction.msg(TL.CHECK_BUFFERS_CHECK);
if (!Conf.useDiscordSystem) return;
String channelId = faction.getBufferNotifyChannelId(); String channelId = faction.getBufferNotifyChannelId();
if (channelId == null) { if (channelId == null) {
continue; continue;

View File

@@ -1,5 +1,6 @@
package com.massivecraft.factions.cmd.check; package com.massivecraft.factions.cmd.check;
import com.massivecraft.factions.Conf;
import com.massivecraft.factions.Faction; import com.massivecraft.factions.Faction;
import com.massivecraft.factions.Factions; import com.massivecraft.factions.Factions;
import com.massivecraft.factions.FactionsPlugin; import com.massivecraft.factions.FactionsPlugin;
@@ -24,9 +25,9 @@ public class WeeWooTask implements Runnable {
continue; continue;
} }
faction.msg(TL.WEE_WOO_MESSAGE); faction.msg(TL.WEE_WOO_MESSAGE);
if (!FactionChatHandler.jda.getStatus().equals(JDA.Status.CONNECTED)) {
continue; if (!Conf.useDiscordSystem) return;
}
String discordChannelId = faction.getWeeWooChannelId(); String discordChannelId = faction.getWeeWooChannelId();
if (discordChannelId == null || discordChannelId.isEmpty()) { if (discordChannelId == null || discordChannelId.isEmpty()) {
continue; continue;

View File

@@ -9,6 +9,8 @@ import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.util.CornerTask; import com.massivecraft.factions.util.CornerTask;
import com.massivecraft.factions.zcore.fperms.PermissableAction; import com.massivecraft.factions.zcore.fperms.PermissableAction;
import com.massivecraft.factions.zcore.util.TL; import com.massivecraft.factions.zcore.util.TL;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator; import java.util.Comparator;
@@ -29,6 +31,10 @@ public class CmdCorner extends FCommand {
@Override @Override
public void perform(CommandContext context) { public void perform(CommandContext context) {
if (FactionsPlugin.getInstance().mc17) {
context.player.sendMessage(ChatColor.RED + "This command is disabled!");
return;
}
FLocation to = new FLocation(context.player.getLocation()); FLocation to = new FLocation(context.player.getLocation());
if (FactionsPlugin.getInstance().getFactionsPlayerListener().getCorners().contains(to)) { if (FactionsPlugin.getInstance().getFactionsPlayerListener().getCorners().contains(to)) {
Faction cornerAt = Board.getInstance().getFactionAt(to); Faction cornerAt = Board.getInstance().getFactionAt(to);

View File

@@ -115,16 +115,16 @@ public class CmdTnt extends FCommand {
context.msg(TL.GENERIC_ARGS_TOOFEW); context.msg(TL.GENERIC_ARGS_TOOFEW);
context.msg(context.args.get(0).equalsIgnoreCase("take") || context.args.get(0).equalsIgnoreCase("t") ? TL.COMMAND_TNT_TAKE_DESCRIPTION : TL.COMMAND_TNT_ADD_DESCRIPTION); context.msg(context.args.get(0).equalsIgnoreCase("take") || context.args.get(0).equalsIgnoreCase("t") ? TL.COMMAND_TNT_TAKE_DESCRIPTION : TL.COMMAND_TNT_ADD_DESCRIPTION);
} }
context.sendMessage(TL.COMMAND_TNT_AMOUNT.toString().replace("{amount}", context.faction.getTnt() + "").replace("{bankSize}", context.faction.getTntBankLimit() + "")); context.msg(TL.COMMAND_TNT_AMOUNT, context.faction.getTnt(), context.faction.getTntBankLimit());
} }
public boolean inventoryContains(Inventory inventory, ItemStack item) { public boolean inventoryContains(Inventory inventory, ItemStack item) {
int count = 0; int count = 0;
ItemStack[] items = inventory.getContents(); ItemStack[] items = inventory.getContents();
for (int i = 0; i < items.length; i++) { for (ItemStack item1 : items) {
if (items[i] != null && items[i].getType() == item.getType() && items[i].getDurability() == item.getDurability()) { if (item1 != null && item1.getType() == item.getType() && item1.getDurability() == item.getDurability()) {
count += items[i].getAmount(); count += item1.getAmount();
} }
if (count >= item.getAmount()) { if (count >= item.getAmount()) {
return true; return true;

View File

@@ -40,9 +40,6 @@ public class FactionChatHandler extends ListenerAdapter {
private void startBot() { private void startBot() {
try { try {
jda = new JDABuilder(AccountType.BOT).setToken(Conf.discordBotToken).buildBlocking(); jda = new JDABuilder(AccountType.BOT).setToken(Conf.discordBotToken).buildBlocking();
if(jda == null) {
System.out.println("\n\n\n SABER-FACTIONS-DISCORD-INTEGRATION - Please Make a Valid Token To Use Discord Features! Location Conf.json discordBotToken.\n\n\n");
}
} catch (LoginException | InterruptedException e) { } catch (LoginException | InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
} }

View File

@@ -262,9 +262,9 @@ public class FactionsBlockListener implements Listener {
} }
} }
@EventHandler @EventHandler (ignoreCancelled = true)
public void onHopperPlace(BlockPlaceEvent e) { public void onHopperPlace(BlockPlaceEvent e) {
if (e.getItemInHand().getType() != Material.HOPPER && !FactionsPlugin.getInstance().getConfig().getBoolean("fvault.No-Hoppers-near-vault")) { if (e.getItemInHand().getType() != Material.HOPPER || !FactionsPlugin.getInstance().getConfig().getBoolean("fvault.No-Hoppers-near-vault")) {
return; return;
} }

View File

@@ -47,25 +47,31 @@ import java.util.logging.Level;
public class FactionsPlayerListener implements Listener { public class FactionsPlayerListener implements Listener {
HashMap<Player, Boolean> fallMap = new HashMap<>(); HashMap<Player, Boolean> fallMap = new HashMap<>();
private Set<FLocation> corners; public static Set<FLocation> corners;
// Holds the next time a player can have a map shown. // Holds the next time a player can have a map shown.
private HashMap<UUID, Long> showTimes = new HashMap<>(); private HashMap<UUID, Long> showTimes = new HashMap<>();
// for handling people who repeatedly spam attempts to open a door (or similar) in another faction's territory // for handling people who repeatedly spam attempts to open a door (or similar) in another faction's territory
private Map<String, InteractAttemptSpam> interactSpammers = new HashMap<>(); private Map<String, InteractAttemptSpam> interactSpammers = new HashMap<>();
public FactionsPlayerListener() { public FactionsPlayerListener() {
this.corners = new HashSet<>();
for (Player player : FactionsPlugin.getInstance().getServer().getOnlinePlayers()) { for (Player player : FactionsPlugin.getInstance().getServer().getOnlinePlayers()) {
initPlayer(player); initPlayer(player);
} }
if (!FactionsPlugin.getInstance().mc17) {
loadCorners();
}
}
public static void loadCorners() {
FactionsPlayerListener.corners = new HashSet<>();
for (World world : FactionsPlugin.getInstance().getServer().getWorlds()) { for (World world : FactionsPlugin.getInstance().getServer().getWorlds()) {
WorldBorder border = world.getWorldBorder(); WorldBorder border = world.getWorldBorder();
if (border != null) { if (border != null) {
int cornerCoord = (int) ((border.getSize() - 1.0) / 2.0); int cornerCoord = (int) ((border.getSize() - 1.0) / 2.0);
this.corners.add(new FLocation(world.getName(), FLocation.blockToChunk(cornerCoord), FLocation.blockToChunk(cornerCoord))); FactionsPlayerListener.corners.add(new FLocation(world.getName(), FLocation.blockToChunk(cornerCoord), FLocation.blockToChunk(cornerCoord)));
this.corners.add(new FLocation(world.getName(), FLocation.blockToChunk(cornerCoord), FLocation.blockToChunk(-cornerCoord))); FactionsPlayerListener.corners.add(new FLocation(world.getName(), FLocation.blockToChunk(cornerCoord), FLocation.blockToChunk(-cornerCoord)));
this.corners.add(new FLocation(world.getName(), FLocation.blockToChunk(-cornerCoord), FLocation.blockToChunk(cornerCoord))); FactionsPlayerListener.corners.add(new FLocation(world.getName(), FLocation.blockToChunk(-cornerCoord), FLocation.blockToChunk(cornerCoord)));
this.corners.add(new FLocation(world.getName(), FLocation.blockToChunk(-cornerCoord), FLocation.blockToChunk(-cornerCoord))); FactionsPlayerListener.corners.add(new FLocation(world.getName(), FLocation.blockToChunk(-cornerCoord), FLocation.blockToChunk(-cornerCoord)));
} }
} }
} }
@@ -108,17 +114,17 @@ public class FactionsPlayerListener implements Listener {
} }
if (otherFaction.hasPlayersOnline()) { if (otherFaction.hasPlayersOnline()) {
if (!Conf.territoryDenyUseageMaterials.contains(material)) { if (!Conf.territoryDenyUsageMaterials.contains(material)) {
return true; // Item isn't one we're preventing for online factions. return true; // Item isn't one we're preventing for online factions.
} }
} else { } else {
if (!Conf.territoryDenyUseageMaterialsWhenOffline.contains(material)) { if (!Conf.territoryDenyUsageMaterialsWhenOffline.contains(material)) {
return true; // Item isn't one we're preventing for offline factions. return true; // Item isn't one we're preventing for offline factions.
} }
} }
if (otherFaction.isWilderness()) { if (otherFaction.isWilderness()) {
if (!Conf.wildernessDenyUseage || Conf.worldsNoWildernessProtection.contains(location.getWorld().getName())) { if (!Conf.wildernessDenyUsage || Conf.worldsNoWildernessProtection.contains(location.getWorld().getName())) {
return true; // This is not faction territory. Use whatever you like here. return true; // This is not faction territory. Use whatever you like here.
} }
@@ -128,7 +134,7 @@ public class FactionsPlayerListener implements Listener {
return false; return false;
} else if (otherFaction.isSafeZone()) { } else if (otherFaction.isSafeZone()) {
if (!Conf.safeZoneDenyUseage || Permission.MANAGE_SAFE_ZONE.has(player)) { if (!Conf.safeZoneDenyUsage || Permission.MANAGE_SAFE_ZONE.has(player)) {
return true; return true;
} }
@@ -138,7 +144,7 @@ public class FactionsPlayerListener implements Listener {
return false; return false;
} else if (otherFaction.isWarZone()) { } else if (otherFaction.isWarZone()) {
if (!Conf.warZoneDenyUseage || Permission.MANAGE_WAR_ZONE.has(player)) { if (!Conf.warZoneDenyUsage || Permission.MANAGE_WAR_ZONE.has(player)) {
return true; return true;
} }

View File

@@ -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;

View File

@@ -174,13 +174,13 @@ public enum Relation implements Permissable {
if (isMember()) { if (isMember()) {
return false; return false;
} else if (isEnemy()) { } else if (isEnemy()) {
return Conf.territoryEnemyDenyUseage; return Conf.territoryEnemyDenyUsage;
} else if (isAlly()) { } else if (isAlly()) {
return Conf.territoryAllyDenyUseage; return Conf.territoryAllyDenyUsage;
} else if (isTruce()) { } else if (isTruce()) {
return Conf.territoryTruceDenyUseage; return Conf.territoryTruceDenyUsage;
} else { } else {
return Conf.territoryDenyUseage; return Conf.territoryDenyUsage;
} }
} }

View File

@@ -1,5 +1,6 @@
package com.massivecraft.factions.tag; package com.massivecraft.factions.tag;
import com.massivecraft.factions.FPlayers;
import com.massivecraft.factions.Factions; import com.massivecraft.factions.Factions;
import com.massivecraft.factions.FactionsPlugin; import com.massivecraft.factions.FactionsPlugin;
import com.massivecraft.factions.zcore.util.TL; import com.massivecraft.factions.zcore.util.TL;
@@ -12,7 +13,8 @@ public enum GeneralTag implements Tag {
MAX_ALLIES("{max-allies}", () -> getRelation("ally")), MAX_ALLIES("{max-allies}", () -> getRelation("ally")),
MAX_ENEMIES("{max-enemies}", () -> getRelation("enemy")), MAX_ENEMIES("{max-enemies}", () -> getRelation("enemy")),
MAX_TRUCES("{max-truces}", () -> getRelation("truce")), MAX_TRUCES("{max-truces}", () -> getRelation("truce")),
FACTIONLESS("{factionless}", () -> String.valueOf(Factions.getInstance().getNone().getFPlayersWhereOnline(true).size())), FACTIONLESS("factionless", () -> String.valueOf(FPlayers.getInstance().getOnlinePlayers().stream().filter(p -> !p.hasFaction()).count())),
FACTIONLESS_TOTAL("factionless-total", () -> String.valueOf(FPlayers.getInstance().getAllFPlayers().stream().filter(p -> !p.hasFaction()).count())),
TOTAL_ONLINE("{total-online}", () -> String.valueOf(Bukkit.getOnlinePlayers().size())), TOTAL_ONLINE("{total-online}", () -> String.valueOf(Bukkit.getOnlinePlayers().size())),
; ;

View File

@@ -28,6 +28,9 @@ public class CornerTask extends BukkitRunnable {
FLocation fLocation = surrounding.remove(0); FLocation fLocation = surrounding.remove(0);
if (fPlayer.attemptClaim(fPlayer.getFaction(), fLocation, true)) { if (fPlayer.attemptClaim(fPlayer.getFaction(), fLocation, true)) {
++amount; ++amount;
} else {
fPlayer.sendMessage(TL.COMMAND_CORNER_FAIL_WITH_FEEDBACK.toString().replace("&", "§") + amount);
cancel();
} }
} }
} }

View File

@@ -0,0 +1,29 @@
package com.massivecraft.factions.util;
import com.massivecraft.factions.FactionsPlugin;
import com.massivecraft.factions.struct.Permission;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.File;
import java.io.IOException;
public class PermissionList {
public static void generateFile() {
File file = new File(FactionsPlugin.getInstance().getDataFolder().toString() + "/" + "permissions.yml");
if (!file.exists()) {
try {
FactionsPlugin.getInstance().log("Generating a file with all permissions...");
file.createNewFile();
FileConfiguration config = YamlConfiguration.loadConfiguration(file);
for (Permission p : Permission.values()) {
config.set(p.node, p.name());
}
config.save(file);
FactionsPlugin.getInstance().log("Generation complete you can find this file at " + FactionsPlugin.getInstance().getDataFolder().toString() + "/" + "permissions.yml");
} catch (IOException e) {
e.printStackTrace();
}
}
}
}

View File

@@ -805,7 +805,7 @@ public abstract class MemoryFPlayer implements FPlayer {
int factionBuffer = FactionsPlugin.getInstance().getConfig().getInt("hcf.buffer-zone", 0); int factionBuffer = FactionsPlugin.getInstance().getConfig().getInt("hcf.buffer-zone", 0);
int worldBuffer = FactionsPlugin.getInstance().getConfig().getInt("world-border.buffer", 0); int worldBuffer = FactionsPlugin.getInstance().getConfig().getInt("world-border.buffer", 0);
if (Conf.worldGuardChecking && Worldguard.checkForRegionsInChunk(flocation)) { if (Conf.worldGuardChecking && Worldguard.checkForRegionsInChunk(flocation) && !this.isAdminBypassing()) {
// Checks for WorldGuard regions in the chunk attempting to be claimed // Checks for WorldGuard regions in the chunk attempting to be claimed
error = FactionsPlugin.getInstance().txt.parse(TL.CLAIM_PROTECTED.toString()); error = FactionsPlugin.getInstance().txt.parse(TL.CLAIM_PROTECTED.toString());
} else if (flocation.isOutsideWorldBorder(FactionsPlugin.getInstance().getConfig().getInt("world-border.buffer", 0))) { } else if (flocation.isOutsideWorldBorder(FactionsPlugin.getInstance().getConfig().getInt("world-border.buffer", 0))) {
@@ -1226,7 +1226,7 @@ public abstract class MemoryFPlayer implements FPlayer {
} }
LandClaimEvent claimEvent = new LandClaimEvent(flocation, forFaction, this); LandClaimEvent claimEvent = new LandClaimEvent(flocation, forFaction, this);
Bukkit.getScheduler().runTask(FactionsPlugin.getInstance(), () -> Bukkit.getPluginManager().callEvent(claimEvent)); Bukkit.getPluginManager().callEvent(claimEvent);
if (claimEvent.isCancelled()) { if (claimEvent.isCancelled()) {
return false; return false;
} }

View File

@@ -123,6 +123,7 @@ public enum TL {
COMMAND_CORNER_CANT_CLAIM("&c&l[!] &cYou may not claim this corner!"), COMMAND_CORNER_CANT_CLAIM("&c&l[!] &cYou may not claim this corner!"),
COMMAND_CORNER_CLAIMED("\n&2&l[!] &aYou have claimed the corner successfully, totalling in &b%1$d &achunks!\n"), COMMAND_CORNER_CLAIMED("\n&2&l[!] &aYou have claimed the corner successfully, totalling in &b%1$d &achunks!\n"),
COMMAND_CORNER_ATTEMPTING_CLAIM("&c&l[!] &7Attempting to claim corner..."), COMMAND_CORNER_ATTEMPTING_CLAIM("&c&l[!] &7Attempting to claim corner..."),
COMMAND_CORNER_FAIL_WITH_FEEDBACK("&c&l[!] &cOne or more claims in this corner could not be claimed! Total chunks claimed:&b "),
COMMAND_CORNER_NOT_CORNER("&c&l[!] &7You must be in a corner to use this command!"), COMMAND_CORNER_NOT_CORNER("&c&l[!] &7You must be in a corner to use this command!"),
COMMAND_CORNER_DESCRIPTION("claim a corner at world border"), COMMAND_CORNER_DESCRIPTION("claim a corner at world border"),
COMMAND_CORNERLIST_DESCRIPTION("list of all corners"), COMMAND_CORNERLIST_DESCRIPTION("list of all corners"),
@@ -881,7 +882,7 @@ public enum TL {
COMMAND_TNT_WIDTHDRAW_SUCCESS("&cSuccessfully withdrew tnt."), COMMAND_TNT_WIDTHDRAW_SUCCESS("&cSuccessfully withdrew tnt."),
COMMAND_TNT_WIDTHDRAW_NOTENOUGH("&cNot enough tnt in bank."), COMMAND_TNT_WIDTHDRAW_NOTENOUGH("&cNot enough tnt in bank."),
COMMAND_TNT_DEPOSIT_NOTENOUGH("&cNot enough tnt in tnt inventory."), COMMAND_TNT_DEPOSIT_NOTENOUGH("&cNot enough tnt in tnt inventory."),
COMMAND_TNT_AMOUNT("&cYour faction has {amount} tnt out of {bankSize} in the tnt bank."), COMMAND_TNT_AMOUNT("&cYour faction has %1$s tnt out of %2$s in the tnt bank."),
COMMAND_TNT_POSITIVE("&cPlease use positive numbers!"), COMMAND_TNT_POSITIVE("&cPlease use positive numbers!"),
COMMAND_TNT_DESCRIPTION("add/widthraw from faction's tnt bank"), COMMAND_TNT_DESCRIPTION("add/widthraw from faction's tnt bank"),
COMMAND_TNT_WIDTHDRAW_NOTENOUGH_SPACE("&cNot enough space in your inventory."), COMMAND_TNT_WIDTHDRAW_NOTENOUGH_SPACE("&cNot enough space in your inventory."),
@@ -967,7 +968,7 @@ public enum TL {
CLAIM_MEMBERS("Factions must have at least %s members to claim land."), CLAIM_MEMBERS("Factions must have at least %s members to claim land."),
CLAIM_SAFEZONE("You can not claim a Safe Zone."), CLAIM_SAFEZONE("You can not claim a Safe Zone."),
CLAIM_WARZONE("You can not claim a War Zone."), CLAIM_WARZONE("You can not claim a War Zone."),
CLAIM_POWER("You can't claim more land!You need more power!"), CLAIM_POWER("You can't claim more land! You need more power!"),
CLAIM_LIMIT("Limit reached. You can't claim more land!"), CLAIM_LIMIT("Limit reached. You can't claim more land!"),
CLAIM_ALLY("You can't claim the land of your allies."), CLAIM_ALLY("You can't claim the land of your allies."),
CLAIM_CONTIGIOUS("You can only claim additional land which is connected to your first claim or controlled by another faction!"), CLAIM_CONTIGIOUS("You can only claim additional land which is connected to your first claim or controlled by another faction!"),

View File

@@ -274,19 +274,19 @@ hcf:
show: show:
# First line can be {header} for default header, or any string (we recommend &m for smooth lines ;plugin) # First line can be {header} for default header, or any string (we recommend &m for smooth lines ;plugin)
- '&8&m--------------&7 &8<&e{faction}&8> &8&m--------------' - '&8&m--------------&7 &8<&e{faction}&8> &8&m--------------'
- '&6 * &cOwner: &7{leader}' - '&4&l* &cOwner: &f{leader}'
- '&6 * &cDescription: &7{description}' - '&4&l* &cDescription: &f{description}'
- '&6 * &cLand / Power / Max Power: &7{chunks} &8/ &7{power} &8/ &7{maxPower}' - '&4&l* &cLand / Power / Max Power: &f{chunks} &8/ &f{power} &8/ &f{maxPower}'
- '&6 * &cFaction Strikes: &7{strikes}' - '&4&l* &cFaction Strikes: &f{strikes}'
- '&6 * &cFaction Points: &7{faction-points}' - '&4&l* &cFaction Points: &f{faction-points}'
- '&6 * &cFounded: &7{create-date}' - '&4&l* &cFounded: &f{create-date}'
- '&6 * &cBalance: &f{faction-balance}' - '&4&l* &cBalance: &f{faction-balance}'
- '&6 * &cAllies: &5{allies-list}' - '&4&l* &cAllies: &a{allies-list}'
- '&6 * &cEnemies: &c{enemies-list}' - '&4&l* &cEnemies: &4{enemies-list}'
- '&6 * &cOnline Members: &8(&7{online}/{members}&8) &7{online-list}' - '&4&l* &cOnline Members: &8[&f{online}/{members}&8] &a{online-list}'
- '&6 * &cOffline Members: &8(&7{offline}/{members}&8) &7{offline-list}' - '&4&l* &cOffline Members: &8[&f{offline}/{members}&8] &a{offline-list}'
- '&6 * &cAlts: &8{alts}' - '&4&l* &cAlts: &f{alts}'
- '&6 * &cBans: &7{faction-bancount}' - '&4&l* &cBans: &f{faction-bancount}'
- '&8&m----------------------------------------' - '&8&m----------------------------------------'
# For a /f show that does not display fancy messages that are essentially empty, use minimal-show # For a /f show that does not display fancy messages that are essentially empty, use minimal-show
minimal-show: false minimal-show: false
@@ -303,13 +303,15 @@ show-exempt:
# Lines that arent defined wont be sent (home not set, faction not peaceful / permanent, dtr freeze) # Lines that arent defined wont be sent (home not set, faction not peaceful / permanent, dtr freeze)
map: map:
# First line can be {header} for default header, or any string (we recommend &m for smooth lines ;plugin) # First line can be {header} for default header, or any string (we recommend &m for smooth lines ;plugin)
- '&6* &cFaction: &7{faction}' - ''
- '&6* &cOwner: &7{leader}' - '&4&l* &cFaction &f{faction}'
- '&6* &cLand / Power / Max Power: &7{chunks} &8/ &7{power} &8/ &7{maxPower}' - '&4&l* &cOwner &f{leader}'
- '&6* &cAllies: &5{allies-list}' - '&4&l* &cLand / Power / Max Power: &f{chunks} &8/ &f{power} &8/ &f{maxPower}'
- '&6* &cEnemies: &c{enemies-list}' - '&4&l* &cAllies &a{allies-list}'
- '&6* &cOnline Members: &8(&7{online}/{members}&8) {online-list}' - '&4&l* &cEnemies &4{enemies-list}'
- '&6* &cOffline Members: &7{offline-list}' - '&4&l* &cOnline Members &8[&f{online}/{members}&8] &a{online-list}'
- '&4&l* &cOffline Members &4{offline-list}'
- ''
############################################################ ############################################################
# +------------------------------------------------------+ # # +------------------------------------------------------+ #
@@ -426,7 +428,7 @@ help:
fperm-gui: fperm-gui:
relation: relation:
# GUI Name # GUI Name
name: 'Faction Permissions' name: '&8&lFaction Permissions'
# Amount of inventory rows, No larger than 5 # Amount of inventory rows, No larger than 5
rows: 4 rows: 4
# These are the slots where the relations are going to be placed on the first GUI # These are the slots where the relations are going to be placed on the first GUI
@@ -452,7 +454,7 @@ fperm-gui:
enemy: DIAMOND_AXE enemy: DIAMOND_AXE
neutral: WOOD_AXE neutral: WOOD_AXE
Placeholder-Item: Placeholder-Item:
Name: '&cClick to edit {relation} permissions!' Name: '&c{relation}&f permissions!'
action: action:
name: 'Faction Permissions' name: 'Faction Permissions'
rows: 6 rows: 6
@@ -527,14 +529,14 @@ fperm-gui:
# {action-access} Access name eg: Allow, Deny # {action-access} Access name eg: Allow, Deny
# {action-access-color} Access color eg: Allow;GREEN # {action-access-color} Access color eg: Allow;GREEN
placeholder-item: placeholder-item:
name: '&c&l(!) &ePermission: &6&n{action}' name: '&c&lPermission to {action}'
lore: lore:
- '' - ''
- '&6&l * &cStatus: &8[{action-access-color}{action-access}&8]' - '&4&l* &cStatus: &f{action-access-color}{action-access}'
- '' - ''
- '&7Left click to &a&nAllow&7.' - '&2&l* &aLeft click to &alAllow&a.'
- '&7Right click to &c&nDeny&7.' - '&4&l* &cRight click to &c&lDeny&c.'
- '&7Middle click to &7&nUndefined&7.' - '&8&l* &7Middle click to &7&lUndefine&7.'
# Back item will be take you to the previous GUI # Back item will be take you to the previous GUI
back-item: back-item:
Type: ARROW Type: ARROW
@@ -566,16 +568,16 @@ fwarp-gui:
- 15 - 15
warp-item: warp-item:
Type: EYE_OF_ENDER Type: EYE_OF_ENDER
Name: '&c&l(!) &eFaction Warp: &6&n{warp}' Name: '&c&lFaction Warp {warp}'
# {warp-protected} Warp protection by password, Enabled & Disabled # {warp-protected} Warp protection by password, Enabled & Disabled
# {warp-cost} Warp cost # {warp-cost} Warp cost
Lore: Lore:
- '' - ''
- '&6&l * &cPassword: &7{warp-protected}' - '&4&l* &cPassword: &f{warp-protected}'
- '&6&l * &cCost: &7{warp-cost}' - '&4&l* &cCost: &f{warp-cost}'
- '' - ''
- '&c&lNote: &7You need pay to teleport to' - '&7&o(( Tip: You need &c&opay&7&o to &f&oteleport to'
- '&7a faction warp. Unless it''s &nDisabled&7.' - '&7&oa &a&ofaction warp&7&o. Unless it''s &c&oDisabled&7&o. ))'
# Dummy Items # Dummy Items
dummy-item: dummy-item:
Type: BLACK_STAINED_GLASS_PANE Type: BLACK_STAINED_GLASS_PANE
@@ -638,8 +640,13 @@ f-alts:
frules: frules:
Enabled: true Enabled: true
default-rules: default-rules:
- '&cDefault Faction Rules :(' - '&f'
- '&cUse /f rules add <rule> to add a rule' - '&r &r &r &r &r &r &r &r &r &r &r &r &r &r &r &r &r &r &r &r &r &r &f&l«&c&l*&4&l*&c&l*&f&l»&r &c&lFaction Rules &r &f&l«&c&l*&4&l*&c&l*&f&l»'
- '&r &r &r &fWith this feature you can set &cstandars&f for your &afaction'
- '&r &r &r &r &r &r &fPut as many &crules&f as you desire for your &amembers'
- '&f'
- '&r &r &r &r &r &r &r &r &r &r &r &7&o(( Tip: Use &f&o/f rules add <rule>&7&o add a &c&orule&7&o ))'
- ''
############################################################ ############################################################
# +------------------------------------------------------+ # # +------------------------------------------------------+ #
# | Faction TNT Bank | # # | Faction TNT Bank | #
@@ -742,13 +749,16 @@ f-points:
############################################################ ############################################################
MissionGUISize: 3 MissionGUISize: 3
Missions-Enabled: true Missions-Enabled: true
Missions-GUI-Title: '&bFaction Missions' Missions-GUI-Title: '&8&lFaction Missions'
MaximumMissionsAllowedAtOnce: 1 MaximumMissionsAllowedAtOnce: 1
Mission-Progress-Format: '&b&lProgression: &f{progress}&7/&e{total}' Mission-Progress-Format: '&b&lProgression: &f{progress}&7/&e{total}'
DenyMissionsMoreThenOnce: true #this setting to true, means that if they complete a mission they cannot redo the same mission DenyMissionsMoreThenOnce: true #this setting to true, means that if they complete a mission they cannot redo the same mission
#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"
@@ -870,7 +880,7 @@ fchest:
fupgrades: fupgrades:
Enabled: true Enabled: true
MainMenu: MainMenu:
Title: '{faction}''s Upgrade Menu' Title: '&8&l{faction}''s Upgrade Menu'
DummyItem: DummyItem:
rows: 5 rows: 5
Name: '&f' Name: '&f'
@@ -887,26 +897,26 @@ fupgrades:
level-2: 500000 level-2: 500000
level-3: 750000 level-3: 750000
CropItem: CropItem:
Name: '&c&lUpgrade Growth Speed' Name: '&c&lGrowth Speed'
Type: WHEAT Type: WHEAT
Amount: 1 Amount: 1
Damage: 0 Damage: 0
Lore: Lore:
- '&7Increase growth speed of crops in claims.' - '&7&oIncrease growth &c&ospeed&7&o of crops in &c&oclaims.'
- '&7&o(Chance to Grow Two Levels)' - '&7&oChance to Grow Two Levels.'
- 'Current level is &e&l&o{level}'
- '' - ''
- '&c&lTier' - '&c&lChances'
- '&f&l* &7Current Level: &3{level}/3' - '&4&l* &cLevel 1: &f10% Chance'
- '&4&l* &cLevel 2: &f20% Chance'
- '&4&l* &cLevel 3: &f30% Chance'
- '&f'
- '&c&lCosts'
- '&4&l* &cLevel 1: &f$250,000'
- '&4&l* &cLevel 2: &f$500,000'
- '&4&l* &cLevel 3: &f$750,000'
- '' - ''
- '&c&lPerks' - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))'
- '&f&l* &7Level 1 - &f10% Chance'
- '&7 - Cost: $250,000'
- '&f&l* &7Level 2 - &f20% Chance'
- '&7 - Cost: $500,000'
- '&f&l* &7Level 3 - &f30% Chance'
- '&7 - Cost: $750,000'
- ''
- '&e&lClick to &nUnlock'
slots: slots:
- 31 - 31
EXP: EXP:
@@ -919,25 +929,25 @@ fupgrades:
level-2: 4000000 level-2: 4000000
level-3: 6000000 level-3: 6000000
EXPItem: EXPItem:
Name: '&c&lUpgrade EXP Drop Rate' Name: '&c&lEXP Drop Rate'
Type: EXP_BOTTLE Type: EXP_BOTTLE
Amount: 1 Amount: 1
Damage: 0 Damage: 0
Lore: Lore:
- '&7Increased Vanilla XP gained from monsters.' - '&7&oIncreased Vanilla &e&oEXP&7&o gained from &c&omonsters&7&o.'
- '&7&oYour current level is &e&l&o{level}'
- '' - ''
- '&c&lTier' - '&c&lMultipliers'
- '&f&l* &7Current Level: &3{level}/3' - '&4&l* &cLevel 1: &f1.5'
- '&4&l* &cLevel 2: &f2.0'
- '&4&l* &cLevel 3: &f2.5'
- '&f'
- '&c&lCosts'
- '&4&l* &cLevel 1: &f$2,000,000'
- '&4&l* &cLevel 2: &f$4,000,000'
- '&4&l* &cLevel 3: &f$6,000,000'
- '' - ''
- '&c&lPerks' - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))'
- '&f&l* &7Level 1 - &f1.5x Multiplier'
- '&7 - Cost: $2,000,000'
- '&f&l* &7Level 2 - &f2.0x Multiplier'
- '&7 - Cost: $4,000,000'
- '&f&l* &7Level 3 - &f2.5x Multiplier'
- '&7 - Cost: $6,000,000'
- ''
- '&e&lClick to &nUnlock'
slots: slots:
- 32 - 32
Power: Power:
@@ -955,21 +965,21 @@ fupgrades:
Amount: 1 Amount: 1
Damage: 0 Damage: 0
Lore: Lore:
- '&7&o(Increase the amount of power' - '&a&oIncrease&7&o the amount of &c&opower'
- '&7&oyour faction has)' - '&7&oyour &a&ofaction has&7&o.'
- 'Current level is &e&l&o{level}'
- '' - ''
- '&c&lTier' - '&c&lIncreased Faction Power'
- '&f&l* &7Current Level: &3{level}/3' - '&4&l* &cLevel 1: &f100'
- '&4&l* &cLevel 2: &f200'
- '&4&l* &cLevel 3: &f300'
- '&f'
- '&c&lCosts'
- '&4&l* &cLevel 1: &f$1,000,000'
- '&4&l* &cLevel 2: &f$2,000,000'
- '&4&l* &cLevel 3: &f$3,000,000'
- '' - ''
- '&c&lPerks' - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))'
- '&f&l* &7Level 1 - &f100 Increased Faction Power'
- '&7 - Cost: $1,000,000'
- '&f&l* &7Level 2 - &f200 Increased Faction Power'
- '&7 - Cost: $2,000,000'
- '&f&l* &7Level 3 - &f300 Increased Faction Power'
- '&7 - Cost: $3,000,000'
- ''
- '&e&lClick to &nUnlock'
slots: slots:
- 22 - 22
Redstone: Redstone:
@@ -980,13 +990,12 @@ fupgrades:
Amount: 1 Amount: 1
Damage: 0 Damage: 0
Lore: Lore:
- '&7&o(Prevents water from being' - '&7&oPrevents &e&owater&7&o from being'
- '&7&oable to break redstone)' - '&7&oable to break &c&oredstone'
- '' - ''
- '&f&l* &7Current Level: &3{level}/1' - '&4&l* &cCost: &f$1,000,000'
- '' - ''
- '&7 - Cost: $1,000,000' - '&7&o(( Tip: &f&oLeft-click&7&o to &c&oupgrade&7&o ))'
- '&e&lClick to &nUnlock'
slots: slots:
- 23 - 23
Spawners: Spawners:
@@ -1000,25 +1009,25 @@ fupgrades:
level-2: 2000000 level-2: 2000000
level-3: 3000000 level-3: 3000000
SpawnerItem: SpawnerItem:
Name: '&c&lUpgrade Spawn Rate' Name: '&c&lSpawn Rate'
Type: MOB_SPAWNER Type: MOB_SPAWNER
Amount: 1 Amount: 1
Damage: 0 Damage: 0
Lore: Lore:
- '&7Decreased mob spawner delay in claims.' - '&c&oDecreased&7&o mob spawner delay in &a&oclaims&7&o.'
- '&7&oYour current level is &e&l&o{level}'
- '' - ''
- '&c&lTier' - '&c&lDecreased Spawner Delay'
- '&f&l* &7Current Level: &3{level}/3' - '&4&l* &cLevel 1: &f0.10%'
- '&4&l* &cLevel 2: &f0.20%'
- '&4&l* &cLevel 3: &f0.30'
- '&f'
- '&c&lCosts'
- '&4&l* &cLevel 1: &f$1,000,000'
- '&4&l* &cLevel 2: &f$2,000,000'
- '&4&l* &cLevel 3: &f$3,000,000'
- '' - ''
- '&c&lPerks' - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))'
- '&f&l* &7Level 1 - &f10% Lower Delay'
- '&7 - Cost: $1,000,000'
- '&f&l* &7Level 2 - &f20% Lower Delay'
- '&7 - Cost: $2,000,000'
- '&f&l* &7Level 3 - &f30% Lower Delay'
- '&7 - Cost: $3,000,000'
- ''
- '&e&lClick to &nUnlock'
slots: slots:
- 30 - 30
DamageReduct: DamageReduct:
@@ -1031,26 +1040,25 @@ fupgrades:
level-2: 4000000 level-2: 4000000
level-3: 6000000 level-3: 6000000
ReduceItem: ReduceItem:
Name: '&c&lDamage Reduction Upgrade' Name: '&c&lDamage Reduction'
Type: GOLD_CHESTPLATE Type: GOLD_CHESTPLATE
Amount: 1 Amount: 1
Damage: 0 Damage: 0
Lore: Lore:
- '&7Reduce the amount of damage taken' - '&a&oReduce&7&o the amount of &a&odamage taken&7&o in faction claims.'
- '&7in your faction claims.' - '&7&oYour current level is &e&l&o{level}'
- '' - ''
- '&c&lTier' - '&c&lDamage Increase'
- '&f&l* &7Current Level: &3{level}/3' - '&4&l* &cLevel 1: &f3%'
- '&4&l* &cLevel 2: &f5%'
- '&4&l* &cLevel 3: &f7%'
- '&f'
- '&c&lCosts'
- '&4&l* &cLevel 1: &f$2,000,000'
- '&4&l* &cLevel 2: &f$4,000,000'
- '&4&l* &cLevel 3: &f$6,000,000'
- '' - ''
- '&c&lPerks' - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))'
- '&f&l* &7Level 1 - &7((&f-3% Damage Per Hit&7))'
- '&7 - Cost: $2,000,000'
- '&f&l* &7Level 2 - &7((&f-5% Damage Per Hit&7))'
- '&7 - Cost: $4,000,000'
- '&f&l* &7Level 3 - &7((&f-7% Damage Per Hit&7))'
- '&7 - Cost: $6,000,000'
- ''
- '&e&lClick to &nUnlock'
slots: slots:
- 7 - 7
DamageIncrease: DamageIncrease:
@@ -1063,26 +1071,25 @@ fupgrades:
level-2: 4000000 level-2: 4000000
level-3: 6000000 level-3: 6000000
IncreaseItem: IncreaseItem:
Name: '&c&lDamage Increase Upgrade' Name: '&c&lDamage Increase'
Type: DIAMOND_SWORD Type: DIAMOND_SWORD
Amount: 1 Amount: 1
Damage: 0 Damage: 0
Lore: Lore:
- '&7Increase the amount of damage given' - '&a&oIncrease&7&o the amount of &a&odamage given&7&o.'
- '&7in your faction claims.' - '&7&oYour current level is &e&l&o{level}'
- '' - ''
- '&c&lTier' - '&c&lDamage Increase'
- '&f&l* &7Current Level: &3{level}/3' - '&4&l* &cLevel 1: &f3%'
- '&4&l* &cLevel 2: &f5%'
- '&4&l* &cLevel 3: &f7%'
- '&f'
- '&c&lCosts'
- '&4&l* &cLevel 1: &f$2,000,000'
- '&4&l* &cLevel 2: &f$4,000,000'
- '&4&l* &cLevel 3: &f$6,000,000'
- '' - ''
- '&c&lPerks' - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))'
- '&f&l* &7Level 1 - &7((&f+3% Damage Per Hit&7))'
- '&7 - Cost: $2,000,000'
- '&f&l* &7Level 2 - &7((&f+5% Damage Per Hit&7))'
- '&7 - Cost: $4,000,000'
- '&f&l* &7Level 3 - &7((&f+7% Damage Per Hit&7))'
- '&7 - Cost: $6,000,000'
- ''
- '&e&lClick to &nUnlock'
slots: slots:
- 1 - 1
TNT: TNT:
@@ -1095,26 +1102,25 @@ fupgrades:
level-2: 4000000 level-2: 4000000
level-3: 6000000 level-3: 6000000
TntItem: TntItem:
Name: '&c&lTNT Bank Upgrade' Name: '&c&lTNT Bank'
Type: TNT Type: TNT
Amount: 1 Amount: 1
Damage: 0 Damage: 0
Lore: Lore:
- '&7Upgrade Your tnt bank limit,' - '&a&oUpgrade&7&o your &a&ofactions tnt&7&o limit.'
- '&7to be eligible to store more tnt.' - '&7&oYour current level is &e&l&o{level}'
- '' - ''
- '&c&lTier' - '&c&lFaction Tnt Limit'
- '&f&l* &7Current Level: &3{level}/3' - '&4&l* &cLevel 1: &f500,000'
- '&4&l* &cLevel 2: &f1,000,000'
- '&4&l* &cLevel 3: &f2,000,000'
- '&f'
- '&c&lCosts'
- '&4&l* &cLevel 1: &f$1,000,000'
- '&4&l* &cLevel 2: &f$2,000,000'
- '&4&l* &cLevel 3: &f$3,000,000'
- '' - ''
- '&c&lPerks' - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))'
- '&f&l* &7Level 1 - &f500,000 TNT'
- '&7 - Cost: $2,000,000'
- '&f&l* &7Level 2 - &f1,000,000 TNT'
- '&7 - Cost: $4,000,000'
- '&f&l* &7Level 3 - &f2,000,000 TNT'
- '&7 - Cost: $6,000,000'
- ''
- '&e&lClick to &nUnlock'
slots: slots:
- 21 - 21
Warps: Warps:
@@ -1127,26 +1133,25 @@ fupgrades:
level-2: 2000000 level-2: 2000000
level-3: 3000000 level-3: 3000000
WarpItem: WarpItem:
Name: '&c&lWarp Upgrade' Name: '&c&lWarps'
Type: EYE_OF_ENDER Type: EYE_OF_ENDER
Amount: 1 Amount: 1
Damage: 0 Damage: 0
Lore: Lore:
- '&7Upgrade Your warp limit,' - '&a&oIncrease&7&o the &a&ofaction warp&7&o limit.'
- '&7to be able to set more warps.' - '&7&oYour current level is &e&l&o{level}'
- '' - ''
- '&c&lTier' - '&c&lFaction Warp Limit'
- '&f&l* &7Current Level: &3{level}/3' - '&4&l* &cLevel 1: &f3'
- '&4&l* &cLevel 2: &f4'
- '&4&l* &cLevel 3: &f5'
- '&f'
- '&c&lCosts'
- '&4&l* &cLevel 1: &f$1,000,000'
- '&4&l* &cLevel 2: &f$2,000,000'
- '&4&l* &cLevel 3: &f$3,000,000'
- '' - ''
- '&c&lPerks' - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))'
- '&f&l* &7Level 1 - &f3 Warps'
- '&7 - Cost: $1,000,000'
- '&f&l* &7Level 2 - &f4 Warps'
- '&7 - Cost: $2,000,000'
- '&f&l* &7Level 3 - &f5 Warps'
- '&7 - Cost: $3,000,000'
- ''
- '&e&lClick to &nUnlock'
slots: slots:
- 24 - 24
Chest: Chest:
@@ -1160,25 +1165,25 @@ fupgrades:
level-2: 2000000 level-2: 2000000
level-3: 3000000 level-3: 3000000
ChestItem: ChestItem:
Name: '&c&lUpgrade Faction Chest Size' Name: '&c&lFaction Chest'
Type: CHEST Type: CHEST
Amount: 1 Amount: 1
Damage: 0 Damage: 0
Lore: Lore:
- '&7Increased Faction Chest Size.' - '&a&oIncreased&7&o Faction Chest Size.'
- '&7&oYour current level is &e&l&o{level}'
- '' - ''
- '&c&lTier' - '&c&lFaction Chest Size'
- '&f&l* &7Current Level: &3{level}/3' - '&4&l* &cLevel 1: &f2 Rows'
- '&4&l* &cLevel 2: &f3 Rows'
- '&4&l* &cLevel 3: &f4 Rows'
- '&f'
- '&c&lCosts'
- '&4&l* &cLevel 1: &f$1,000,000'
- '&4&l* &cLevel 2: &f$2,000,000'
- '&4&l* &cLevel 3: &f$3,000,000'
- '' - ''
- '&c&lPerks' - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))'
- '&f&l* &7Level 1 - &f2 Rows'
- '&7 - Cost: $1,000,000'
- '&f&l* &7Level 2 - &f3 Rows'
- '&7 - Cost: $2,000,000'
- '&f&l* &7Level 3 - &f4 Rows'
- '&7 - Cost: $3,000,000'
- ''
- '&e&lClick to &nUnlock'
slots: slots:
- 20 - 20
Members: Members:
@@ -1191,25 +1196,25 @@ fupgrades:
level-2: 2000000 level-2: 2000000
level-3: 3000000 level-3: 3000000
MembersItem: MembersItem:
Name: '&c&lUpgrade Faction Members' Name: '&c&lFaction Members'
Type: PAPER Type: PAPER
Amount: 1 Amount: 1
Damage: 0 Damage: 0
Lore: Lore:
- '&7Increase faction member limit.' - '&a&oIncrease&7&o the &a&ofaction member&7&o limit.'
- '&7&oYour current level is &e&l&o{level}'
- '' - ''
- '&c&lTier' - '&c&lFaction Member Limit'
- '&f&l* &7Current Level: &3{level}/3' - '&4&l* &cLevel 1: &f30'
- '&4&l* &cLevel 2: &f35'
- '&4&l* &cLevel 3: &f40'
- '&f'
- '&c&lCosts'
- '&4&l* &cLevel 1: &f$1,000,000'
- '&4&l* &cLevel 2: &f$2,000,000'
- '&4&l* &cLevel 3: &f$3,000,000'
- '' - ''
- '&c&lPerks' - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))'
- '&f&l* &7Level 1 - &f30 Members'
- '&7 - Cost: $1,000,000'
- '&f&l* &7Level 2 - &f35 Members'
- '&7 - Cost: $2,000,000'
- '&f&l* &7Level 3 - &f40 Members'
- '&7 - Cost: $3,000,000'
- ''
- '&e&lClick to &nUnlock'
slots: slots:
- 40 - 40
Armor: Armor:
@@ -1223,25 +1228,25 @@ fupgrades:
level-2: 2000000 level-2: 2000000
level-3: 3000000 level-3: 3000000
ArmorItem: ArmorItem:
Name: '&c&lReinforced Armor Upgrade' Name: '&c&lReinforced Armor'
Type: DIAMOND_CHESTPLATE Type: DIAMOND_CHESTPLATE
Amount: 1 Amount: 1
Damage: 0 Damage: 0
Lore: Lore:
- '&7Decreases damage to armor.' - '&a&oDecreases&7&o damage done &a&oto armor&7&o.'
- '&7&oYour current level is &e&l&o{level}'
- '' - ''
- '&c&lTier' - '&c&lReinforced Armor'
- '&f&l* &7Current Level: &3{level}/3' - '&4&l* &cLevel 1: &f0.10%'
- '&4&l* &cLevel 2: &f0.15%'
- '&4&l* &cLevel 3: &f0.20%'
- '&f'
- '&c&lCosts'
- '&4&l* &cLevel 1: &f$1,000,000'
- '&4&l* &cLevel 2: &f$2,000,000'
- '&4&l* &cLevel 3: &f$3,000,000'
- '' - ''
- '&c&lPerks' - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))'
- '&f&l* &7Level 1 - &f10% Reduction'
- '&7 - Cost: $1,000,000'
- '&f&l* &7Level 2 - &f15% Reduction'
- '&7 - Cost: $2,000,000'
- '&f&l* &7Level 3 - &f20% Reduction'
- '&7 - Cost: $3,000,000'
- ''
- '&e&lClick to &nUnlock'
slots: slots:
- 4 - 4
@@ -1322,6 +1327,7 @@ Tntfill:
# - {offline-list} : Lists all offline members with tooltips # - {offline-list} : Lists all offline members with tooltips
# - {alts} : List all alts online or offline # - {alts} : List all alts online or offline
# - {truces-list} : Lists each faction truce with tooltips # - {truces-list} : Lists each faction truce with tooltips
# - {factionless-total} : Count of all factionless players online
# Player variables. Can be used in tooltips.show, scoreboards, or /f show # Player variables. Can be used in tooltips.show, scoreboards, or /f show
# - {group} : Players group # - {group} : Players group

View File

@@ -65,6 +65,13 @@ permissions:
factions.kit.halfplayer: factions.kit.halfplayer:
description: Can do all but create factions. description: Can do all but create factions.
children: children:
factions.missions: true
factions.shop: true
factions.permissions: true
factions.setdiscord: true
factions.discord: true
factions.paypal: true
factions.paypalset: true
factions.admin: true factions.admin: true
factions.autoclaim: true factions.autoclaim: true
factions.promote: true factions.promote: true
@@ -113,6 +120,7 @@ permissions:
factions.checkpoint: true factions.checkpoint: true
factions.rules: true factions.rules: true
factions.setwarp: true factions.setwarp: true
factions.warp: true
factions.banner: true factions.banner: true
factions.vault: true factions.vault: true
factions.getvault: true factions.getvault: true