Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when kicking player from island #1950

Closed
Parlamentum opened this issue Mar 17, 2022 · 2 comments
Closed

Error when kicking player from island #1950

Parlamentum opened this issue Mar 17, 2022 · 2 comments
Assignees
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Bug

Comments

@Parlamentum
Copy link

Parlamentum commented Mar 17, 2022

Expected behavior

Not getting an error when kicking a player from the island XD

Observed/Actual behavior

I am getting an error when kicking a player from the island https://ghostbin.com/JkAS7

[22:16:55] [Server thread/INFO]: noamgrt issued server command: /is team kick _ImNotRon
[22:16:55] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing 'is team kick _ImNotRon' in world.bentobox.bskyblock.BSkyBlock$1(island)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:182) ~[patched_1.17.1.jar:git-Purpur-1428]
        at org.bukkit.craftbukkit.v1_17_R1.CraftServer.dispatchCommand(CraftServer.java:869) ~[patched_1.17.1.jar:git-Purpur-1428]
        at net.minecraft.server.network.PlayerConnection.handleCommand(PlayerConnection.java:2344) ~[patched_1.17.1.jar:git-Purpur-1428]
        at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2155) ~[patched_1.17.1.jar:git-Purpur-1428]
        at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2136) ~[patched_1.17.1.jar:git-Purpur-1428]
        at net.minecraft.network.protocol.game.PacketPlayInChat.a(PacketPlayInChat.java:46) ~[patched_1.17.1.jar:git-Purpur-1428]
        at net.minecraft.network.protocol.game.PacketPlayInChat.a(PacketPlayInChat.java:6) ~[patched_1.17.1.jar:git-Purpur-1428]
        at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$ensureRunningOnSameThread$1(PlayerConnectionUtils.java:56) ~[patched_1.17.1.jar:git-Purpur-1428]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[patched_1.17.1.jar:git-Purpur-1428]
        at net.minecraft.util.thread.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:149) ~[patched_1.17.1.jar:git-Purpur-1428]
        at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.executeTask(IAsyncTaskHandlerReentrant.java:23) ~[patched_1.17.1.jar:git-Purpur-1428]
        at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer.java:1450) ~[patched_1.17.1.jar:git-Purpur-1428]
        at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer.java:192) ~[patched_1.17.1.jar:git-Purpur-1428]
        at net.minecraft.util.thread.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:122) ~[patched_1.17.1.jar:git-Purpur-1428]
        at net.minecraft.server.MinecraftServer.bf(MinecraftServer.java:1428) ~[patched_1.17.1.jar:git-Purpur-1428]
        at net.minecraft.server.MinecraftServer.executeNext(MinecraftServer.java:1421) ~[patched_1.17.1.jar:git-Purpur-1428]
        at net.minecraft.util.thread.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:132) ~[patched_1.17.1.jar:git-Purpur-1428]
        at net.minecraft.server.MinecraftServer.sleepForTick(MinecraftServer.java:1399) ~[patched_1.17.1.jar:git-Purpur-1428]
        at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1310) ~[patched_1.17.1.jar:git-Purpur-1428]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:322) ~[patched_1.17.1.jar:git-Purpur-1428]
        at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.NullPointerException: User is not a player!
        at java.util.Objects.requireNonNull(Objects.java:233) ~[?:?]
        at world.bentobox.bentobox.api.user.User.getPlayer(User.java:215) ~[?:?]
        at world.bentobox.bentobox.managers.PlayersManager.cleanLeavingPlayer(PlayersManager.java:581) ~[?:?]
        at world.bentobox.bentobox.api.commands.island.team.IslandTeamKickCommand.kick(IslandTeamKickCommand.java:100) ~[?:?]
        at world.bentobox.bentobox.api.commands.island.team.IslandTeamKickCommand.execute(IslandTeamKickCommand.java:76) ~[?:?]
        at world.bentobox.bentobox.api.commands.CompositeCommand.call(CompositeCommand.java:273) ~[?:?]
        at world.bentobox.bentobox.api.commands.CompositeCommand.execute(CompositeCommand.java:246) ~[?:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:172) ~[patched_1.17.1.jar:git-Purpur-1428]
        ... 20 more

Steps/models to reproduce

Kick a player from the island using /is team kick {username}

BentoBox version

Loaded Game Worlds:
bskyblock_world (BSkyBlock): bskyblock_world, bskyblock_world_nether, bskyblock_world_the_end
Loaded Addons:
Bank 1.4.0 (ENABLED)
Biomes 2.0.0 (ENABLED)
BSkyBlock 1.15.2 (ENABLED)
Challenges 1.0.0-SNAPSHOT-b475 (ENABLED)
Chat 1.1.4 (ENABLED)
ControlPanel 1.13.0 (ENABLED)
DimensionalTrees 1.6.0 (ENABLED)
Level 2.9.0 (ENABLED)
Limits 1.19.0 (ENABLED)
Warps 1.11.2 (ENABLED)

