ScreamingSandals / BedWars

Simple BedWars minigame plugin for Spigot version 1.8.8 - 1.21.1
https://www.spigotmc.org/resources/bedwars.63714/
GNU Lesser General Public License v3.0
263 stars 94 forks source link

Cant enable Bedwars #183

Closed MarekkXD closed 4 years ago

MarekkXD commented 4 years ago

Enabling Bedwars Fails

Server and plugin version

Spigot version: 1.14.4 BedWars version: 0.2.7

Installed plugins on server

BkCommonLib - 1.14.4 CommandSigns Essentials Minigameslib My_Worlds Vault WorldEdit

Console log

[BedWars] Enabling BedWars v0.2.7 [10:49:30] [Server thread/INFO]: [BedWars] Successfully loaded messages for BedWars! Language: English [10:49:30] [Server thread/INFO]: [BedWars] Loading statistics from YAML-File ... [10:49:31] [Server thread/ERROR]: Error occurred while enabling BedWars v0.2.7 (Is it up to date?) java.lang.NullPointerException: null at org.screamingsandals.bedwars.lib.sgui.utils.StackParser.parseLongStack(StackParser.java:277) ~[?:?] at org.screamingsandals.bedwars.lib.sgui.utils.StackParser.parse(StackParser.java:46) ~[?:?] at org.screamingsandals.bedwars.lib.sgui.SimpleInventories.generateItem(SimpleInventories.java:699) ~[?:?] at org.screamingsandals.bedwars.lib.sgui.SimpleInventories.generateItem(SimpleInventories.java:881) ~[?:?] at org.screamingsandals.bedwars.lib.sgui.SimpleInventories.generateData(SimpleInventories.java:317) ~[?:?] at org.screamingsandals.bedwars.inventories.ShopInventory.loadNewShop(ShopInventory.java:283) ~[?:?] at org.screamingsandals.bedwars.inventories.ShopInventory.(ShopInventory.java:141) ~[?:?] at org.screamingsandals.bedwars.Main.onEnable(Main.java:450) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[minecraft_server.jar:git-Spigot-cbd1a1b-009d8af] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:352) [minecraft_server.jar:git-Spigot-cbd1a1b-009d8af] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:417) [minecraft_server.jar:git-Spigot-cbd1a1b-009d8af] at org.bukkit.craftbukkit.v1_14_R1.CraftServer.enablePlugin(CraftServer.java:461) [minecraft_server.jar:git-Spigot-cbd1a1b-009d8af] at org.bukkit.craftbukkit.v1_14_R1.CraftServer.enablePlugins(CraftServer.java:375) [minecraft_server.jar:git-Spigot-cbd1a1b-009d8af] at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:449) [minecraft_server.jar:git-Spigot-cbd1a1b-009d8af] at net.minecraft.server.v1_14_R1.DedicatedServer.init(DedicatedServer.java:266) [minecraft_server.jar:git-Spigot-cbd1a1b-009d8af] at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:775) [minecraft_server.jar:git-Spigot-cbd1a1b-009d8af] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]

Configuration (of config.yml and shop.yml)

data:

- stack:

type: GOLDEN_APPLE

amount: 1

meta:

==: ItemMeta

meta-type: UNSPECIFIC

display-name: "Example category"

lore:

- "This is my category!"

- "Please buy things inside!"

items:

- price: 50

price-type: "bronze"

stack:

type: DIAMOND_SWORD

amount: 1

meta:

==: ItemMeta

meta-type: UNSPECIFIC

enchants:

DAMAGE_ALL: 2

repair-cost: 1

Damage: 99

Value 'applycolorbyteam' is used for automatic-coloring-in-shop.

See WarpPowder for more info.

locale: en debug: false allow-crafting: false keep-inventory-on-death: false in-lobby-colored-leather-by-team: true jointeam-entity-show-name: true friendlyfire: false player-drops: true join-randomly-after-lobby-timeout: false prevent-killing-villagers: true compass-enabled: true join-randomly-on-lobby-join: false add-wool-to-inventory-on-join: true prevent-spawning-mobs: true spawner-holograms: true spawner-disable-merge: true prevent-lobby-spawn-mobs-in-radius: 16 spawner-holo-height: 0.25 spawner-holograms-countdown: true damage-when-player-is-not-in-arena: false remove-unused-target-blocks: true allow-block-falling: true game-start-items: false player-respawn-items: false gived-game-start-items: [] gived-player-respawn-items: [] disable-hunger: false automatic-coloring-in-shop: true sell-max-64-per-click-in-shop: true destroy-placed-blocks-by-explosion-except: '' destroy-placed-blocks-by-explosion: true holo-above-bed: true allow-spectator-join: false disable-server-message: true player-join: false player-leave: false respawn-cooldown: enabled: true time: 5 stop-team-spawners-on-die: false allowed-commands: [] change-allowed-commands-to-blacklist: false bungee: enabled: false serverRestart: true serverStop: false server: hub auto-game-connect: false farmBlocks: enable: false blocks: [] scoreboard: enable: true title: §a%game%§r - %time% bedLost: §c✘ bedExists: §a✔ teamTitle: '%bed%%color%%team%' title: fadeIn: 0 stay: 20 fadeOut: 0 items: jointeam: COMPASS leavegame: SLIME_BALL startgame: DIAMOND shopback: BARRIER shopcosmetic: GRAY_STAINED_GLASS_PANE pageback: ARROW pageforward: ARROW team-select: WHITE_WOOL vault: enable: true reward: kill: 5 win: 20 resources: gold: material: GOLD_INGOT color: GOLD name: Gold interval: 20 translate: resource_gold spread: 1.0 iron: material: IRON_INGOT color: GRAY name: Iron interval: 10 translate: resource_iron spread: 1.0 bronze: material: BRICK color: DARK_RED name: Bronze interval: 1 translate: resource_bronze spread: 1.0 respawn: protection-enabled: true protection-time: 10 specials: action-bar-messages: true rescue-platform: is-breakable: false delay: 0 break-time: 10 distance: 1 material: GLASS protection-wall: is-breakable: false delay: 20 break-time: 0 width: 5 height: 3 distance: 2 material: CUT_SANDSTONE tnt-sheep: speed: 2.0 follow-range: 10.0 max-target-distance: 32 explosion-time: 8 arrow-blocker: protection-time: 10 delay: 5 warp-powder: teleport-time: 6 delay: 0 magnet-shoes: probability: 75 golem: speed: 0.25 follow-range: 10 health: 20 name-format: '%teamcolor%%team% Golem' show-name: true delay: 0 collidable: false teamchest: turn-all-enderchests-to-teamchests: true throwable-fireball: explosion: 3.0 tnt: auto-ignite: false explosion-time: 8 sounds: on_bed_destroyed: ENTITY_ENDER_DRAGON_GROWL on_countdown: UI_BUTTON_CLICK on_game_start: ENTITY_PLAYER_LEVELUP on_team_kill: ENTITY_PLAYER_LEVELUP on_player_kill: ENTITY_PLAYER_BIG_FALL on_item_buy: ENTITY_ITEM_PICKUP on_upgrade_buy: ENTITY_EXPERIENCE_ORB_PICKUP on_respawn_cooldown_wait: UI_BUTTON_CLICK on_respawn_cooldown_done: ENTITY_PLAYER_LEVELUP game-effects: end: effects:

iamceph commented 4 years ago

Not a bug, you have invalid shop.yml or shop.yml..

iamceph commented 4 years ago

Also, old version.

MarekkXD commented 4 years ago

But what is invalid. About version, it worked just fine and suddenly it didnt

iamceph commented 4 years ago

I don't know, I can't magically see your configuration and look into it. The error is saying that you have something invalid in your shop or config.yml

JustGregGithub commented 4 years ago

lmao

MarekkXD commented 4 years ago

That is exactly what i am asking. I did some changes but i reverted most of them, writing looks absolutely fine and it just stopped working when i tried to re-enable it

JustGregGithub commented 4 years ago

put it through http://www.yamllint.com/

JustGregGithub commented 4 years ago

and check https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html for material names

iamceph commented 4 years ago

Null pointer happens when something is null, like empty enchants: category and so on. This is not a bug

MarekkXD commented 4 years ago

Thank you! Shop looked fine. There was 1 problem in config where were blank spaces. Hope it will work now. Will let you know.

MarekkXD commented 4 years ago

Well, still :

[22:13:53] [Server thread/INFO]: [BedWars] Enabling BedWars v0.2.7 [22:14:01] [Server thread/INFO]: [BedWars] Successfully loaded messages for BedWars! Language: English [22:14:01] [Server thread/INFO]: [BedWars] Loading statistics from YAML-File ... [22:14:01] [Server thread/ERROR]: Error occurred while enabling BedWars v0.2.7 (Is it up to date?) java.lang.NullPointerException: null at org.screamingsandals.bedwars.lib.sgui.utils.StackParser.parseLongStack(StackParser.java:277) ~[?:?] at org.screamingsandals.bedwars.lib.sgui.utils.StackParser.parse(StackParser.java:46) ~[?:?] at org.screamingsandals.bedwars.lib.sgui.SimpleInventories.generateItem(SimpleInventories.java:699) ~[?:?] at org.screamingsandals.bedwars.lib.sgui.SimpleInventories.generateItem(SimpleInventories.java:881) ~[?:?] at org.screamingsandals.bedwars.lib.sgui.SimpleInventories.generateData(SimpleInventories.java:317) ~[?:?] at org.screamingsandals.bedwars.inventories.ShopInventory.loadNewShop(ShopInventory.java:283) ~[?:?] at org.screamingsandals.bedwars.inventories.ShopInventory.(ShopInventory.java:141) ~[?:?] at org.screamingsandals.bedwars.Main.onEnable(Main.java:450) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[minecraft_server.jar:git-Spigot-cbd1a1b-009d8af] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:352) [minecraft_server.jar:git-Spigot-cbd1a1b-009d8af] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:417) [minecraft_server.jar:git-Spigot-cbd1a1b-009d8af] at org.bukkit.craftbukkit.v1_14_R1.CraftServer.enablePlugin(CraftServer.java:461) [minecraft_server.jar:git-Spigot-cbd1a1b-009d8af] at org.bukkit.craftbukkit.v1_14_R1.CraftServer.enablePlugins(CraftServer.java:375) [minecraft_server.jar:git-Spigot-cbd1a1b-009d8af] at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:449) [minecraft_server.jar:git-Spigot-cbd1a1b-009d8af] at net.minecraft.server.v1_14_R1.DedicatedServer.init(DedicatedServer.java:266) [minecraft_server.jar:git-Spigot-cbd1a1b-009d8af] at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:775) [minecraft_server.jar:git-Spigot-cbd1a1b-009d8af] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]

iamceph commented 4 years ago

You have some error in your shop.yml. Probably empty enchants: shit or so on

MarekkXD commented 4 years ago

I have no idea, checked it like 5 times already but i really do not know.

MarekkXD commented 4 years ago

Can i find default shop from this version somewhere ?

iamceph commented 4 years ago

Delete current shop.yml, plugin will generate new one