From 6727a322c64eb5617c5c9ab576a3d6691a82aca1 Mon Sep 17 00:00:00 2001 From: rlf Date: Thu, 11 Dec 2014 23:52:49 +0100 Subject: [PATCH] Rolled back to hardcoded WG --- .../ultimateskyblock/WorldGuardHandler.java | 6 +- src/main/resources/config.yml | 82 +++++++++++-------- 2 files changed, 52 insertions(+), 36 deletions(-) diff --git a/src/main/java/us/talabrek/ultimateskyblock/WorldGuardHandler.java b/src/main/java/us/talabrek/ultimateskyblock/WorldGuardHandler.java index 2127ca2e3..fa7ce2773 100644 --- a/src/main/java/us/talabrek/ultimateskyblock/WorldGuardHandler.java +++ b/src/main/java/us/talabrek/ultimateskyblock/WorldGuardHandler.java @@ -44,7 +44,11 @@ public static boolean protectIsland(final Player sender, final String player, fi region.setPriority(100); region.setFlag(DefaultFlag.GREET_MESSAGE, DefaultFlag.GREET_MESSAGE.parseInput(worldGuard, sender, "\u00a7d** You are entering a protected island area. (" + player + ")")); region.setFlag(DefaultFlag.FAREWELL_MESSAGE, DefaultFlag.FAREWELL_MESSAGE.parseInput(worldGuard, sender, "\u00a7d** You are leaving a protected island area. (" + player + ")")); - region.setFlag(DefaultFlag.PVP, StateFlag.State.DENY); + if (uSkyBlock.getInstance().getConfig().getBoolean("options.island.allowPvP")) { + region.setFlag(DefaultFlag.PVP, StateFlag.State.ALLOW); + } else { + region.setFlag(DefaultFlag.PVP, StateFlag.State.DENY); + } region.setFlag(DefaultFlag.DESTROY_VEHICLE, StateFlag.State.DENY); region.setFlag(DefaultFlag.ENTITY_ITEM_FRAME_DESTROY, StateFlag.State.DENY); region.setFlag(DefaultFlag.ENTITY_PAINTING_DESTROY, StateFlag.State.DENY); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 01848fc5a..7d348d928 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1,67 +1,78 @@ version: '2.0.1 Do not change!' options: general: - #[integer] The max number of players allowed in a single party. (including the leader) + # [integer] The max number of players allowed in a single party. (including the leader) maxPartySize: 4 - #[string] The name of the skyblock world, will be automatically generated if it doesn't exist. + + # [string] The name of the skyblock world, will be automatically generated if it doesn't exist. worldName: skyworld - #[integer] Not sure what this affects plugin wise. + + # [integer] Not sure what this affects plugin wise. spawnSize: 150 - #[integer] The time in seconds before a player can use the /island info command again. (note: cooldowns are reset when the plugin is reloaded) + + # [integer] The time in seconds before a player can use the /island info command again. (note: cooldowns are reset when the plugin is reloaded) cooldownInfo: 30 - #[integer] The time in seconds before a player can use the /island restart command again. + + # [integer] The time in seconds before a player can use the /island restart command again. cooldownRestart: 600 - #[integer] The time in seconds before a player can use the /island biome command again. + + # [integer] The time in seconds before a player can use the /island biome command again. biomeChange: 3600 island: - #[filename] The schematic to use for island generation. - #Put your schematic in the 'uSkyBlock/schematics' folder, you don't need to add the '.schematic' part below. + # [filename] The schematic to use for island generation. + # Put your schematic in the 'uSkyBlock/schematics' folder, you don't need to add the '.schematic' part below. schematicName: yourschematicname - #[integer] The number of blocks between islands. + + # [integer] The number of blocks between islands. distance: 110 - #[true/false] If true, remove all hostile mobs when a player teleports back to their island. + + # [true/false] If true, remove all hostile mobs when a player teleports back to their island. removeCreaturesByTeleport: false - #[integer] The y-coordinate (height) where islands are spawned. + + # [integer] The y-coordinate (height) where islands are spawned. height: 150 - #[item list] The list of items to place in the chest when a player starts a new island. ITEM_ID:HOW_MANY. - #default is 2 ice, 1 watermelon, 1 cactus, 1 lava bucket, 1 red & brown mushroom, 1 pumpkin seed, 1 sugar cane, 1 sign. + + # [item list] The list of items to place in the chest when a player starts a new island. ITEM_ID:HOW_MANY. + # default is 2 ice, 1 watermelon, 1 cactus, 1 lava bucket, 1 red & brown mushroom, 1 pumpkin seed, 1 sugar cane, 1 sign. chestItems: 79:2 360:1 81:1 327:1 40:1 39:1 361:1 338:1 323:1 - #[true/false] If true, add extra items to a chest when a player starts a new island. (for donors and special players) + + # [true/false] If true, add extra items to a chest when a player starts a new island. (for donors and special players) addExtraItems: true - #[permission] The name of the permissions to check if extra items are added to the chest, you can change these or add more - #Only checked if 'addExtraItems' is set to true. + + # [permission] The name of the permissions to check if extra items are added to the chest, you can change these or add more + # Only checked if 'addExtraItems' is set to true. + # [permission:item list] The list of extra items to add to the chest, will only be added if the player has the permission. ITEM_ID:HOW_MANY + # When granting the permission, prefix it with "usb." so the full permission to add would be usb.smallbonus extraPermissions: - #[permission:item list] The list of extra items to add to the chest, will only be added if the player has the permission. ITEM_ID:HOW_MANY - #When granting the permission, prefix it with "usb." so the full permission to add would be usb.smallbonus smallbonus: 4:16 320:5 mediumbonus: 50:16 327:1 largebonus: 3:5 12:5 giantbonus: 2:1 110:1 extremebonus: 352:8 263:4 donorbonus: 261:1 262:32 272:1 - worldGuardFlags: - ALL: - #[allow/deny] If allow, pvp will be enabled on every island. - pvp: 'deny' - #[allow/deny] If allow, players can destroy vehicles on any island. - destroy-vehicle: 'deny' - #[allow/deny] If allow, players can destroy item frames on any island. - entity-item-frame-destroy: 'deny' - #[allow/deny] If allow, players can destroy paintings on any island. - entity-painting-destroy: 'deny' - #[integer] The size of the protective region for each island. Can't be higher than 'distance' - #(only used if 'protectWithWorldGuard' is set to true. + + # [integer] The size of the protective region for each island. Can't be higher than 'distance' + # (only used if 'protectWithWorldGuard' is set to true. protectionRange: 105 + + # Allow PvP on the island + allowPvP: deny + #[true/false] Allow players to completely lock their islands so non-party members can't enter. (locking still requires permission usb.lock) allowIslandLock: true + #[true/false] Use old SkySMP style island generation. Set this to true if you want to use the old # island style, or set to false if you want to use the new sytle island generation. Only affects new islands. useOldIslands: false + #[true/false] If true, use island levels/ranks (/island info) - may have a slight impact on performance #Set to false if you have performance issues useIslandLevel: true + #[true/false] If true, a top 10 islands list will be generated when the plugin is loaded. useTopTen: true + + # Extra menus shown in the main-menu - here we have some donor-menus using chestcommands extra-menus: 7: title: '§a§lBuy Perks' @@ -85,11 +96,12 @@ options: - '§7fonly available to donors!' - '[group.donor]§e§lClick here to open the shop!' - '[!group.donor]§a§7Click here to become a donor!' + extras: - #[true/false] If true, return players that don't have an island (this includes players removed from a party while offline), to the server spawn when they login. - #NOTE: Requires EssentialsSpawn or another plugin with the "/spawn" command + # [true/false] If true, return players that don't have an island (this includes players removed from a party while offline), to the server spawn when they login. + # NOTE: Requires EssentialsSpawn or another plugin with the "/spawn" command sendToSpawn: true - #[true/false] If true, a player can right-click on a block of obsidian on their island while holding an empty bucket to remove the obsidian and fill the bucket with lava. This is useful for people that accidently - #turn their lava into obsidian with a bad cobblestone generator design. Will only work on the player's island and if there are no other obsidian blocks nearby (so can't be used on portals). + + # [true/false] If true, a player can right-click on a block of obsidian on their island while holding an empty bucket to remove the obsidian and fill the bucket with lava. This is useful for people that accidently + # turn their lava into obsidian with a bad cobblestone generator design. Will only work on the player's island and if there are no other obsidian blocks nearby (so can't be used on portals). obsidianToLava: true - challenges: 'moved to challenges.yml'