Plugin list

Plugins (53): antiRedstoneClock, ArmorStandTools, AuctionMaster, BannerBoard*, BentoBox, BookLimiter, BossShopPro, BountyHunters, BuycraftX, ChangeSlots, ChatPing*, Citizens, CombatLogX, CoreProtect, CrazyCrates, Essentials, EssentialsChat, EssentialsSpawn, ForceResourcepacks (WorldResourcepacks), GCore, GoldenChallenges, HoloExtension, HolographicDisplays, HungerKeeperPlus*, Interactions, InteractiveBoard, JetsMinions, LimitedUses*, LuckPerms, MineableSpawners, NexEngine, OpenInv, §cParlaJoinMessages, pitem, PlaceholderAPI, PlugMan, PremiumVanish, ProtocolLib, ServerSigns, ShopGUIPlus, ShopGUIPlusMineableSpawnersBridge, SirBlobmanCore (SirBlobmanAPI, XSeries), spark, TAB, TradePlus, Vault, ViaVersion, VillagerMarket, VoidGen, VoidSpawn, WorldEdit, WorldGuard, WorldGuardExtraFlags

Other

The error i get when a player kicks another player: https://ghostbin.com/JkAS7

@tastybento tastybento self-assigned this Mar 18, 2022
@tastybento
Copy link
Member

What version of BentoBox are you running? Do /bbox version and share the output.

@tastybento tastybento added the Status: In progress Working on the issue. label Mar 18, 2022
@tastybento
Copy link
Member

I think I see the issue - this is when kicking an offline player it looks like.

tastybento added a commit that referenced this issue Mar 18, 2022
@tastybento tastybento added Status: Done This issue has been completed or answered. This pull request has been merged. and removed Status: In progress Working on the issue. labels Mar 18, 2022
tastybento added a commit that referenced this issue Apr 17, 2022
* Version 1.20.1

* Added name of the addon causing the issue.

#1944

* Use world min-height for island bounding box.

* Fixes a bug when fallback could not use reusable

There was an issue in PanelItemTemplate that prevented fallback buttons to be "reusable" things.
The issue was that reusable items were not passed to the panel item reader.

* Adjusted test to try to avoid errors

* Fix for random test failures.

* Added 1.18.2 support

* Address unnecessary PVP reports on each teleport (#1948)

If a player is teleporting on the same island in the same dimension, it keeps spamming that PVP is enabled in dimension. 
It should be enough with sending messages when the player teleports to the island.

Fixes #1885

* Fixes bug with Safe Spot Teleport (#1951)

There was a bug that prevented finding a safe spot if all valid blocks were in height with the `startY` location.

Reported via discord.

* Fix Exception error reported by IDE

I am not sure why Eclipse is saying this is an error.

* Fix for kicking offline players

#1950

* Add an option in SafeSpotTeleport to cancel if fail (#1952)

There was no option to cancel teleportation if SafeSpotTeleport could not find a valid spot. This option could be used to avoid creating "backup" blocks in situations when teleportation is avoidable, f.e. visiting an island.

* Replace peplaceAll with replace

It does the same thing if the first argument is not a regex.

* Use constants for common strings

* Use constants for common strings

* Go back to replaceAll

This is required.

* Clearer paster (#1953)

* WIP - make easier to understand.

* Small refactor of paster to make it easier to understand

* Fix tabs to spaces. Sorry - new editor!

* Fix tabs to spaces

* Fix tab to spaces

* Improve team kick command (#1957)

The kick command has an unnecessary owner check. As command should be configurable by island owners, then limiting it to an owner is wrong.
Add a code that allows kicking only lower-ranked players.

Add message that shows who kicked from the island.
Add message that shows that rank does not allow to kick.

* Solve crashes with Addon#allLoaded call (#1959)

If some addon has code in Addon#allLoaded that crashes the call, then it did not disable addon as well as did not call allLoaded for every other addon that was left in the list.

This should be solved by adding an extra try-catch.

* using java 16 syntax (#1958)

* Fixes kick command (#1960)

PR #1957 broke kick command and noone could kick players from teams.
This should fix it.

* Fixes a bug with blueprint height (#1961)

Blueprint clipboard was preventing setting Y below 0 or above 255. 

The code was not adjusted to 1.18 changes.
Reported via discord.

* Fixes Lava Duplication Glitch (#1964)

Due to the fact, that Obsidian Scooping uses one tick delay to remove obsidian, a player with a bucket in hand and offhand duplicated lava. 
To avoid that, added an extra check that ignores the interact event if a player holds a bucket in both hands, and interacted hand is offhand.

Fixes #1963

* Fixes failures in obsidian cooping listener. (#1965)

Failures happened after implementing #1964

Co-authored-by: BONNe <bonne@bonne.id.lv>
Co-authored-by: Invvk <70810073+Invvk@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants