DRE2N / DungeonsXL

Create custom dungeons and adventure maps with ease!
https://www.spigotmc.org/resources/dungeonsxl.9488/
GNU General Public License v3.0
154 stars 83 forks source link

Player Items Lost while Disconnected in Dungeon #753

Open TheRealTamama opened 4 years ago

TheRealTamama commented 4 years ago

Description OK basically player lost his items after he dc in the dungeon.

Reproduce Player was reporting a exploit in one of my dungeons, so... 1)I joined in a group (group sign) with him. 2)Entered the portal (this dungeon was tested and it was fine until now) ~linked the Floor config bellow~ 3)Ok so we entered, i checked out the thing and so i left he dungeon with /dxl leave command. 4)He's still in there and he Disconnected after being in there a while after i left.

Expected behavior Player reconnected with none of the saved inventory items. No error was logged in the console. And after reconnecting, he said he cannot interact with the [End] Sign after retrying to play the dungeon.

Relevant configuration files Gamemode was: Default Single Floor Dungeon with Teleport command blocks.

##############
##GAME RULES##
##############
# If the Lobby is disabled. This applies only to Dungeons that have to be solved
# alone and where there are no classes to choose from.
isLobbyDisabled: false

# Time until a player is kicked from this dungeon after going offline (in seconds)
# -1 = never / 0 = immediately
timeUntilKickOfflinePlayer: 10000

# Time in hours until a player can play this dungeon again
# This prevents players from playing the dungeon again if they started the dungeon,
# no matter if they finished, left it or got kicked.
timeToNextPlayAfterStart: 0

# This only prevents players from playing the dungeon again if they finished it correctly.
# If they leave it or get kicked, players can always retry a dungeon.
timeToNextPlayAfterFinish: 0

# Time until a player can get loot for another time
timeToNextLoot: 1

# Time until a new mob waves begins when enough mobs are killed.
timeToNextWave: 1

# Dungeons can be played with a timer.
# If the group has no time left, the players get kicked.
timeToFinish: 0

# The game mode, SURVIVAL if nothing
gameMode: ADVENTURE

# If players may fly.
fly: false

# PvP
playerVersusPlayer: true
# Friendly fire refers just to members of the same group
friendlyFire: false

# These commands can be used by all players if they are in the dungeon.
# DXL commands like /dxl leave are included by default.
gameCommandWhitelist:
  - version
  - f list
  - f show
  - ch global

# MAKE SURE YOU EDIT THIS PART!
# One of these Dungeons must be finished ("any" for any dungeon).
# If you do not want any, leave this empty.
mustFinishOne:

# All of these Dungeons must be finished. If you do not want any, leave this empty.
mustFinishAll:

# Max time in hours after the last finish of one of the Dungeons above
timeLastPlayed: 0

# A list of requirements
# Note that requirements will be ignored if the player has the
# dxl.ignorerequirements permission node.
requirements:
  feeMoney: 0
  feeLevel: 0
  # If the group has too many or not enough members, the players will not be allowed to use the ready sign.
  groupSize:
    minimum: 1
    maximum: 10
  # Players must have these permission nodes to enter the dungeon:
  permission:
  # Items that may not be taken into the dungeon
  forbiddenItems:
    - IRON_SWORD
  # Items the player must have to play the dungeon
  keyItems:

# Shall players play the dungeon with their own items or do you want to use classes?
keepInventoryOnEnter: false
# Shall players lose their items when they die (do not mix up this with "onEscape"!)?
keepInventoryOnDeath: true
# Shall players keep their inventory when they finish the dungeon?
keepInventoryOnFinish: false
# Shall players keep their inventory when they leave the dungeon without succeeding?
keepInventoryOnEscape: false

# If players can build and destroy blocks in this world.
breakBlocks: false
# If players may destroy blocks they placed themselves.
breakPlacedBlocks: true
# A whitelist of breakable blocks.
# breakBlocks is supposed to be set to "true" if this should be used.
breakWhitelist:
  # A material value and a list of all tools that can destroy this block
  SPONGE: ["IRON_PICKAXE", "STICK"]
  # Dirt blocks can be destroyed with any tool
  DIRT: []

# A list of all entity types that shall be protected from damage.
# If this is left out AND if breakBlocks is false, armor stands, paintings
# and item frames will be protected by default.
# If this is left out and if breakBlocks is true, nothing will be protected by default.
damageProtectedEntities:
- SLIME
- PAINTING
# A list of all entity types 
# If this is left out AND if breakBlocks is false, armor stands
# and item frames will be protected by default.
# If this is left out and if breakBlocks is true, nothing will be protected by default.
interactionProtectedEntities:
- ARMOR_STAND

placeBlocks: true
# A whitelist of placeable blocks.
# placeBlocks is supposed to be set to "true" if this should be used.
placeWhitelist:
  - SPONGE

# Amount of lives a player initially has when he enters a dungeon
initialLives: 99999
# Alternatively, you can use group lives.
initialGroupLives: 99999

# Messages also to be created with /dxl msg
message:
  '1': Welcome to Frog's Dungeon!
  '2': Have a painful time!

# Items you cannot drop or destroy
secureObjects:
- 69

# A list of permissions players get while they play the game.
# The permissions get removed as soon as the player leaves the game.
# Requires Vault and a permissions plugin like PermissionsEx.
gamePermissions:
  - dxl.reload
  - another.node

# Use this to replace the default ready / new floor message.
# This is fully compatible with the override system.
# If titles are deactivated in the main config, this is not going to work.
title:
  title: "&2Frog's Parkour"
  subtitle: "&6are you ready for pain?"
  actionBar: "&aYou only get rewarded after leaving"
  chat: "&bWelcome to Frog's Dungeon"
  # How long shall the title be visible (seconds)?
  # The title works without these three options.
  fadeIn: 1.0
  show: 3.0
  fadeOut: 1.0

# If it should rain permanently in the dungeon
# true = permanent rain
# false = permanent sun
# leaving this out = random weather like in vanilla Minecraft
rain: false

# Same principle as above but for thunderstorms
thunder: false

# The time ticks (to be used like in the vanilla /time command)
time: 20000
Sataniel98 commented 4 years ago

Thank you for the report, I'll try to reproduce it.

TheRealTamama commented 4 years ago

Yee, sure thx. This is also a odd issue and apparently it doesnt happen to everyone. Might be because i prematurely done /dxl leave while in a group with him. Not sure tho just a theory.