Skip to content

Commit

Permalink
Merge pull request #61
Browse files Browse the repository at this point in the history
Spigot | Fix bugs related to silent chest feature
  • Loading branch information
Syrent authored Dec 10, 2022
2 parents a9d499e + 16b3be9 commit c8b21f0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=3.10.0
version=3.10.1
plugin-name=VelocityVanish
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class PlayerInteractListener(
fun onChestOpen(event: PlayerInteractEvent) {
if (!Settings.silenOpenContainer) return

if (event.action != Action.RIGHT_CLICK_BLOCK) return
val block = event.clickedBlock ?: return
val player = event.player

Expand All @@ -55,8 +56,14 @@ class PlayerInteractListener(
if (!silentInventoryMaterials.contains(block.type)) return

val gamemode = player.gameMode
val flight = player.allowFlight
val fly = player.isFlying
player.allowFlight = true
player.isFlying = true
player.gameMode = GameMode.SPECTATOR
Ruom.runSync({
player.gameMode = gamemode
}, 2)
player.allowFlight = flight
player.isFlying = fly
}, 1)
}}
2 changes: 1 addition & 1 deletion src/main/resources/languages/en_US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ command:
use_vanish: "$successful_prefix <gradient:dark_green:green>Successfully vanished!"
use_unvanish: "$successful_prefix <gradient:dark_green:green>Successfully unvanished!"
vanish:
actionbar: "<dark_red>$animation <gradient:dark_purple:blue>You are invisible to other players!"
actionbar: "<white>$animation <gradient:gray:white>You are invisible to other players!"
vanish_notify: "$warn_prefix <red>$player</red> Vanished!"
unvanish_notify: "$warn_prefix <red>$player</red> Unvanished!"
join_message: "<yellow>$player joined the game"
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/velocity-plugin.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":"velocityvanish","name":"VelocityVanish","version":"3.10.0","description":"Vanish plugin for velocity servers","url":"syrent.ir","authors":["Syrent"],"dependencies":[],"main":"ir.syrent.velocityvanish.velocity.VelocityVanish"}
{"id":"velocityvanish","name":"VelocityVanish","version":"3.10.1","description":"Vanish plugin for velocity servers","url":"syrent.ir","authors":["Syrent"],"dependencies":[],"main":"ir.syrent.velocityvanish.velocity.VelocityVanish"}

0 comments on commit c8b21f0

Please sign in to comment.