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

Spigot | Fix bugs related to silent chest feature #61

Merged
merged 2 commits into from Dec 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
@@ -1,2 +1,2 @@
version=3.10.0
version=3.10.1
plugin-name=VelocityVanish
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
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
@@ -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"}