mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-11-24 19:45:14 +01:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
commit
303d9a95dc
@ -11,3 +11,9 @@ permissions:
|
||||
bskyblock.admin.challenges:
|
||||
description: Access challenge admin commands
|
||||
default: op
|
||||
acidisland.challenges:
|
||||
description: Let the player use the /challenges command
|
||||
default: true
|
||||
acidisland.admin.challenges:
|
||||
description: Access challenge admin commands
|
||||
default: op
|
||||
|
100
challenges.yml
100
challenges.yml
@ -188,18 +188,18 @@ challenges:
|
||||
dyemaker:
|
||||
friendlyname: 'Dye Maker'
|
||||
description: 'Craft 32 cactus green dyes'
|
||||
icon: INK_SACK:2
|
||||
icon: CACTUS_GREEN
|
||||
level: 'Novice'
|
||||
type: inventory
|
||||
requiredItems: 'INK_SACK:2:32'
|
||||
requiredItems: 'CACTUS_GREEN:32'
|
||||
takeItems: true
|
||||
itemReward: 'SAPLING:0:2 SAPLING:1:2 SAPLING:2:2 SAPLING:3:2'
|
||||
itemReward: 'OAK_SAPLING:2 BIRCH_SAPLING:2 JUNGLE_SAPLING:2 SPRUCE_SAPLING:2'
|
||||
rewardText: '2 oak, 2 birch, 2 jungle and 2 spruce saplings'
|
||||
moneyReward: 10
|
||||
expReward: 30
|
||||
permissionReward: ''
|
||||
repeatable: true
|
||||
repeatItemReward: 'SAPLING:0:1 SAPLING:1:1 SAPLING:2:1 SAPLING:3:1 SAPLING:4:1 SAPLING:5:1'
|
||||
repeatItemReward: 'ACACIA_SAPLING:1 DARK_OAK_SAPLING:1 OAK_SAPLING:1 BIRCH_SAPLING:1 JUNGLE_SAPLING:1 SPRUCE_SAPLING:1'
|
||||
repeatRewardText: '1 of each kind of sapling'
|
||||
repeatMoneyReward: 5
|
||||
repeatExpReward: 10
|
||||
@ -247,11 +247,11 @@ challenges:
|
||||
maxtimes: 100
|
||||
seedbank:
|
||||
friendlyname: 'Seedbank'
|
||||
description: 'Collect 64 melon seeds, 64 pumpkin seeds and 64 wheat seeds'
|
||||
description: 'Collect 32 melon seeds, 32 pumpkin seeds, 32 beetroot seeds and 32 wheat seeds'
|
||||
icon: PUMPKIN_SEEDS
|
||||
level: 'Novice'
|
||||
type: inventory
|
||||
requiredItems: 'MELON_SEEDS:64 PUMPKIN_SEEDS:64 SEEDS:64'
|
||||
requiredItems: 'MELON_SEEDS:32 PUMPKIN_SEEDS:32 WHEAT_SEEDS:32 BEETROOT_SEEDS:32'
|
||||
takeItems: true
|
||||
itemReward: 'DIRT:5 VINE:20'
|
||||
rewardText: '5 dirt blocks and 20 vines'
|
||||
@ -268,18 +268,18 @@ challenges:
|
||||
stewmaker:
|
||||
friendlyname: 'Stew Maker'
|
||||
description: 'Cook up 18 bowls of mushroom stew'
|
||||
icon: MUSHROOM_SOUP
|
||||
icon: MUSHROOM_STEW
|
||||
level: 'Novice'
|
||||
type: inventory
|
||||
requiredItems: 'MUSHROOM_SOUP:18'
|
||||
requiredItems: 'MUSHROOM_STEW:18'
|
||||
takeItems: true
|
||||
itemReward: 'MYCEL:2'
|
||||
itemReward: 'MYCELIUM:2'
|
||||
rewardText: '2 mycelium blocks'
|
||||
moneyReward: 15
|
||||
expReward: 30
|
||||
permissionReward: ''
|
||||
repeatable: true
|
||||
repeatItemReward: 'MYCEL:1'
|
||||
repeatItemReward: 'MYCELIUM:1'
|
||||
repeatRewardText: '1 mycelium block'
|
||||
repeatMoneyReward: 5
|
||||
repeatExpReward: 10
|
||||
@ -288,7 +288,7 @@ challenges:
|
||||
builder:
|
||||
friendlyname: 'Builder'
|
||||
description: 'Reach island level 10 (/[label] level).'
|
||||
icon: WOOD
|
||||
icon: OAK_WOOD
|
||||
level: 'Novice'
|
||||
type: level
|
||||
requiredItems: 10
|
||||
@ -308,7 +308,7 @@ challenges:
|
||||
icon: BONE
|
||||
level: 'Competent'
|
||||
type: inventory
|
||||
requiredItems: 'ROTTEN_FLESH:64 STRING:32 SULPHUR:16 ARROW:32 BONE:32 SPIDER_EYE:5'
|
||||
requiredItems: 'ROTTEN_FLESH:64 STRING:32 GUNPOWDER:16 ARROW:32 BONE:32 SPIDER_EYE:5'
|
||||
takeItems: true
|
||||
itemReward: 'REDSTONE:16 IRON_ORE:5 FLINT:1 POTION:WATER_BREATHING:1 POTION:NIGHT_VISION:1'
|
||||
rewardText: '16 redstone dust, 1 flint, 1 water breathing potion, 1 night vision potion and 5 iron(ore)'
|
||||
@ -327,15 +327,15 @@ challenges:
|
||||
icon: WHEAT
|
||||
level: 'Competent'
|
||||
type: inventory
|
||||
requiredItems: 'WHEAT:64 SUGAR:64 MELON:64 CARROT_ITEM:64 POTATO_ITEM:64 PUMPKIN:64'
|
||||
requiredItems: 'WHEAT:64 SUGAR:64 MELON:64 CARROTS:64 POTATOES:64 PUMPKIN:64'
|
||||
takeItems: true
|
||||
itemReward: 'REDSTONE:16 INK_SACK:3:1 MONSTER_EGG:PIG:1 MONSTER_EGG:COW:1 MONSTER_EGG:CHICKEN:1'
|
||||
itemReward: 'REDSTONE:16 COCOA_BEANS:1 PIG_SPAWN_EGG:1 COW_SPAWN_EGG:1 CHICKEN_SPAWN_EGG:1'
|
||||
rewardText: '16 redstone dust, 1 cocoa bean, 1 spawn egg (chicken,cow,pig)'
|
||||
moneyReward: 75
|
||||
expReward: 75
|
||||
permissionReward: ''
|
||||
repeatable: true
|
||||
repeatItemReward: 'INK_SACK:3:1 MONSTER_EGG:PIG:1 MONSTER_EGG:COW:1 MONSTER_EGG:CHICKEN:1'
|
||||
repeatItemReward: 'COCOA_BEANS:1 PIG_SPAWN_EGG:1 COW_SPAWN_EGG:1 CHICKEN_SPAWN_EGG:1'
|
||||
repeatRewardText: '1 cocoa bean, 1 spawn egg (chicken,cow,pig)'
|
||||
repeatMoneyReward: 20
|
||||
repeatExpReward: 20
|
||||
@ -343,19 +343,19 @@ challenges:
|
||||
maxtimes: 100
|
||||
angler:
|
||||
friendlyname: 'Angler'
|
||||
description: 'Catch and cook 10 standard fish (no salmon)'
|
||||
icon: COOKED_FISH
|
||||
description: 'Catch and cook 10 salmon fish'
|
||||
icon: COOKED_SALMON
|
||||
level: 'Competent'
|
||||
type: inventory
|
||||
requiredItems: 'COOKED_FISH:10'
|
||||
requiredItems: 'COOKED_SALMON:10'
|
||||
takeItems: true
|
||||
itemReward: 'REDSTONE:16 IRON_ORE:5 INK_SACK:5'
|
||||
itemReward: 'REDSTONE:16 IRON_ORE:5 INK_SAC:5'
|
||||
rewardText: '16 redstone dust, 5 inksacs, 5 iron (ore)'
|
||||
moneyReward: 75
|
||||
expReward: 75
|
||||
permissionReward: ''
|
||||
repeatable: true
|
||||
repeatItemReward: 'REDSTONE:2 IRON_ORE:1 INK_SACK:1'
|
||||
repeatItemReward: 'REDSTONE:2 IRON_ORE:1 INK_SAC:1'
|
||||
repeatRewardText: '2 redstone dust, 1 inksac, 1 iron (ore)'
|
||||
repeatMoneyReward: 15
|
||||
repeatExpReward: 15
|
||||
@ -363,13 +363,13 @@ challenges:
|
||||
maxtimes: 100
|
||||
treecutter:
|
||||
friendlyname: 'Treecutter'
|
||||
description: 'Create a tree farm and collect 16 oak, birch, jungle, and spruce logs'
|
||||
icon: LOG
|
||||
description: 'Create a tree farm and collect 16 oak, birch, jungle, acacia, dark oak and spruce logs'
|
||||
icon: OAK_LOG
|
||||
level: 'Competent'
|
||||
type: inventory
|
||||
requiredItems: 'LOG:0:16 LOG:1:16 LOG:2:16 LOG:3:16'
|
||||
requiredItems: 'OAK_LOG:16 BIRCH_LOG:16 JUNGLE_LOG:16 SPRUCE_LOG:16 ACACIA_LOG:16 DARK_OAK_LOG:16'
|
||||
takeItems: true
|
||||
itemReward: 'REDSTONE:16 IRON_ORE:5 MONSTER_EGG:WOLF:1'
|
||||
itemReward: 'REDSTONE:16 IRON_ORE:5 WOLF_SPAWN_EGG:1'
|
||||
rewardText: '16 redstone dust, 5 iron (ore), 1 wolf spawn egg'
|
||||
moneyReward: 75
|
||||
expReward: 75
|
||||
@ -421,17 +421,17 @@ challenges:
|
||||
repeatExpReward: 0
|
||||
homestead:
|
||||
friendlyname: 'Homestead'
|
||||
description: 'Build a house that contains at least 1 wooden door, bed, bookshelf, crafting table, furnace, glass-block window, and torch.'
|
||||
icon: BED
|
||||
description: 'Build a house that contains at least 1 oak door, white bed, bookshelf, crafting table, furnace, glass-block window, and wall torch.'
|
||||
icon: WHITE_BED
|
||||
level: 'Competent'
|
||||
type: island
|
||||
requiredItems: 'BED_BLOCK:1 WORKBENCH:1 GLASS:1 WOODEN_DOOR:1 FURNACE:1 BOOKSHELF:1 TORCH:1'
|
||||
requiredItems: 'WHITE_BED:1 CRAFTING_TABLE:1 GLASS:1 OAK_DOOR:1 FURNACE:1 BOOKSHELF:1 WALL_TORCH:1'
|
||||
# Search radius - the number of blocks that will be searched around the player
|
||||
# Minimum 10, which searches from -10 to +10 blocks around the player in x,y,z
|
||||
# Max is 50 because big searches cause lag
|
||||
searchRadius: 10
|
||||
takeItems: false
|
||||
itemReward: 'JUKEBOX:1 RECORD_12:1 LAPIS_BLOCK:10'
|
||||
itemReward: 'JUKEBOX:1 MUSIC_DISC_CHIRP:1 LAPIS_BLOCK:10'
|
||||
rewardText: '1 jukebox, 1 music disk, 10 lapis lazuli blocks'
|
||||
moneyReward: 100
|
||||
expReward: 100
|
||||
@ -447,7 +447,7 @@ challenges:
|
||||
icon: NETHERRACK
|
||||
level: 'Expert'
|
||||
type: island
|
||||
requiredItems: 'OBSIDIAN:10 PORTAL:1'
|
||||
requiredItems: 'OBSIDIAN:10 NETHER_PORTAL:1'
|
||||
takeItems: false
|
||||
itemReward: 'DIAMOND_SWORD:1'
|
||||
rewardText: '1 diamond sword'
|
||||
@ -525,9 +525,9 @@ challenges:
|
||||
icon: MAP
|
||||
level: 'Expert'
|
||||
type: inventory
|
||||
requiredItems: 'NETHERRACK:64 SOUL_SAND:16 GHAST_TEAR:1 MAP:1 COMPASS:1 WATCH:1'
|
||||
requiredItems: 'NETHERRACK:64 SOUL_SAND:16 GHAST_TEAR:1 MAP:1 COMPASS:1 CLOCK:1'
|
||||
takeItems: true
|
||||
itemReward: 'POWERED_RAIL:32 RAILS:256 DIAMOND:1 MONSTER_EGG:OCELOT:1'
|
||||
itemReward: 'POWERED_RAIL:32 RAIL:256 DIAMOND:1 OCELOT_SPAWN_EGG:1'
|
||||
rewardText: '256 rails, 32 powered rails, 1 ocelot spawn egg, 1 diamond'
|
||||
moneyReward: 100
|
||||
expReward: 100
|
||||
@ -560,18 +560,18 @@ challenges:
|
||||
shepherd:
|
||||
friendlyname: 'Shepherd'
|
||||
description: 'Collect 5 of every color of wool'
|
||||
icon: WOOL:2
|
||||
icon: BLUE_WOOL
|
||||
level: 'Advanced'
|
||||
type: inventory
|
||||
requiredItems: 'WOOL:0:5 WOOL:1:5 WOOL:2:5 WOOL:3:5 WOOL:4:5 WOOL:5:5 WOOL:6:5 WOOL:7:5 WOOL:8:5 WOOL:9:5 WOOL:10:5 WOOL:11:5 WOOL:12:5 WOOL:13:5 WOOL:14:5 WOOL:15:5'
|
||||
requiredItems: 'BLACK_WOOL:5 BLUE_WOOL:5 BROWN_WOOL:5 CYAN_WOOL:5 GRAY_WOOL:5 GREEN_WOOL:5 LIGHT_BLUE_WOOL:5 LIGHT_GRAY_WOOL:5 LIME_WOOL:5 MAGENTA_WOOL:5 ORANGE_WOOL:5 PINK_WOOL:5 PURPLE_WOOL:5 RED_WOOL:5 WHITE_WOOL:5 YELLOW_WOOL:5 '
|
||||
takeItems: true
|
||||
itemReward: 'DIAMOND:2 RECORD_7:1 RECORD_8:1 RECORD_6:1 MONSTER_EGG:SHEEP:1 EMERALD:5'
|
||||
itemReward: 'DIAMOND:2 MUSIC_DISC_CAT:1 MUSIC_DISC_BLOCKS:1 MUSIC_DISC_STAL:1 SHEEP_SPAWN_EGG:1 EMERALD:5'
|
||||
rewardText: '2 diamonds, 5 emeralds, 3 music disks, 1 sheep spawn egg'
|
||||
moneyReward: 200
|
||||
expReward: 200
|
||||
permissionReward: ''
|
||||
repeatable: true
|
||||
repeatItemReward: 'EMERALD:1 MONSTER_EGG:SHEEP:1'
|
||||
repeatItemReward: 'EMERALD:1 SHEEP_SPAWN_EGG:1'
|
||||
repeatRewardText: '1 emerald, 1 sheep spawn egg'
|
||||
repeatMoneyReward: 20
|
||||
repeatExpReward: 20
|
||||
@ -580,13 +580,13 @@ challenges:
|
||||
alchemist:
|
||||
friendlyname: 'Alchemist'
|
||||
description: 'Brew 1 potion of Fire Resistance, Slowness, Swiftness, Healing, Harming, Invisibility, Strength and Regeneration'
|
||||
icon: BREWING_STAND_ITEM
|
||||
icon: BREWING_STAND
|
||||
level: 'Advanced'
|
||||
type: inventory
|
||||
requiredItems: 'POTION:FIRE_RESISTANCE::::1 POTION:SLOWNESS::::1 POTION:SPEED::::1 POTION:INSTANT_HEAL::::1 POTION:INSTANT_DAMAGE::::1 POTION:INVISIBILITY::::1 POTION:STRENGTH::::1 POTION:REGEN::::1'
|
||||
takeItems: true
|
||||
itemReward: 'ENCHANTMENT_TABLE:1'
|
||||
rewardText: 'Enchantment Table'
|
||||
itemReward: 'ENCHANTING_TABLE:1'
|
||||
rewardText: 'Enchanting Table'
|
||||
moneyReward: 200
|
||||
expReward: 200
|
||||
permissionReward: ''
|
||||
@ -598,10 +598,10 @@ challenges:
|
||||
dj:
|
||||
friendlyname: 'DJ'
|
||||
description: 'Craft a jukebox and collect all music discs'
|
||||
icon: RECORD_5
|
||||
icon: MUSIC_DISC_CHIRP
|
||||
level: 'Advanced'
|
||||
type: inventory
|
||||
requiredItems: 'GOLD_RECORD:1 GREEN_RECORD:1 RECORD_3:1 RECORD_4:1 RECORD_5:1 RECORD_6:1 RECORD_7:1 RECORD_8:1 RECORD_9:1 RECORD_10:1 RECORD_11:1 RECORD_12:1 JUKEBOX:1'
|
||||
requiredItems: 'MUSIC_DISC_11:1 MUSIC_DISC_13:1 MUSIC_DISC_BLOCKS:1 MUSIC_DISC_CAT:1 MUSIC_DISC_CHIRP:1 MUSIC_DISC_FAR:1 MUSIC_DISC_MALL:1 MUSIC_DISC_MELLOHI:1 MUSIC_DISC_STAL:1 MUSIC_DISC_STRAD:1 MUSIC_DISC_WAIT:1 MUSIC_DISC_WARD:1 JUKEBOX:1'
|
||||
takeItems: true
|
||||
itemReward: 'DIAMOND:3 EMERALD:10 GOLD_INGOT:5'
|
||||
rewardText: '3 diamonds, 10 emeralds and 5 gold ingots'
|
||||
@ -641,17 +641,15 @@ challenges:
|
||||
icon: GOLDEN_APPLE
|
||||
level: 'Advanced'
|
||||
type: inventory
|
||||
requiredItems: 'BAKED_POTATO:1 BREAD:1 CAKE:1 COOKED_CHICKEN:1 COOKED_FISH:1 GRILLED_PORK:1 COOKIE:1 GOLDEN_APPLE:0:1 GOLDEN_CARROT:1 MUSHROOM_SOUP:1 PUMPKIN_PIE:1 COOKED_BEEF:1'
|
||||
# If you are running 1.8 change to this:
|
||||
# requiredItems: 'BAKED_POTATO:1 BREAD:1 CAKE:1 COOKED_CHICKEN:1 COOKED_FISH:1 GRILLED_PORK:1 COOKIE:1 GOLDEN_APPLE:0:1 GOLDEN_CARROT:1 MUSHROOM_SOUP:1 PUMPKIN_PIE:1 COOKED_BEEF:1 COOKED_RABBIT:1 RABBIT_STEW:1 COOKED_MUTTON:1'
|
||||
requiredItems: 'BAKED_POTATO:1 BREAD:1 CAKE:1 COOKED_CHICKEN:1 COOKED_COD:1 COOKED_SALMON:1 COOKED_PORKCHOP:1 COOKED_RABBIT:1 COOKIE:1 GOLDEN_APPLE:0:1 GOLDEN_CARROT:1 MUSHROOM_STEW:1 PUMPKIN_PIE:1 COOKED_BEEF:1'
|
||||
takeItems: true
|
||||
itemReward: 'GOLD_BLOCK:2 GREEN_RECORD:1 RECORD_3:1 RECORD_5:1 MONSTER_EGG:MUSHROOM_COW:1 EMERALD:5'
|
||||
itemReward: 'GOLD_BLOCK:2 MUSIC_DISC_MALL:1 MUSIC_DISC_WAIT:1 MUSIC_DISC_13:1 MOOSHROOM_SPAWN_EGG:1 EMERALD:5'
|
||||
rewardText: '2 gold blocks, 3 music discs, 1 mooshroom spawn egg, and 5 emeralds'
|
||||
moneyReward: 200
|
||||
expReward: 200
|
||||
permissionReward: ''
|
||||
repeatable: true
|
||||
repeatItemReward: 'GOLD_INGOT:10 MONSTER_EGG:MUSHROOM_COW:1 EMERALD:1'
|
||||
repeatItemReward: 'GOLD_INGOT:10 MOOSHROOM_SPAWN_EGG:1 EMERALD:1'
|
||||
repeatRewardText: '10 gold ingots, 1 mooshroom spawn egg, 1 emerald'
|
||||
repeatMoneyReward: 20
|
||||
repeatExpReward: 20
|
||||
@ -665,7 +663,7 @@ challenges:
|
||||
type: island
|
||||
requiredItems: 'BEACON:1'
|
||||
takeItems: false
|
||||
itemReward: 'SMOOTH_BRICK:20 SMOOTH_BRICK:1:20 SMOOTH_BRICK:2:20 SMOOTH_BRICK:3:20'
|
||||
itemReward: 'STONE_BRICKS:20 CHISELED_STONE_BRICKS:20 CRACKED_STONE_BRICKS:20 MOSSY_STONE_BRICKS:20'
|
||||
rewardText: '20 blocks of every kind of stone brick'
|
||||
moneyReward: 300
|
||||
expReward: 300
|
||||
@ -701,7 +699,7 @@ challenges:
|
||||
type: island
|
||||
requiredItems: 'IRON_GOLEM:1'
|
||||
takeItems: false
|
||||
itemReward: 'NAME_TAG:1 ANVIL:1 CAULDRON_ITEM:1 IRON_BLOCK:2'
|
||||
itemReward: 'NAME_TAG:1 ANVIL:1 CAULDRON:1 IRON_BLOCK:2'
|
||||
rewardText: 'A name tag, an anvil, a cauldron and 2 iron blocks'
|
||||
moneyReward: 300
|
||||
expReward: 300
|
||||
@ -714,12 +712,12 @@ challenges:
|
||||
snowplay:
|
||||
friendlyname: 'Snow Play!'
|
||||
description: 'Build a snow golem'
|
||||
icon: SNOW_BALL
|
||||
icon: SNOWBALL
|
||||
level: 'Advanced'
|
||||
type: island
|
||||
requiredItems: 'SNOWMAN:1'
|
||||
takeItems: false
|
||||
itemReward: 'DIAMOND_SPADE:1'
|
||||
itemReward: 'DIAMOND_SHOVEL:1'
|
||||
rewardText: 'A diamond spade - get shoveling!'
|
||||
moneyReward: 300
|
||||
expReward: 300
|
||||
@ -750,12 +748,12 @@ challenges:
|
||||
itsamonsterparty:
|
||||
friendlyname: "It's a Monster Party"
|
||||
description: 'Have a party - all monsters invited! Get close to a Skeleton, Zombie, Spider, Creeper and Enderman all at the same time.'
|
||||
icon: SKULL_ITEM
|
||||
icon: SKELETON_SKULL
|
||||
level: 'Advanced'
|
||||
type: island
|
||||
requiredItems: 'SKELETON:1 ZOMBIE:1 SPIDER:1 CREEPER:1 ENDERMAN:1'
|
||||
takeItems: false
|
||||
itemReward: 'SKULL_ITEM:0:2 SKULL_ITEM:2:2 SKULL_ITEM:3:2'
|
||||
itemReward: 'SKELETON_SKULL:1 ZOMBIE_HEAD:1 CREEPER_HEAD:1'
|
||||
rewardText: 'Skulls!'
|
||||
moneyReward: 200
|
||||
expReward: 400
|
||||
|
6
pom.xml
6
pom.xml
@ -44,12 +44,12 @@
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.12.2-R0.1-SNAPSHOT</version>
|
||||
<version>1.13-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>us.tastybento</groupId>
|
||||
<artifactId>bskyblock</artifactId>
|
||||
<groupId>world.bentobox</groupId>
|
||||
<artifactId>bentobox</artifactId>
|
||||
<version>LATEST</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
@ -4,8 +4,8 @@ import org.bukkit.Bukkit;
|
||||
|
||||
import bskyblock.addon.challenges.commands.ChallengesCommand;
|
||||
import bskyblock.addon.challenges.commands.admin.ChallengesAdminImportCommand;
|
||||
import us.tastybento.bskyblock.api.addons.Addon;
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.addons.Addon;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
|
||||
/**
|
||||
* Add-on to BSkyBlock that enables challenges
|
||||
@ -21,7 +21,7 @@ public class ChallengesAddon extends Addon {
|
||||
@Override
|
||||
public void onEnable() {
|
||||
// Check if it is enabled - it might be loaded, but not enabled.
|
||||
if (getBSkyBlock() == null || !getBSkyBlock().isEnabled()) {
|
||||
if (getPlugin() == null || !getPlugin().isEnabled()) {
|
||||
Bukkit.getLogger().severe("BSkyBlock is not available or disabled!");
|
||||
this.setEnabled(false);
|
||||
return;
|
||||
@ -34,19 +34,26 @@ public class ChallengesAddon extends Addon {
|
||||
|
||||
// Register commands - run one tick later to allow all addons to load
|
||||
// AcidIsland hook in
|
||||
getServer().getScheduler().runTask(getBSkyBlock(), () -> {
|
||||
this.getBSkyBlock().getAddonsManager().getAddonByName("AcidIsland").ifPresent(a -> {
|
||||
CompositeCommand acidIslandCmd = getBSkyBlock().getCommandsManager().getCommand("ai");
|
||||
getServer().getScheduler().runTask(getPlugin(), () -> {
|
||||
this.getPlugin().getAddonsManager().getAddonByName("AcidIsland").ifPresent(a -> {
|
||||
CompositeCommand acidIslandCmd = getPlugin().getCommandsManager().getCommand("ai");
|
||||
if (acidIslandCmd != null) {
|
||||
new ChallengesCommand(this, acidIslandCmd);
|
||||
CompositeCommand acidCmd = getBSkyBlock().getCommandsManager().getCommand("acid");
|
||||
CompositeCommand acidCmd = getPlugin().getCommandsManager().getCommand("acid");
|
||||
new ChallengesAdminImportCommand(this, acidCmd);
|
||||
}
|
||||
});
|
||||
});
|
||||
this.getPlugin().getAddonsManager().getAddonByName("BSkyBlock").ifPresent(a -> {
|
||||
// BSkyBlock hook in
|
||||
CompositeCommand bsbIslandCmd = getBSkyBlock().getCommandsManager().getCommand("island");
|
||||
CompositeCommand bsbIslandCmd = getPlugin().getCommandsManager().getCommand("island");
|
||||
if (bsbIslandCmd != null) {
|
||||
new ChallengesCommand(this, bsbIslandCmd);
|
||||
CompositeCommand bsbAdminCmd = getBSkyBlock().getCommandsManager().getCommand("bsbadmin");
|
||||
CompositeCommand bsbAdminCmd = getPlugin().getCommandsManager().getCommand("bsbadmin");
|
||||
new ChallengesAdminImportCommand(this, bsbAdminCmd);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Done
|
||||
}
|
||||
|
||||
|
@ -26,10 +26,10 @@ import bskyblock.addon.challenges.database.object.Challenges;
|
||||
import bskyblock.addon.challenges.database.object.Challenges.ChallengeType;
|
||||
import bskyblock.addon.challenges.database.object.PlayerData;
|
||||
import bskyblock.addon.challenges.panel.ChallengesPanels;
|
||||
import us.tastybento.bskyblock.api.configuration.BSBConfig;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import us.tastybento.bskyblock.database.BSBDatabase;
|
||||
import us.tastybento.bskyblock.util.Util;
|
||||
import world.bentobox.bentobox.api.configuration.BSBConfig;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
import world.bentobox.bentobox.database.BSBDatabase;
|
||||
import world.bentobox.bentobox.util.Util;
|
||||
|
||||
public class ChallengesManager {
|
||||
|
||||
@ -130,7 +130,7 @@ public class ChallengesManager {
|
||||
newChallenge.setRequiredItems(requiredItems);
|
||||
newChallenge.setTakeItems(true);
|
||||
newChallenge.setUniqueId(inventory.getTitle());
|
||||
newChallenge.setIcon(new ItemStack(Material.EMPTY_MAP));
|
||||
newChallenge.setIcon(new ItemStack(Material.MAP));
|
||||
newChallenge.setLevel(FREE);
|
||||
newChallenge.setDescription(createDescription(user, requiredItems));
|
||||
|
||||
@ -356,7 +356,7 @@ public class ChallengesManager {
|
||||
*/
|
||||
public void save(boolean async) {
|
||||
if (async) {
|
||||
addon.getServer().getScheduler().runTaskAsynchronously(addon.getBSkyBlock(), this::save);
|
||||
addon.getServer().getScheduler().runTaskAsynchronously(addon.getPlugin(), this::save);
|
||||
} else {
|
||||
save();
|
||||
}
|
||||
|
@ -18,8 +18,8 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import bskyblock.addon.challenges.database.object.ChallengeLevels;
|
||||
import bskyblock.addon.challenges.database.object.Challenges;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import us.tastybento.bskyblock.util.Util;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
import world.bentobox.bentobox.util.Util;
|
||||
|
||||
/**
|
||||
* Imports challenges
|
||||
|
@ -1,11 +1,8 @@
|
||||
package bskyblock.addon.challenges;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.PotionMeta;
|
||||
import org.bukkit.inventory.meta.SpawnEggMeta;
|
||||
import org.bukkit.potion.PotionData;
|
||||
import org.bukkit.potion.PotionType;
|
||||
|
||||
@ -40,6 +37,7 @@ public class ParseItem {
|
||||
} else if (part.length == 6 && (part[0].contains("POTION") || part[0].equalsIgnoreCase("TIPPED_ARROW"))) {
|
||||
return potion(s, part);
|
||||
}
|
||||
showError(s);
|
||||
return null;
|
||||
|
||||
}
|
||||
@ -89,23 +87,16 @@ public class ParseItem {
|
||||
String[] twoer = {part[0], part[2]};
|
||||
ItemStack result = two(s, twoer);
|
||||
if (result == null) {
|
||||
showError(s);
|
||||
return null;
|
||||
}
|
||||
if (StringUtils.isNumeric(part[1])) {
|
||||
result.setDurability((short) Integer.parseInt(part[1]));
|
||||
} else if (result.getType().equals(Material.MONSTER_EGG)) {
|
||||
// Check if this is a string
|
||||
EntityType entityType = EntityType.valueOf(part[1]);
|
||||
SpawnEggMeta meta = ((SpawnEggMeta)result.getItemMeta());
|
||||
meta.setSpawnedType(entityType);
|
||||
result.setItemMeta(meta);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
private void showError(String s) {
|
||||
addon.getLogger().severe(() -> "Problem with " + s + " in challenges.yml!");
|
||||
addon.getLogger().severe(() -> "Problem with " + s + " in config.yml!");
|
||||
}
|
||||
|
||||
private ItemStack two(String s, String[] part) {
|
||||
@ -113,10 +104,9 @@ public class ParseItem {
|
||||
try {
|
||||
reqAmount = Integer.parseInt(part[1]);
|
||||
} catch (Exception e) {
|
||||
addon.getLogger().severe(() -> "Could not parse the quantity of the item " + s);
|
||||
showError(s);
|
||||
return null;
|
||||
}
|
||||
|
||||
Material reqItem = Material.getMaterial(part[0].toUpperCase() + "_ITEM");
|
||||
if (reqItem == null) {
|
||||
// Try the item
|
||||
|
@ -4,20 +4,20 @@ import java.util.List;
|
||||
|
||||
import bskyblock.addon.challenges.ChallengesAddon;
|
||||
import bskyblock.addon.challenges.panel.ChallengesPanels;
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
public class ChallengesCommand extends CompositeCommand {
|
||||
public static final String CHALLENGE_COMMAND = "challenges";
|
||||
private ChallengesAddon addon;
|
||||
|
||||
public ChallengesCommand(ChallengesAddon addon, CompositeCommand cmd) {
|
||||
super(cmd, CHALLENGE_COMMAND, "c", "challenge");
|
||||
super(cmd, CHALLENGE_COMMAND);
|
||||
this.addon = addon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// Open up the challenges GUI
|
||||
if (user.isPlayer()) {
|
||||
new ChallengesPanels(addon, user, args.isEmpty() ? "" : args.get(0), getWorld(), getPermissionPrefix(), getTopLabel());
|
||||
@ -29,7 +29,7 @@ public class ChallengesCommand extends CompositeCommand {
|
||||
@Override
|
||||
public void setup() {
|
||||
this.setOnlyPlayer(true);
|
||||
this.setPermission(getPermissionPrefix() + CHALLENGE_COMMAND);
|
||||
this.setPermission(CHALLENGE_COMMAND);
|
||||
this.setParameters(CHALLENGE_COMMAND + ".parameters");
|
||||
this.setDescription(CHALLENGE_COMMAND + ".description");
|
||||
this.setOnlyPlayer(true);
|
||||
|
@ -5,9 +5,9 @@ import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import bskyblock.addon.challenges.ChallengesAddon;
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import us.tastybento.bskyblock.util.Util;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
import world.bentobox.bentobox.util.Util;
|
||||
|
||||
public class ChallengesAdminImportCommand extends CompositeCommand {
|
||||
|
||||
@ -24,13 +24,13 @@ public class ChallengesAdminImportCommand extends CompositeCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
return addon.getImportManager().importChallenges(user, getWorld(), !args.isEmpty() && args.get(0).equalsIgnoreCase("overwrite"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
this.setPermission(getPermissionPrefix() + "challenges.admin");
|
||||
this.setPermission("challenges.admin");
|
||||
this.setParameters("challenges.admin.import.parameters");
|
||||
this.setDescription("challenges.admin.import.description");
|
||||
}
|
||||
|
@ -4,9 +4,9 @@ import java.util.List;
|
||||
|
||||
import bskyblock.addon.challenges.ChallengesAddon;
|
||||
import bskyblock.addon.challenges.panel.CreateChallengeListener;
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import us.tastybento.bskyblock.api.panels.builders.PanelBuilder;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.panels.builders.PanelBuilder;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
public class CreateChallenge extends CompositeCommand {
|
||||
|
||||
@ -27,14 +27,14 @@ public class CreateChallenge extends CompositeCommand {
|
||||
@Override
|
||||
public void setup() {
|
||||
this.setOnlyPlayer(true);
|
||||
this.setPermission(getPermissionPrefix() + "admin.challenges");
|
||||
this.setPermission("admin.challenges");
|
||||
this.setParameters("challaneges.admin.create.parameters");
|
||||
this.setDescription("challenges.admin.create.description");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
if (args.isEmpty()) {
|
||||
user.sendRawMessage("not enough args");
|
||||
return false;
|
||||
|
@ -17,9 +17,9 @@ import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
|
||||
import bskyblock.addon.challenges.ChallengesAddon;
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import us.tastybento.bskyblock.util.Util;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
import world.bentobox.bentobox.util.Util;
|
||||
|
||||
/**
|
||||
* Command to create a surrounding type challenge
|
||||
@ -39,19 +39,19 @@ public class CreateSurrounding extends CompositeCommand implements Listener {
|
||||
public CreateSurrounding(ChallengesAddon addon, CompositeCommand parent) {
|
||||
super(parent, "surrounding");
|
||||
this.addon = addon;
|
||||
addon.getServer().getPluginManager().registerEvents(this, addon.getBSkyBlock());
|
||||
addon.getServer().getPluginManager().registerEvents(this, addon.getPlugin());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
this.setOnlyPlayer(true);
|
||||
this.setPermission(getPermissionPrefix() + "admin.challenges");
|
||||
this.setPermission("admin.challenges");
|
||||
this.setParameters("challaneges.admin.create.surrounding.parameters");
|
||||
this.setDescription("challenges.admin.create.surrounding.description");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
if (args.isEmpty()) {
|
||||
user.sendMessage("challenges.admin.error.no-name");
|
||||
return false;
|
||||
|
@ -5,9 +5,9 @@ package bskyblock.addon.challenges.commands.admin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import us.tastybento.bskyblock.BSkyBlock;
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import bskyblock.addon.challenges.ChallengesAddon;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
/**
|
||||
* @author tastybento
|
||||
@ -20,7 +20,7 @@ public class MakeLevel extends CompositeCommand {
|
||||
* @param label
|
||||
* @param string
|
||||
*/
|
||||
public MakeLevel(BSkyBlock plugin, String label, String... string) {
|
||||
public MakeLevel(ChallengesAddon plugin, String label, String... string) {
|
||||
super(plugin, label, string);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
@ -45,7 +45,7 @@ public class MakeLevel extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#setup()
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#setup()
|
||||
*/
|
||||
@Override
|
||||
public void setup() {
|
||||
@ -54,10 +54,10 @@ public class MakeLevel extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -5,9 +5,9 @@ package bskyblock.addon.challenges.commands.admin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import us.tastybento.bskyblock.BSkyBlock;
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import bskyblock.addon.challenges.ChallengesAddon;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
/**
|
||||
* @author tastybento
|
||||
@ -20,7 +20,7 @@ public class SetDeployed extends CompositeCommand {
|
||||
* @param label
|
||||
* @param string
|
||||
*/
|
||||
public SetDeployed(BSkyBlock plugin, String label, String... string) {
|
||||
public SetDeployed(ChallengesAddon plugin, String label, String... string) {
|
||||
super(plugin, label, string);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
@ -45,7 +45,7 @@ public class SetDeployed extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#setup()
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#setup()
|
||||
*/
|
||||
@Override
|
||||
public void setup() {
|
||||
@ -54,10 +54,10 @@ public class SetDeployed extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -5,9 +5,9 @@ package bskyblock.addon.challenges.commands.admin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import us.tastybento.bskyblock.BSkyBlock;
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import bskyblock.addon.challenges.ChallengesAddon;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
/**
|
||||
* @author tastybento
|
||||
@ -20,7 +20,7 @@ public class SetDescription extends CompositeCommand {
|
||||
* @param label
|
||||
* @param string
|
||||
*/
|
||||
public SetDescription(BSkyBlock plugin, String label, String... string) {
|
||||
public SetDescription(ChallengesAddon plugin, String label, String... string) {
|
||||
super(plugin, label, string);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
@ -45,7 +45,7 @@ public class SetDescription extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#setup()
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#setup()
|
||||
*/
|
||||
@Override
|
||||
public void setup() {
|
||||
@ -54,10 +54,10 @@ public class SetDescription extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -5,9 +5,9 @@ package bskyblock.addon.challenges.commands.admin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import us.tastybento.bskyblock.BSkyBlock;
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import bskyblock.addon.challenges.ChallengesAddon;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
/**
|
||||
* @author tastybento
|
||||
@ -20,7 +20,7 @@ public class SetExp extends CompositeCommand {
|
||||
* @param label
|
||||
* @param string
|
||||
*/
|
||||
public SetExp(BSkyBlock plugin, String label, String... string) {
|
||||
public SetExp(ChallengesAddon plugin, String label, String... string) {
|
||||
super(plugin, label, string);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
@ -45,7 +45,7 @@ public class SetExp extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#setup()
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#setup()
|
||||
*/
|
||||
@Override
|
||||
public void setup() {
|
||||
@ -54,10 +54,10 @@ public class SetExp extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -5,9 +5,9 @@ package bskyblock.addon.challenges.commands.admin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import us.tastybento.bskyblock.BSkyBlock;
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import bskyblock.addon.challenges.ChallengesAddon;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
/**
|
||||
* @author tastybento
|
||||
@ -20,7 +20,7 @@ public class SetFriendlyName extends CompositeCommand {
|
||||
* @param label
|
||||
* @param string
|
||||
*/
|
||||
public SetFriendlyName(BSkyBlock plugin, String label, String... string) {
|
||||
public SetFriendlyName(ChallengesAddon plugin, String label, String... string) {
|
||||
super(plugin, label, string);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
@ -45,7 +45,7 @@ public class SetFriendlyName extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#setup()
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#setup()
|
||||
*/
|
||||
@Override
|
||||
public void setup() {
|
||||
@ -54,10 +54,10 @@ public class SetFriendlyName extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -9,8 +9,8 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import bskyblock.addon.challenges.ChallengesAddon;
|
||||
import bskyblock.addon.challenges.database.object.Challenges;
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
/**
|
||||
* @author tastybento
|
||||
@ -31,7 +31,7 @@ public class SetIcon extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#setup()
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#setup()
|
||||
*/
|
||||
@Override
|
||||
public void setup() {
|
||||
@ -40,10 +40,10 @@ public class SetIcon extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
ItemStack icon = user.getInventory().getItemInMainHand();
|
||||
if (args.isEmpty() || icon == null) {
|
||||
user.sendMessage("challenges.admin.seticon.description");
|
||||
|
@ -5,9 +5,9 @@ package bskyblock.addon.challenges.commands.admin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import us.tastybento.bskyblock.BSkyBlock;
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import bskyblock.addon.challenges.ChallengesAddon;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
/**
|
||||
* @author tastybento
|
||||
@ -20,7 +20,7 @@ public class SetLevel extends CompositeCommand {
|
||||
* @param label
|
||||
* @param string
|
||||
*/
|
||||
public SetLevel(BSkyBlock plugin, String label, String... string) {
|
||||
public SetLevel(ChallengesAddon plugin, String label, String... string) {
|
||||
super(plugin, label, string);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
@ -45,7 +45,7 @@ public class SetLevel extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#setup()
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#setup()
|
||||
*/
|
||||
@Override
|
||||
public void setup() {
|
||||
@ -54,10 +54,10 @@ public class SetLevel extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -5,9 +5,9 @@ package bskyblock.addon.challenges.commands.admin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import us.tastybento.bskyblock.BSkyBlock;
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import bskyblock.addon.challenges.ChallengesAddon;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
/**
|
||||
* @author tastybento
|
||||
@ -20,7 +20,7 @@ public class SetMaxTimes extends CompositeCommand {
|
||||
* @param label
|
||||
* @param string
|
||||
*/
|
||||
public SetMaxTimes(BSkyBlock plugin, String label, String... string) {
|
||||
public SetMaxTimes(ChallengesAddon plugin, String label, String... string) {
|
||||
super(plugin, label, string);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
@ -45,7 +45,7 @@ public class SetMaxTimes extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#setup()
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#setup()
|
||||
*/
|
||||
@Override
|
||||
public void setup() {
|
||||
@ -54,10 +54,10 @@ public class SetMaxTimes extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -5,9 +5,9 @@ package bskyblock.addon.challenges.commands.admin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import us.tastybento.bskyblock.BSkyBlock;
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import bskyblock.addon.challenges.ChallengesAddon;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
/**
|
||||
* @author tastybento
|
||||
@ -20,7 +20,7 @@ public class SetPerm extends CompositeCommand {
|
||||
* @param label
|
||||
* @param string
|
||||
*/
|
||||
public SetPerm(BSkyBlock plugin, String label, String... string) {
|
||||
public SetPerm(ChallengesAddon plugin, String label, String... string) {
|
||||
super(plugin, label, string);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
@ -45,7 +45,7 @@ public class SetPerm extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#setup()
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#setup()
|
||||
*/
|
||||
@Override
|
||||
public void setup() {
|
||||
@ -54,10 +54,10 @@ public class SetPerm extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -5,9 +5,9 @@ package bskyblock.addon.challenges.commands.admin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import us.tastybento.bskyblock.BSkyBlock;
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import bskyblock.addon.challenges.ChallengesAddon;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
/**
|
||||
* @author tastybento
|
||||
@ -20,7 +20,7 @@ public class SetRepeatable extends CompositeCommand {
|
||||
* @param label
|
||||
* @param string
|
||||
*/
|
||||
public SetRepeatable(BSkyBlock plugin, String label, String... string) {
|
||||
public SetRepeatable(ChallengesAddon plugin, String label, String... string) {
|
||||
super(plugin, label, string);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
@ -45,7 +45,7 @@ public class SetRepeatable extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#setup()
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#setup()
|
||||
*/
|
||||
@Override
|
||||
public void setup() {
|
||||
@ -54,10 +54,10 @@ public class SetRepeatable extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -5,9 +5,9 @@ package bskyblock.addon.challenges.commands.admin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import us.tastybento.bskyblock.BSkyBlock;
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import bskyblock.addon.challenges.ChallengesAddon;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
/**
|
||||
* @author tastybento
|
||||
@ -20,7 +20,7 @@ public class SetReward extends CompositeCommand {
|
||||
* @param label
|
||||
* @param string
|
||||
*/
|
||||
public SetReward(BSkyBlock plugin, String label, String... string) {
|
||||
public SetReward(ChallengesAddon plugin, String label, String... string) {
|
||||
super(plugin, label, string);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
@ -45,7 +45,7 @@ public class SetReward extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#setup()
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#setup()
|
||||
*/
|
||||
@Override
|
||||
public void setup() {
|
||||
@ -54,10 +54,10 @@ public class SetReward extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -5,9 +5,9 @@ package bskyblock.addon.challenges.commands.admin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import us.tastybento.bskyblock.BSkyBlock;
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import bskyblock.addon.challenges.ChallengesAddon;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
/**
|
||||
* @author tastybento
|
||||
@ -20,7 +20,7 @@ public class SetType extends CompositeCommand {
|
||||
* @param label
|
||||
* @param string
|
||||
*/
|
||||
public SetType(BSkyBlock plugin, String label, String... string) {
|
||||
public SetType(ChallengesAddon plugin, String label, String... string) {
|
||||
super(plugin, label, string);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
@ -45,7 +45,7 @@ public class SetType extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#setup()
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#setup()
|
||||
*/
|
||||
@Override
|
||||
public void setup() {
|
||||
@ -54,10 +54,10 @@ public class SetType extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
import bskyblock.addon.challenges.ChallengesAddon;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
/**
|
||||
* Enables the state of a Surrounding Challenge to be stored as it is built
|
||||
|
@ -5,9 +5,9 @@ package bskyblock.addon.challenges.commands.admin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import us.tastybento.bskyblock.BSkyBlock;
|
||||
import us.tastybento.bskyblock.api.commands.CompositeCommand;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import bskyblock.addon.challenges.ChallengesAddon;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
/**
|
||||
* @author tastybento
|
||||
@ -20,7 +20,7 @@ public class TakeItems extends CompositeCommand {
|
||||
* @param label
|
||||
* @param string
|
||||
*/
|
||||
public TakeItems(BSkyBlock plugin, String label, String... string) {
|
||||
public TakeItems(ChallengesAddon plugin, String label, String... string) {
|
||||
super(plugin, label, string);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
@ -45,7 +45,7 @@ public class TakeItems extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#setup()
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#setup()
|
||||
*/
|
||||
@Override
|
||||
public void setup() {
|
||||
@ -54,10 +54,10 @@ public class TakeItems extends CompositeCommand {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.BSBCommand#execute(us.tastybento.bskyblock.api.commands.User, java.util.List)
|
||||
* @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
@ -6,8 +6,8 @@ import java.util.List;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import bskyblock.addon.challenges.ChallengesManager;
|
||||
import us.tastybento.bskyblock.api.configuration.ConfigComment;
|
||||
import us.tastybento.bskyblock.database.objects.DataObject;
|
||||
import world.bentobox.bentobox.api.configuration.ConfigComment;
|
||||
import world.bentobox.bentobox.database.objects.DataObject;
|
||||
|
||||
/**
|
||||
* Represent a challenge level
|
||||
|
@ -13,8 +13,8 @@ import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import bskyblock.addon.challenges.ChallengesManager;
|
||||
import us.tastybento.bskyblock.api.configuration.ConfigComment;
|
||||
import us.tastybento.bskyblock.database.objects.DataObject;
|
||||
import world.bentobox.bentobox.api.configuration.ConfigComment;
|
||||
import world.bentobox.bentobox.database.objects.DataObject;
|
||||
|
||||
/**
|
||||
* Data object for challenges
|
||||
@ -202,7 +202,7 @@ public class Challenges implements DataObject {
|
||||
* @return the icon
|
||||
*/
|
||||
public ItemStack getIcon() {
|
||||
return icon.clone();
|
||||
return icon != null ? icon.clone() : new ItemStack(Material.MAP);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -12,8 +12,8 @@ import org.bukkit.World;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
|
||||
import us.tastybento.bskyblock.database.objects.DataObject;
|
||||
import us.tastybento.bskyblock.util.Util;
|
||||
import world.bentobox.bentobox.database.objects.DataObject;
|
||||
import world.bentobox.bentobox.util.Util;
|
||||
|
||||
/**
|
||||
* Stores the player's challenge situation
|
||||
@ -75,7 +75,7 @@ public class PlayerData implements DataObject {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.database.objects.DataObject#getUniqueId()
|
||||
* @see world.bentobox.bbox.database.objects.DataObject#getUniqueId()
|
||||
*/
|
||||
@Override
|
||||
public String getUniqueId() {
|
||||
@ -83,7 +83,7 @@ public class PlayerData implements DataObject {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.database.objects.DataObject#setUniqueId(java.lang.String)
|
||||
* @see world.bentobox.bbox.database.objects.DataObject#setUniqueId(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void setUniqueId(String uniqueId) {
|
||||
|
@ -15,11 +15,11 @@ import bskyblock.addon.challenges.LevelStatus;
|
||||
import bskyblock.addon.challenges.commands.ChallengesCommand;
|
||||
import bskyblock.addon.challenges.database.object.Challenges;
|
||||
import bskyblock.addon.challenges.database.object.Challenges.ChallengeType;
|
||||
import us.tastybento.bskyblock.api.panels.Panel;
|
||||
import us.tastybento.bskyblock.api.panels.PanelItem;
|
||||
import us.tastybento.bskyblock.api.panels.builders.PanelBuilder;
|
||||
import us.tastybento.bskyblock.api.panels.builders.PanelItemBuilder;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import world.bentobox.bentobox.api.panels.Panel;
|
||||
import world.bentobox.bentobox.api.panels.PanelItem;
|
||||
import world.bentobox.bentobox.api.panels.builders.PanelBuilder;
|
||||
import world.bentobox.bentobox.api.panels.builders.PanelItemBuilder;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
|
||||
public class ChallengesPanels {
|
||||
@ -122,7 +122,7 @@ public class ChallengesPanels {
|
||||
if (status.isUnlocked()) {
|
||||
// Clicking on this icon will open up this level's challenges
|
||||
PanelItem item = new PanelItemBuilder()
|
||||
.icon(new ItemStack(Material.BOOK_AND_QUILL))
|
||||
.icon(new ItemStack(Material.ENCHANTED_BOOK))
|
||||
.name(name)
|
||||
.description(manager.stringSplit(user.getTranslation("challenges.navigation","[level]",name)))
|
||||
.clickHandler((p, u, c, s) -> {
|
||||
@ -218,7 +218,7 @@ public class ChallengesPanels {
|
||||
if (expReward > 0) {
|
||||
result.addAll(splitTrans(user,"challenges.exp-reward", "[reward]", String.valueOf(expReward)));
|
||||
}
|
||||
if (addon.getBSkyBlock().getSettings().isUseEconomy() && moneyReward > 0) {
|
||||
if (addon.getPlugin().getSettings().isUseEconomy() && moneyReward > 0) {
|
||||
result.addAll(splitTrans(user,"challenges.money-reward", "[reward]", String.valueOf(moneyReward)));
|
||||
}
|
||||
// Final placeholder change for [label]
|
||||
|
@ -4,8 +4,8 @@ import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.inventory.InventoryCloseEvent;
|
||||
|
||||
import bskyblock.addon.challenges.ChallengesAddon;
|
||||
import us.tastybento.bskyblock.api.panels.PanelListener;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import world.bentobox.bentobox.api.panels.PanelListener;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
public class CreateChallengeListener implements PanelListener {
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
package bskyblock.addon.challenges.panel;
|
||||
|
||||
import bskyblock.addon.challenges.ChallengesAddon;
|
||||
import us.tastybento.bskyblock.api.panels.builders.PanelBuilder;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import world.bentobox.bentobox.api.panels.builders.PanelBuilder;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
public class CreateChallengePanel {
|
||||
|
||||
|
@ -20,8 +20,8 @@ import bskyblock.addon.challenges.commands.ChallengesCommand;
|
||||
import bskyblock.addon.challenges.database.object.Challenges;
|
||||
import bskyblock.addon.challenges.database.object.Challenges.ChallengeType;
|
||||
import bskyblock.addon.level.Level;
|
||||
import us.tastybento.bskyblock.api.user.User;
|
||||
import us.tastybento.bskyblock.util.Util;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
import world.bentobox.bentobox.util.Util;
|
||||
|
||||
/**
|
||||
* Run when a user tries to complete a challenge
|
||||
|
@ -13,7 +13,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.inventory.ItemFactory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.PotionMeta;
|
||||
@ -93,25 +92,6 @@ public class ParseItemTest {
|
||||
test = new ParseItem(addon, "STONE:1:").getItem();
|
||||
assertNotNull(test); // This is okay, it's just a 2
|
||||
|
||||
// Material
|
||||
for (Material mat : Material.values()) {
|
||||
test = new ParseItem(addon, mat.name() + ":5:5").getItem();
|
||||
if (test.getType().toString().endsWith("_ITEM") && !mat.toString().endsWith("_ITEM")) {
|
||||
assertEquals(mat.toString() + "_ITEM", test.getType().toString());
|
||||
assertEquals(5, test.getDurability());
|
||||
} else {
|
||||
assertEquals(mat, test.getType());
|
||||
assertEquals(5, test.getDurability());
|
||||
}
|
||||
}
|
||||
// Test spawn eggs
|
||||
for (EntityType ent : EntityType.values()) {
|
||||
if (ent.isSpawnable()) {
|
||||
test = new ParseItem(addon, "MONSTER_EGG:" + ent.name() + ":3").getItem();
|
||||
assertEquals(Material.MONSTER_EGG, test.getType());
|
||||
assertEquals(3, test.getAmount());
|
||||
}
|
||||
}
|
||||
// Test Potions
|
||||
PotionMeta itemMeta = mock(PotionMeta.class);
|
||||
when(itemFactory.getItemMeta(any())).thenReturn(itemMeta);
|
||||
|
Loading…
Reference in New Issue
Block a user