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

Using reset and reset-all without permission #54

Open
krokha-konstantin opened this issue Jul 27, 2024 · 2 comments
Open

Using reset and reset-all without permission #54

krokha-konstantin opened this issue Jul 27, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@krokha-konstantin
Copy link

krokha-konstantin commented Jul 27, 2024

Any players can use reset commands. I haven't given anyone permission and I can't even forbid them using luckperms. Other commands work as intended (only used by op or if given permission by luckperms)

git-Purpur-2176 (MC: 1.20.4)
SpentTime version 1.0.7

Config file:

#
# Configuration file for the SpentTime plugin.
#
# If you have a problem with plugin configuration, please create an issue on the project's github.
# However, if you like the plugin, leave a star for the project on GitHub.
# 
# Support site: https://github.com/imDMK/SpentTime/issues/new/choose
# GitHub: https://github.com/imDMK/SpentTime
#
# Check for plugin update after the administrator join to server?
checkForUpdate: true
# Specifies how often the player's spent time should be saved in the database
# Including a spent time top update
# Recommended value: 10m
spentTimeSaveDelay: 10m
#
# Gui settings
#
guiSettings:
  # This determines how many players are to be displayed in the player top
  # WARNING: Increasing this value may increase the consumption of database server resources
  # Recommended value: 10
  querySize: 20
  # The type of gui
  # Available types:
  # DISABLED - The list of players will be sent in the chat
  # STANDARD - Standard Gui that should be used when the player list does not exceed 10
  # PAGINATED - A Gui with pages that allow you to move between pages through items
  # SCROLLING - A Gui that allows you to scroll through items
  type: DISABLED
  # The title of spent time gui
  title: "<red>Топ проведённого времени<dark_gray>:"
  #
  # Gui item settings
  #
  guiItemSettings:
    # The head item name
    # {PLAYER} - The player name
    # {POSITION} - The player position
    # {TIME} - The player time
    headName: "<!italic><red>{POSITION}. <gray>Игрок <red>{PLAYER}"
    # The head item default lore
    headLore:
    - ""
    - "<!italic><green>Игрок провёл <red>{TIME} <green>на сервере<dark_gray>."
    - ""
    # The head item lore displayed when a player has permission to reset a player's spent time
    headLoreAdmin:
    - ""
    - "<!italic><green>The player has spent <red>{TIME} <green>on the server<dark_gray>."
    - ""
    - "<!italic><red>Click {CLICK} <gray>to <red>reset {PLAYER} <gray>spent time."
    # What type of button does the admin need to click to reset the player's spent time using the gui?
    # When the admin clicks a different button than the set one, nothing will happen
    # ClickTypes: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/ClickType.html
    headClickType: SHIFT_RIGHT
    # Include the item that is around the gui?
    fillBorder: true
    # The item that is around the gui
    borderItem:
      material: GRAY_STAINED_GLASS_PANE
    # Exit item
    # Set to -1 to disable
    exitItemSlot: 49
    exitItem:
      material: ACACIA_BUTTON
      item-meta:
        display-name: <red>Закрыть
    # Previous page item
    # Set to -1 to disable
    previousPageItemSlot: 46
    previousPageItem:
      material: ARROW
      item-meta:
        display-name: "<green>Предыдущая страница"
    # Used when the player clicks on the previous page but there is no page
    noPreviousPageItem:
      material: BARRIER
      item-meta:
        display-name: "<red>Предыдущей страницы нет"
    # Next page item
    # Set to -1 to disable
    nextPageItemSlot: 52
    nextPageItem:
      material: ARROW
      item-meta:
        display-name: "<green>Следующая страница"
    # Used when the player clicks on the next page but there is no page
    noNextPageItem:
      material: BARRIER
      item-meta:
        display-name: "<red>Следующей страницы нет"
#
# Scrolling gui settings
#
scrollingGuiSettings:
  # Specifies the direction in which the player list should move
  # Available directions:
  # HORIZONTAL - The items will be moving horizontally
  # VERTICAL - The items list will be moving vertically
  scrollType: VERTICAL
#
# Database settings
#
databaseSettings:
  # Database mode
  # Supported databases: SQLITE, MYSQL
  databaseMode: SQLITE
  hostname: localhost
  database: database
  username: root
  password: ExamplePassword1101
  port: 3306
#
# Notification settings
#
notificationSettings:
  # {TIME} - The spent player time
  playerSpentTime: "CHAT: <gray>Вы провели <red>{TIME} <gray>на сервере<dark_gray>."
  # {PLAYER} - Target name
  # {TIME} - Spent target time
  targetSpentTime: "CHAT: <gray>Игрок <green>{PLAYER} провёл <red>{TIME} на сервере<dark_gray>."
  topSpentTimeIsEmpty: "CHAT: <red>Топ проведённого времени пуст<dark_gray>."
  # Used when top spent time GUI is disabled
  topSpentTimeListFirst: "CHAT: <green>Топ 10 игроков по проведённому времени на серверу<dark_gray>:"
  # Used when top spent time GUI is disabled
  # {POSITION} - The player position
  # PLAYER} - The player name
  # {TIME} - The spent player time
  topSpentTimeList: "CHAT: <dark_gray>- <green>{POSITION} {PLAYER}<dark_gray>: <red>{TIME}"
  # {PLAYER} - The player name
  targetSpentTimeHasBeenReset: "CHAT: <green>Время игрока {PLAYER} было сброшенно<dark_gray>."
  globalSpentTimeHasBeenReset: "CHAT: <green>Время всех игроков было сброшенно<dark_gray>."
  # {PLAYER} - The player name
  # {TIME} - New spent player time
  targetSpentTimeHasBeenSet: "CHAT: <green>Время игрока {PLAYER} изменено на {TIME}<dark_gray>."
  # {PERMISSIONS} - Required permissions
  missingPermissions: "CHAT: <red>Недостаточно прав: <dark_red>{PERMISSIONS}<dark_gray>."
  playerNotFound: "CHAT: <red>Игрок не обнаружен<dark_gray>."
  # {USAGE} - Correct usage of command
  invalidUsage: "CHAT: <red>Неверное использование: <dark_red>{USAGE}<dark_gray>."
  # Used when there is more than one option to use a command
  invalidUsageFirst: "CHAT: <red>Неверное использование:"
  # {USAGE} - Correct usage of command
  # Used when there is more than one option to use a command
  invalidUsageList: "CHAT: <dark_gray>- <red>{USAGE}"

I've disabled GUI and translated most messages to Russian, which I suppose shouldn't cause any issues. I've tried to use spenttime without any other plugins installed and nothing changed

@krokha-konstantin krokha-konstantin added the bug Something isn't working label Jul 27, 2024
@imDMK
Copy link
Owner

imDMK commented Jul 28, 2024

Hi, thanks for the issue.
This is a weird one.

Do other commands have permissions normally? The command has permissions set - I did not detect any error in my localhost tests. Please make sure you have the latest version of luckperms installed and if possible clear all permissions you have set.

@krokha-konstantin
Copy link
Author

krokha-konstantin commented Jul 29, 2024

I've replicated this error by creating a new server from Purpur-2176, adding spenttime v1.0.7 to plugins folder and setting online-mode to false (I will only be able to test it with online-mode:true after 02.08). Nothing else, no other plugins, no permissions.

Downloading the latest luckperms version and doing this haven't changed anything, even after restart. I did save the changes
image

Other commands still work as intended

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants