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

Server Economy Account doesn't pay money back to player, when selling something at an AdminShop. #385

Open
LinuxSquare opened this issue Dec 13, 2020 · 5 comments

Comments

@LinuxSquare
Copy link

Plugin Version

ChestShop v3.11.1-SNAPSHOT (compiled at 2020-11-11T18:55:25Z)

Plugin Config

Config
# Should the plugin log some messages that are useful for debugging?
DEBUG: true

# Do you want to turn off the automatic updates of ChestShop?
TURN_OFF_UPDATES: true
# Do you want to turn off the automatic notifications for new development builds?
TURN_OFF_DEV_UPDATE_NOTIFIER: false
# Do you want to include some values of this config in the metrics? (This will not leak sensitive data but help in the development process)
INCLUDE_SETTINGS_IN_METRICS: true

# How large should the internal caches be?
CACHE_SIZE: 1000

# The default language when the client's language can't be found.
DEFAULT_LANGUAGE: "en"
# Should the plugin try to use a language file that matches the client's locale setting?
USE_CLIENT_LOCALE: true

# What containers are allowed to hold a shop? (Only blocks with inventories work!)
SHOP_CONTAINERS: 
- "CHEST"
- "TRAPPED_CHEST"

# (In 1/1000th of a second) How often can a player use the shop sign?
SHOP_INTERACTION_INTERVAL: 250
# Do you want to allow using shops to people in creative mode?
IGNORE_CREATIVE_MODE: true
# Do you want to allow using shops to people who have access to it due to their permissions? (owners are always ignored)
IGNORE_ACCESS_PERMS: true
# If true, people will buy with left-click and sell with right-click.
REVERSE_BUTTONS: true
# If true, people will be able to buy/sell in 64 stacks while holding the crouch button.
SHIFT_SELLS_IN_STACKS: false
# If true, people will be able to sell/buy everything available of the same type.
SHIFT_SELLS_EVERYTHING: false
# What can you do by clicking shift with SHIFT_SELLS_IN_STACKS turned on? (ALL/BUY/SELL)
SHIFT_ALLOWS: "ALL"
# Can shop's chest be opened by owner with right-clicking a shop's sign?
ALLOW_SIGN_CHEST_OPEN: false
# If true, when you left-click your own shop sign you won't open chest's inventory, but instead you will start destroying the sign.
ALLOW_LEFT_CLICK_DESTROYING: true

# If true, if the shop is empty, the sign is destroyed and put into the chest, so the shop isn't usable anymore.
REMOVE_EMPTY_SHOPS: false
# If true, if the REMOVE_EMPTY_SHOPS option is turned on, the chest is also destroyed.
REMOVE_EMPTY_CHESTS: false
# A list of worlds in which to remove empty shops with the previous config. Case sensitive. An empty list means all worlds.
REMOVE_EMPTY_WORLDS: 
- "world1"
- "world2"

# First line of your Admin Shop's sign should look like this:
ADMIN_SHOP_NAME: "Admin Shop"
# The name of the economy account which Admin Shops should use and to which all taxes will go
SERVER_ECONOMY_ACCOUNT: "CentralBank"
# The uuid of the economy account for the Admin Shop. Useful for fake accounts as normally only accounts of players work
SERVER_ECONOMY_ACCOUNT_UUID: 87676b75-885e-46ca-a5ee-6ff2e9a78134
# Percent of the price that should go to the server's account. (100 = 100 percent)
TAX_AMOUNT: 7
# Percent of the price that should go to the server's account when buying from an Admin Shop.
SERVER_TAX_AMOUNT: 100
# Amount of money player must pay to create a shop
SHOP_CREATION_PRICE: 0
# How much money do you get back when destroying a sign?
SHOP_REFUND_PRICE: 0
# How many decimal places are allowed at a maximum for prices?
PRICE_PRECISION: 2

# Should we block shops that sell things for more than they buy? (This prevents newbies from creating shops that would be exploited)
BLOCK_SHOPS_WITH_SELL_PRICE_HIGHER_THAN_BUY_PRICE: true

# Maximum amount of items that can be bought/sold at a shop. Default 3456 is a double chest of 64 stacks.
MAX_SHOP_AMOUNT: 3456

# Do you want to allow other players to build a shop on a block where there's one already?
ALLOW_MULTIPLE_SHOPS_AT_ONE_BLOCK: false
# Can shops be used even when the buyer/seller doesn't have enough items, space or money? (The price will be scaled adequately to the item amount)
ALLOW_PARTIAL_TRANSACTIONS: true
# Can '?' be put in place of item name in order for the sign to be auto-filled?
ALLOW_AUTO_ITEM_FILL: true

# Enable this if you use BungeeCord and want players to receive shop notifications on other servers
BUNGEECORD_MESSAGES: false

# Do you want to show "Out of stock" messages?
SHOW_MESSAGE_OUT_OF_STOCK: true
# Do you want to show "Full shop" messages?
SHOW_MESSAGE_FULL_SHOP: true
# How many seconds do you want to wait before showing notifications for the same shop to the owner again?
NOTIFICATION_MESSAGE_COOLDOWN: 10

# Can players hide the "Out of stock" messages with /cstoggle?
CSTOGGLE_TOGGLES_OUT_OF_STOCK: false
# Can players hide the "Full shop" messages with /cstoggle?
CSTOGGLE_TOGGLES_FULL_SHOP: false
# Do you want to show "You bought/sold... " messages?
SHOW_TRANSACTION_INFORMATION_CLIENT: true
# Do you want to show "Somebody bought/sold... " messages?
SHOW_TRANSACTION_INFORMATION_OWNER: true

# If true, plugin will log transactions in its own file
LOG_TO_FILE: false
# Do you want ChestShop's messages to show up in console?
LOG_TO_CONSOLE: true
# Should all shop removals be logged to the console?
LOG_ALL_SHOP_REMOVALS: true

# Do you want to stack all items up to 64 item stacks?
STACK_TO_64: false
# Do you want to use built-in protection against chest destruction?
USE_BUILT_IN_PROTECTION: true
# Do you want to have shop signs "stick" to chests?
STICK_SIGNS_TO_CHESTS: false
# EXPERIMENTAL: Do you want to turn off the default protection when another plugin is protecting the block? (Will leave the chest visually open - CraftBukkit bug!)
TURN_OFF_DEFAULT_PROTECTION_WHEN_PROTECTED_EXTERNALLY: false
# Do you want to turn off the default sign protection? Warning! Other players will be able to destroy other people's shops!
TURN_OFF_SIGN_PROTECTION: false
# Do you want to disable the hopper protection, which prevents Hopper-Minecarts from taking items out of shops?
TURN_OFF_HOPPER_PROTECTION: false
# Only allow users to buy/sell that have access to the sign's protection? (E.g. LWC protection)
CHECK_ACCESS_FOR_SHOP_USE: false
# Do you want to protect shop chests with LWC?
PROTECT_CHEST_WITH_LWC: false
# Of which type should the container protection be? Possible type: public, private, donate and on some LWC versions display
LWC_CHEST_PROTECTION_TYPE: "PRIVATE"
# Do you want to protect shop signs with LWC?
PROTECT_SIGN_WITH_LWC: false
# Of which type should the sign protection be? Possible type: public, private, donate and on some LWC versions display
LWC_SIGN_PROTECTION_TYPE: "PRIVATE"
# Should the chest's LWC protection be removed once the shop sign is destroyed? 
REMOVE_LWC_PROTECTION_AUTOMATICALLY: true
# Should LWC limits block shop creations?
LWC_LIMITS_BLOCK_CREATION: true

# Do you want to only let people build inside WorldGuard regions?
WORLDGUARD_INTEGRATION: false
# Do you want to only let people build inside region flagged by doing /region regionName flag allow-shop allow?
WORLDGUARD_USE_FLAG: false
# Do you want ChestShop to respect WorldGuard's chest protection?
WORLDGUARD_USE_PROTECTION: false

# Do you want to only let people build inside GriefPrevention claims?
GRIEFPREVENTION_INTEGRATION: false

# Do you want to only let people build inside RedProtect regions?
REDPROTECT_INTEGRATION: false

# Do you want to deny shop access to unlogged users?
AUTHME_HOOK: true
# Do you want to allow shop access to unregistered users? (Example: registration is optional)
AUTHME_ALLOW_UNREGISTERED: false

# How much Heroes exp should people get for creating a ChestShop?
HEROES_EXP: 100.0

# Add icons and make item names hoverable in transaction messages when ShowItem is installed?
SHOWITEM_MESSAGE: true

# Add stock counter to quantity line?
USE_STOCK_COUNTER: false

Server Version

This server is running Paper version git-Paper-262 (MC: 1.16.4) (Implementing API version 1.16.4-R0.1-SNAPSHOT)

Server Log

Log
[17:24:11] [main/INFO]: Reloading ResourceManager: Default, bukkit
[17:24:12] [Worker-Main-3/INFO]: Loaded 7 recipes
[17:24:13] [Server thread/INFO]: Starting minecraft server version 1.16.4
[17:24:13] [Server thread/INFO]: Loading properties
[17:24:13] [Server thread/INFO]: This server is running Paper version git-Paper-262 (MC: 1.16.4) (Implementing API version 1.16.4-R0.1-SNAPSHOT)
[17:24:13] [Server thread/INFO]: Server Ping Player Sample Count: 12
[17:24:13] [Server thread/INFO]: Using 4 threads for Netty based IO
[17:24:13] [Server thread/INFO]: Debug logging is disabled
[17:24:13] [Server thread/INFO]: Default game type: SURVIVAL
[17:24:13] [Server thread/INFO]: Generating keypair
[17:24:13] [Server thread/INFO]: Starting Minecraft server on *:25565
[17:24:13] [Server thread/INFO]: Using epoll channel type
[17:24:14] [Server thread/INFO]: [ChestShop] Loading ChestShop v3.11.1-SNAPSHOT (compiled at 2020-11-11T18:55:25Z)
[17:24:14] [Server thread/INFO]: [Vault] Loading Vault v1.7.3-b131
[17:24:14] [Server thread/INFO]: [NovEcon2] Loading NovEcon2 v0.0.17
[17:24:14] [Server thread/INFO]: [RealBanksMVC] Loading RealBanksMVC v1.3.7
[17:24:14] [Server thread/INFO]: [PublicTransport] Loading PublicTransport v0.0.1
[17:24:14] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
[17:24:14] [Server thread/INFO]: [Vault] Enabling Vault v1.7.3-b131
[17:24:14] [Server thread/INFO]: [Vault] [Permission] SuperPermissions loaded as backup permission system.
[17:24:14] [Server thread/INFO]: [Vault] Enabled Version 1.7.3-b131
[17:24:14] [Server thread/INFO]: [NovEcon2] Enabling NovEcon2 v0.0.17
[17:24:14] [Server thread/INFO]: Database novecon2 found
[17:24:14] [Server thread/INFO]: VaultAPI hooked into NovEcon2
[17:24:14] [Server thread/INFO]: Preparing level "world"
[17:24:14] [Server thread/INFO]: -------- World Settings For [world] --------
[17:24:14] [Server thread/INFO]: Cactus Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Cane Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Melon Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Mushroom Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Pumpkin Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Sapling Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Beetroot Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Carrot Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Potato Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Wheat Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: NetherWart Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Vine Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Cocoa Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Bamboo Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: SweetBerry Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Kelp Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Experience Merge Radius: 3.0
[17:24:14] [Server thread/INFO]: Entity Activation Range: An 32 / Mo 32 / Ra 48 / Mi 16 / Tiv true
[17:24:14] [Server thread/INFO]: Hopper Transfer: 8 Hopper Check: 1 Hopper Amount: 1
[17:24:14] [Server thread/INFO]: Custom Map Seeds:  Village: 10387312 Desert: 14357617 Igloo: 14357618 Jungle: 14357619 Swamp: 14357620 Monument: 10387313 Ocean: 14357621 Shipwreck: 165745295 End City: 10387313 Slime: 987234911 Bastion: 30084232 Fortress: 30084232 Mansion: 10387319 Fossil: 14357921 Portal: 34222645
[17:24:14] [Server thread/INFO]: Max TNT Explosions: 100
[17:24:14] [Server thread/INFO]: Tile Max Tick Time: 50ms Entity max Tick Time: 50ms
[17:24:14] [Server thread/INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
[17:24:14] [Server thread/INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
[17:24:14] [Server thread/INFO]: Item Merge Radius: 2.5
[17:24:14] [Server thread/INFO]: Item Despawn Rate: 6000
[17:24:14] [Server thread/INFO]: View Distance: 10
[17:24:14] [Server thread/INFO]: Arrow Despawn Rate: 1200 Trident Respawn Rate:1200
[17:24:14] [Server thread/INFO]: Zombie Aggressive Towards Villager: true
[17:24:14] [Server thread/INFO]: Nerfing mobs spawned from spawners: false
[17:24:14] [Server thread/INFO]: Mob Spawn Range: 8
[17:24:14] [Server thread/INFO]: -------- World Settings For [world_nether] --------
[17:24:14] [Server thread/INFO]: Cactus Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Cane Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Melon Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Mushroom Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Pumpkin Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Sapling Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Beetroot Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Carrot Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Potato Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Wheat Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: NetherWart Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Vine Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Cocoa Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Bamboo Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: SweetBerry Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Kelp Growth Modifier: 100%
[17:24:14] [Server thread/INFO]: Experience Merge Radius: 3.0
[17:24:14] [Server thread/INFO]: Entity Activation Range: An 32 / Mo 32 / Ra 48 / Mi 16 / Tiv true
[17:24:14] [Server thread/INFO]: Hopper Transfer: 8 Hopper Check: 1 Hopper Amount: 1
[17:24:14] [Server thread/INFO]: Custom Map Seeds:  Village: 10387312 Desert: 14357617 Igloo: 14357618 Jungle: 14357619 Swamp: 14357620 Monument: 10387313 Ocean: 14357621 Shipwreck: 165745295 End City: 10387313 Slime: 987234911 Bastion: 30084232 Fortress: 30084232 Mansion: 10387319 Fossil: 14357921 Portal: 34222645
[17:24:14] [Server thread/INFO]: Max TNT Explosions: 100
[17:24:14] [Server thread/INFO]: Tile Max Tick Time: 50ms Entity max Tick Time: 50ms
[17:24:14] [Server thread/INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
[17:24:14] [Server thread/INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
[17:24:14] [Server thread/INFO]: Item Merge Radius: 2.5
[17:24:14] [Server thread/INFO]: Item Despawn Rate: 6000
[17:24:14] [Server thread/INFO]: View Distance: 10
[17:24:14] [Server thread/INFO]: Arrow Despawn Rate: 1200 Trident Respawn Rate:1200
[17:24:14] [Server thread/INFO]: Zombie Aggressive Towards Villager: true
[17:24:14] [Server thread/INFO]: Nerfing mobs spawned from spawners: false
[17:24:14] [Server thread/INFO]: Mob Spawn Range: 8
[17:24:15] [Server thread/INFO]: -------- World Settings For [world_the_end] --------
[17:24:15] [Server thread/INFO]: Cactus Growth Modifier: 100%
[17:24:15] [Server thread/INFO]: Cane Growth Modifier: 100%
[17:24:15] [Server thread/INFO]: Melon Growth Modifier: 100%
[17:24:15] [Server thread/INFO]: Mushroom Growth Modifier: 100%
[17:24:15] [Server thread/INFO]: Pumpkin Growth Modifier: 100%
[17:24:15] [Server thread/INFO]: Sapling Growth Modifier: 100%
[17:24:15] [Server thread/INFO]: Beetroot Growth Modifier: 100%
[17:24:15] [Server thread/INFO]: Carrot Growth Modifier: 100%
[17:24:15] [Server thread/INFO]: Potato Growth Modifier: 100%
[17:24:15] [Server thread/INFO]: Wheat Growth Modifier: 100%
[17:24:15] [Server thread/INFO]: NetherWart Growth Modifier: 100%
[17:24:15] [Server thread/INFO]: Vine Growth Modifier: 100%
[17:24:15] [Server thread/INFO]: Cocoa Growth Modifier: 100%
[17:24:15] [Server thread/INFO]: Bamboo Growth Modifier: 100%
[17:24:15] [Server thread/INFO]: SweetBerry Growth Modifier: 100%
[17:24:15] [Server thread/INFO]: Kelp Growth Modifier: 100%
[17:24:15] [Server thread/INFO]: Experience Merge Radius: 3.0
[17:24:15] [Server thread/INFO]: Entity Activation Range: An 32 / Mo 32 / Ra 48 / Mi 16 / Tiv true
[17:24:15] [Server thread/INFO]: Hopper Transfer: 8 Hopper Check: 1 Hopper Amount: 1
[17:24:15] [Server thread/INFO]: Custom Map Seeds:  Village: 10387312 Desert: 14357617 Igloo: 14357618 Jungle: 14357619 Swamp: 14357620 Monument: 10387313 Ocean: 14357621 Shipwreck: 165745295 End City: 10387313 Slime: 987234911 Bastion: 30084232 Fortress: 30084232 Mansion: 10387319 Fossil: 14357921 Portal: 34222645
[17:24:15] [Server thread/INFO]: Max TNT Explosions: 100
[17:24:15] [Server thread/INFO]: Tile Max Tick Time: 50ms Entity max Tick Time: 50ms
[17:24:15] [Server thread/INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
[17:24:15] [Server thread/INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
[17:24:15] [Server thread/INFO]: Item Merge Radius: 2.5
[17:24:15] [Server thread/INFO]: Item Despawn Rate: 6000
[17:24:15] [Server thread/INFO]: View Distance: 10
[17:24:15] [Server thread/INFO]: Arrow Despawn Rate: 1200 Trident Respawn Rate:1200
[17:24:15] [Server thread/INFO]: Zombie Aggressive Towards Villager: true
[17:24:15] [Server thread/INFO]: Nerfing mobs spawned from spawners: false
[17:24:15] [Server thread/INFO]: Mob Spawn Range: 8
[17:24:15] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[17:24:15] [Server thread/INFO]: Loaded 0 spawn chunks for world world
[17:24:15] [Server thread/INFO]: Preparing spawn area: 0%
[17:24:15] [Server thread/INFO]: Time elapsed: 162 ms
[17:24:15] [Server thread/INFO]: Preparing start region for dimension minecraft:the_nether
[17:24:15] [Server thread/INFO]: Loaded 0 spawn chunks for world world_nether
[17:24:15] [Server thread/INFO]: Time elapsed: 57 ms
[17:24:15] [Server thread/INFO]: Preparing start region for dimension minecraft:the_end
[17:24:15] [Server thread/INFO]: Loaded 0 spawn chunks for world world_the_end
[17:24:15] [Server thread/INFO]: Time elapsed: 32 ms
[17:24:15] [Server thread/INFO]: [ChestShop] Enabling ChestShop v3.11.1-SNAPSHOT (compiled at 2020-11-11T18:55:25Z)
[17:24:15] [Server thread/INFO]: [ChestShop] Loading configuration config.yml
[17:24:15] [Server thread/INFO]: [ChestShop] DEBUG: true
[17:24:15] [Server thread/INFO]: [ChestShop] TURN_OFF_UPDATES: true
[17:24:15] [Server thread/INFO]: [ChestShop] TURN_OFF_DEV_UPDATE_NOTIFIER: false
[17:24:15] [Server thread/INFO]: [ChestShop] INCLUDE_SETTINGS_IN_METRICS: true
[17:24:15] [Server thread/INFO]: [ChestShop] CACHE_SIZE: 1000
[17:24:15] [Server thread/INFO]: [ChestShop] DEFAULT_LANGUAGE: "en"
[17:24:15] [Server thread/INFO]: [ChestShop] USE_CLIENT_LOCALE: true
[17:24:15] [Server thread/INFO]: [ChestShop] SHOP_CONTAINERS: 
- "CHEST"
- "TRAPPED_CHEST"
[17:24:15] [Server thread/INFO]: [ChestShop] SHOP_INTERACTION_INTERVAL: 250
[17:24:15] [Server thread/INFO]: [ChestShop] IGNORE_CREATIVE_MODE: true
[17:24:15] [Server thread/INFO]: [ChestShop] IGNORE_ACCESS_PERMS: true
[17:24:15] [Server thread/INFO]: [ChestShop] REVERSE_BUTTONS: true
[17:24:15] [Server thread/INFO]: [ChestShop] SHIFT_SELLS_IN_STACKS: false
[17:24:15] [Server thread/INFO]: [ChestShop] SHIFT_SELLS_EVERYTHING: false
[17:24:15] [Server thread/INFO]: [ChestShop] SHIFT_ALLOWS: "ALL"
[17:24:15] [Server thread/INFO]: [ChestShop] ALLOW_SIGN_CHEST_OPEN: false
[17:24:15] [Server thread/INFO]: [ChestShop] ALLOW_LEFT_CLICK_DESTROYING: true
[17:24:15] [Server thread/INFO]: [ChestShop] REMOVE_EMPTY_SHOPS: false
[17:24:15] [Server thread/INFO]: [ChestShop] REMOVE_EMPTY_CHESTS: false
[17:24:15] [Server thread/INFO]: [ChestShop] REMOVE_EMPTY_WORLDS: 
- "world1"
- "world2"
[17:24:15] [Server thread/INFO]: [ChestShop] ADMIN_SHOP_NAME: "Admin Shop"
[17:24:15] [Server thread/INFO]: [ChestShop] SERVER_ECONOMY_ACCOUNT: "CentralBank"
[17:24:15] [Server thread/INFO]: [ChestShop] SERVER_ECONOMY_ACCOUNT_UUID: 87676b75-885e-46ca-a5ee-6ff2e9a78134
[17:24:15] [Server thread/INFO]: [ChestShop] TAX_AMOUNT: 7
[17:24:15] [Server thread/INFO]: [ChestShop] SERVER_TAX_AMOUNT: 100
[17:24:15] [Server thread/INFO]: [ChestShop] SHOP_CREATION_PRICE: 0
[17:24:15] [Server thread/INFO]: [ChestShop] SHOP_REFUND_PRICE: 0
[17:24:15] [Server thread/INFO]: [ChestShop] PRICE_PRECISION: 2
[17:24:15] [Server thread/INFO]: [ChestShop] BLOCK_SHOPS_WITH_SELL_PRICE_HIGHER_THAN_BUY_PRICE: true
[17:24:15] [Server thread/INFO]: [ChestShop] MAX_SHOP_AMOUNT: 3456
[17:24:15] [Server thread/INFO]: [ChestShop] ALLOW_MULTIPLE_SHOPS_AT_ONE_BLOCK: false
[17:24:15] [Server thread/INFO]: [ChestShop] ALLOW_PARTIAL_TRANSACTIONS: true
[17:24:15] [Server thread/INFO]: [ChestShop] ALLOW_AUTO_ITEM_FILL: true
[17:24:15] [Server thread/INFO]: [ChestShop] BUNGEECORD_MESSAGES: false
[17:24:15] [Server thread/INFO]: [ChestShop] SHOW_MESSAGE_OUT_OF_STOCK: true
[17:24:15] [Server thread/INFO]: [ChestShop] SHOW_MESSAGE_FULL_SHOP: true
[17:24:15] [Server thread/INFO]: [ChestShop] NOTIFICATION_MESSAGE_COOLDOWN: 10
[17:24:15] [Server thread/INFO]: [ChestShop] CSTOGGLE_TOGGLES_OUT_OF_STOCK: false
[17:24:15] [Server thread/INFO]: [ChestShop] CSTOGGLE_TOGGLES_FULL_SHOP: false
[17:24:15] [Server thread/INFO]: [ChestShop] SHOW_TRANSACTION_INFORMATION_CLIENT: true
[17:24:15] [Server thread/INFO]: [ChestShop] SHOW_TRANSACTION_INFORMATION_OWNER: true
[17:24:15] [Server thread/INFO]: [ChestShop] LOG_TO_FILE: false
[17:24:15] [Server thread/INFO]: [ChestShop] LOG_TO_CONSOLE: true
[17:24:15] [Server thread/INFO]: [ChestShop] LOG_ALL_SHOP_REMOVALS: true
[17:24:15] [Server thread/INFO]: [ChestShop] STACK_TO_64: false
[17:24:15] [Server thread/INFO]: [ChestShop] USE_BUILT_IN_PROTECTION: true
[17:24:15] [Server thread/INFO]: [ChestShop] STICK_SIGNS_TO_CHESTS: false
[17:24:15] [Server thread/INFO]: [ChestShop] TURN_OFF_DEFAULT_PROTECTION_WHEN_PROTECTED_EXTERNALLY: false
[17:24:15] [Server thread/INFO]: [ChestShop] TURN_OFF_SIGN_PROTECTION: false
[17:24:15] [Server thread/INFO]: [ChestShop] TURN_OFF_HOPPER_PROTECTION: false
[17:24:15] [Server thread/INFO]: [ChestShop] CHECK_ACCESS_FOR_SHOP_USE: false
[17:24:15] [Server thread/INFO]: [ChestShop] PROTECT_CHEST_WITH_LWC: false
[17:24:15] [Server thread/INFO]: [ChestShop] LWC_CHEST_PROTECTION_TYPE: "PRIVATE"
[17:24:15] [Server thread/INFO]: [ChestShop] PROTECT_SIGN_WITH_LWC: false
[17:24:15] [Server thread/INFO]: [ChestShop] LWC_SIGN_PROTECTION_TYPE: "PRIVATE"
[17:24:15] [Server thread/INFO]: [ChestShop] REMOVE_LWC_PROTECTION_AUTOMATICALLY: true
[17:24:15] [Server thread/INFO]: [ChestShop] LWC_LIMITS_BLOCK_CREATION: true
[17:24:15] [Server thread/INFO]: [ChestShop] WORLDGUARD_INTEGRATION: false
[17:24:15] [Server thread/INFO]: [ChestShop] WORLDGUARD_USE_FLAG: false
[17:24:15] [Server thread/INFO]: [ChestShop] WORLDGUARD_USE_PROTECTION: false
[17:24:15] [Server thread/INFO]: [ChestShop] GRIEFPREVENTION_INTEGRATION: false
[17:24:15] [Server thread/INFO]: [ChestShop] REDPROTECT_INTEGRATION: false
[17:24:15] [Server thread/INFO]: [ChestShop] AUTHME_HOOK: true
[17:24:15] [Server thread/INFO]: [ChestShop] AUTHME_ALLOW_UNREGISTERED: false
[17:24:15] [Server thread/INFO]: [ChestShop] HEROES_EXP: 100.0
[17:24:15] [Server thread/INFO]: [ChestShop] SHOWITEM_MESSAGE: true
[17:24:15] [Server thread/INFO]: [ChestShop] USE_STOCK_COUNTER: false
[17:24:15] [Server thread/INFO]: [ChestShop] Found locale en!
[17:24:15] [Server thread/INFO]: [ChestShop] Found locale de!
[17:24:15] [Server thread/INFO]: [ChestShop] Found locale cs!
[17:24:16] [Server thread/INFO]: [ChestShop] Using NovEcon2 as the Economy provider now.
[17:24:16] [Server thread/INFO]: [ChestShop] Vault loaded!
[17:24:16] [Server thread/INFO]: [ChestShop] Using Paper's BlockDestroyEvent instead of the BlockPhysicsEvent!
[17:24:16] [Server thread/WARN]: [ChestShop] Unable to parse plugin build from version string! (3.11.1-SNAPSHOT (compiled at 2020-11-11T18:55:25Z))
[17:24:16] [Server thread/INFO]: [ChestShop] Auto-updater is disabled. If you want the plugin to automatically download new releases then set 'TURN_OFF_UPDATES' to 'false' in your config.yml!
[17:24:16] [Server thread/INFO]: [RealBanksMVC] Enabling RealBanksMVC v1.3.7
[17:24:16] [Server thread/INFO]: Loaded RealBanks
[17:24:16] [Server thread/INFO]: Database realbanks found. Hooking into it...
[17:24:16] [Server thread/INFO]: [PublicTransport] Enabling PublicTransport v0.0.1
[17:24:16] [Server thread/INFO]: Loaded PublicTransport
[17:24:16] [Server thread/WARN]: [PublicTransport] Could not save transporttypes.yml to plugins/PublicTransport/transporttypes.yml because transporttypes.yml already exists.
[17:24:16] [Server thread/INFO]: Running delayed init tasks
[17:24:16] [Server thread/INFO]: Done (3.731s)! For help, type "help"
[17:24:16] [Server thread/INFO]: Timings Reset
[17:24:16] [Craft Scheduler Thread - 3/INFO]: [Vault] Checking for Updates ... 
[17:24:17] [Craft Scheduler Thread - 3/INFO]: [Vault] No new version available
[17:25:00] [User Authenticator #1/INFO]: UUID of player LinuxSquare is f5429832-6820-4cb3-8a92-528d5ea3abd5
[17:25:00] [Server thread/INFO]: LinuxSquare joined the game
[17:25:00] [Server thread/INFO]: LinuxSquare[/127.0.0.1:55916] logged in with entity id 203 at ([world]284.7677909518794, 65.0, -157.60857231501262)
[17:25:10] [Server thread/INFO]: LinuxSquare issued server command: /money
[17:25:15] [Server thread/INFO]: LinuxSquare issued server command: /money centralbank
[17:25:21] [Server thread/INFO]: [ChestShop] LinuxSquare bought 1 Coarse Dirt for 2001.00 from Admin Shop at [world] 291, 65, -146
[17:25:23] [Server thread/INFO]: LinuxSquare issued server command: /money centralbank
[17:25:24] [Server thread/INFO]: [ChestShop] LinuxSquare bought 1 Coarse Dirt for 2001.00 from Admin Shop at [world] 291, 65, -146
[17:25:25] [Server thread/INFO]: LinuxSquare issued server command: /money centralbank
[17:25:27] [Server thread/INFO]: LinuxSquare issued server command: /money
[17:26:59] [Server thread/INFO]: [ChestShop] LinuxSquare sold 1 Coarse Dirt for 2000.00 to Admin Shop at [world] 291, 65, -146
[17:27:01] [Server thread/INFO]: [ChestShop] LinuxSquare sold 1 Coarse Dirt for 2000.00 to Admin Shop at [world] 291, 65, -146
[17:27:14] [Server thread/INFO]: LinuxSquare issued server command: /novecon addbal LinuxSquare 10000
[17:27:16] [Server thread/INFO]: LinuxSquare issued server command: /money
[17:27:20] [Server thread/INFO]: LinuxSquare issued server command: /money centralbank
[17:27:30] [Server thread/INFO]: LinuxSquare issued server command: /money
[17:27:34] [Server thread/INFO]: LinuxSquare issued server command: /money centralbank
[17:27:37] [Server thread/INFO]: [ChestShop] LinuxSquare bought 1 Coarse Dirt for 2001.00 from Admin Shop at [world] 291, 65, -146
[17:27:38] [Server thread/INFO]: LinuxSquare issued server command: /money
[17:27:39] [Server thread/INFO]: LinuxSquare issued server command: /money centralbank
[17:28:27] [Server thread/INFO]: LinuxSquare issued server command: /money
[17:28:28] [Server thread/INFO]: LinuxSquare issued server command: /money centralbank
[17:28:29] [Server thread/INFO]: [ChestShop] LinuxSquare sold 1 Coarse Dirt for 2000.00 to Admin Shop at [world] 291, 65, -146
[17:28:31] [Server thread/INFO]: LinuxSquare issued server command: /money
[17:28:32] [Server thread/INFO]: LinuxSquare issued server command: /money centralbank
[17:30:56] [Server thread/INFO]: LinuxSquare issued server command: /chestshop
[17:32:29] [Server thread/INFO]: LinuxSquare issued server command: /version ChestShop
[17:33:22] [Server thread/INFO]: LinuxSquare issued server command: /version RealBanksMVC

What other plugins are you running?

  • NovEcon2 version 0.0.17 Author: LinuxSquare
  • RealBanks2 version 1.3.7 Author: LinuxSquare
  • Vault 1.7.3-b131 Authors: cereal, Sleaker and mung3r

What is happening?

Well it's not an error, but still weird.
In my economy-plugin (NovEcon2) I created a "fake-account" which represents the Central Bank (Federal Reserve in the U.S., Swiss National Bank in Switzerland). This account has a specific amount of money.

I cleared the hurdle by paying the entire amount from the admin shop to the central bank account.

I managed this with the tax function of ChestShop.

# The name of the economy account which Admin Shops should use and to which all taxes will go
SERVER_ECONOMY_ACCOUNT: "CentralBank"
# The uuid of the economy account for the Admin Shop. Useful for fake accounts as normally only accounts of players work
SERVER_ECONOMY_ACCOUNT_UUID: 87676b75-885e-46ca-a5ee-6ff2e9a78134

Buy from CentralBank

The second hurdle is that when a player sells something at the AdminShop, that the player also gets the money and it is deducted from the Central Bank account. This does not seem to work with the tax function enabled.

Sell to CentralBank

I don't know if this is a bug or if I implemented something wrong in my code. However, I would be happy to receive feedback on what the problem could be.

What did you expect to happen?

I expected the money to be transferred back to the player's account and the amount to be deducted from the central bank's account.

Additional context

Withdraw money by Player, OfflinePlayer and UUID.
    @Override
    public EconomyResponse withdrawPlayer(String playerName, double amount) {
        if (amount < 0) {
            return new EconomyResponse(0, 0, EconomyResponse.ResponseType.FAILURE, novecon2.getConfigModel().getConf().getString("Settings.prefix") + "Cannot withdraw negative funds");
        }
        if(Bukkit.getPlayer(playerName) == null) {
            return new EconomyResponse(0, 0, EconomyResponse.ResponseType.FAILURE, novecon2.getConfigModel().getConf().getString("Settings.prefix") + "Invalid Player");
        }
        try {
            Player player = Bukkit.getPlayer(playerName);
            UUID uuid = player.getUniqueId();
            double newbal = novecon2.getDatabaseModel().withdrawPlayer(uuid, amount);

            return new EconomyResponse(amount, newbal, EconomyResponse.ResponseType.SUCCESS, null);
        } catch(Exception e) {
            return new EconomyResponse(0, 0, EconomyResponse.ResponseType.FAILURE, novecon2.getConfigModel().getConf().getString("Settings.prefix") + e.getMessage());
        }
    }

    @Override
    public EconomyResponse withdrawPlayer(OfflinePlayer player, double amount) {
        if (amount < 0) {
            return new EconomyResponse(0, 0, EconomyResponse.ResponseType.FAILURE, novecon2.getConfigModel().getConf().getString("Settings.prefix") + "Cannot withdraw negative funds");
        }
        try {
            UUID uuid = player.getUniqueId();
            double newbal = novecon2.getDatabaseModel().withdrawPlayer(uuid, amount);

            return new EconomyResponse(amount, newbal, EconomyResponse.ResponseType.SUCCESS, null);
        } catch(Exception e) {
            return new EconomyResponse(0, 0, EconomyResponse.ResponseType.FAILURE, novecon2.getConfigModel().getConf().getString("Settings.prefix") + e.getMessage());
        }
    }

    // This code piece is here, to withdraw from the centralbank account.
    public EconomyResponse withdrawPlayer(UUID uuid, double amount) {
        if(amount < 0) {
            return new EconomyResponse(0,0, EconomyResponse.ResponseType.FAILURE, novecon2.getConfigModel().getConf().getString("Settings.prefix") + "Cannot withdraw negative funds");
        }
        try {
            double newbal = novecon2.getDatabaseModel().withdrawPlayer(uuid, amount);

            return new EconomyResponse(amount, newbal, EconomyResponse.ResponseType.SUCCESS, null);
        } catch(Exception e) {
            return new EconomyResponse(0,0, EconomyResponse.ResponseType.FAILURE, novecon2.getConfigModel().getConf().getString("Settings.prefix") + e.getMessage());
        }
    }
Deposit money by Player, OfflinePlayer and UUID.
    @Override
    public EconomyResponse depositPlayer(String playerName, double amount) {
        Player player = Bukkit.getPlayer(playerName);
        UUID uuid = player.getUniqueId();
        double newbal = novecon2.getDatabaseModel().depositPlayer(uuid, amount);

        try {
            return new EconomyResponse(amount, newbal, EconomyResponse.ResponseType.SUCCESS, null);
        } catch(Exception e) {
            return new EconomyResponse(0,0, EconomyResponse.ResponseType.FAILURE, novecon2.getConfigModel().getConf().getString("Settings.prefix") + e.getMessage());
        }
    }

    @Override
    public EconomyResponse depositPlayer(OfflinePlayer player, double amount) {
        UUID uuid = player.getUniqueId();
        double newbal = novecon2.getDatabaseModel().depositPlayer(uuid, amount);

        try {
            return new EconomyResponse(amount, newbal, EconomyResponse.ResponseType.SUCCESS, null);
        } catch(Exception e) {
            return new EconomyResponse(0,0, EconomyResponse.ResponseType.FAILURE, novecon2.getConfigModel().getConf().getString("Settings.prefix") + e.getMessage());
        }
    }

    // This code piece is here, to deposit to the centralbank account.
    public EconomyResponse depositPlayer(UUID uuid, double amount) {
        double newbal = novecon2.getDatabaseModel().depositPlayer(uuid, amount);

        try {
            return new EconomyResponse(amount, newbal, EconomyResponse.ResponseType.SUCCESS, null);
        } catch(Exception e) {
            return new EconomyResponse(0,0, EconomyResponse.ResponseType.FAILURE, novecon2.getConfigModel().getConf().getString("Settings.prefix") + e.getMessage());
        }
    }
Equivalent methods inside `DatabaseModel.java`

Please ignore the check of RealbanksAPI. It's just here to withdraw money from the bankaccount, if the player hasn't enough money inside his pocket.

    public double withdrawPlayer(UUID pUID, double amount) {
        double balance = getBalance(pUID);

        if(getBalance(pUID) >= amount) {
            balance -= amount;
            try {
                PreparedStatement pstmt = getCon().prepareStatement("UPDATE Accounts SET balance = ? WHERE uuid = ?");
                pstmt.setDouble(1, balance);
                pstmt.setString(2, pUID.toString());
                pstmt.executeUpdate();

            } catch (SQLException e) {
                e.printStackTrace();
            }
        } else {
            if(novecon2.getConfigModel().getConf().getBoolean("Settings.RealBanksAPI")) {
                if (novecon2.getRBAPI().getDatabaseAPIModel().getMoney(pUID) >= amount) {
                    double rbbal = novecon2.getRBAPI().getDatabaseAPIModel().getMoney(pUID);
                    double tax = (amount / 100) * novecon2.getConfigModel().getConf().getInt("Settings.TaxRate");

                    Bukkit.getPlayer(pUID).sendMessage(novecon2.getConfigModel().getConf().getString("Settings.prefix") + ChatColor.RED + "Tax: " + tax);

                    novecon2.getRBAPI().getDatabaseAPIModel().setMoney(pUID, (rbbal - (amount + (amount / 100) * novecon2.getConfigModel().getConf().getInt("Settings.TaxRate"))));
                } else {
                    Bukkit.getPlayer(pUID).sendMessage(novecon2.getConfigModel().getConf().getString("Settings.prefix") + ChatColor.RED + "You don't have enough money in your pocket and on your bank account!");
                    return 0.0;
                }
            } else {
                Bukkit.getPlayer(pUID).sendMessage(novecon2.getConfigModel().getConf().getString("Settings.prefix") + ChatColor.RED + "You don't have enough money!");
            }
        }

        return balance;
    }

    public double depositPlayer(UUID pUID, double amount) {
        double balance = getBalance(pUID) + amount;
        try {
            PreparedStatement pstmt = getCon().prepareStatement("UPDATE Accounts SET balance = ? WHERE uuid = ?");
            pstmt.setDouble(1, balance);
            pstmt.setString(2, pUID.toString());
            pstmt.executeUpdate();

        } catch (SQLException e) {
            e.printStackTrace();
        }
        return balance;
    }
@Phoenix616
Copy link
Member

Do you have one of the tax bypass permissions by any chance? (ChestShop.notax.buy or ChestShop.notax.sell)?

@LinuxSquare
Copy link
Author

@Phoenix616 I can't remember defining one of those two permissions. Also, I deoped myself to test the functionality.

@alkalinekats
Copy link

alkalinekats commented Jan 29, 2021

For some strange reason, giving our members the permission ChestShop.notax.sell made it so people could actually sell to our shops and earn money. I really don't understand how it works since we don't really have anything related to tax on our server, but I only think this is a bug since its not really what you would think you have to do enable to get it working. Especially if its related to tax, a system that most servers I play on don't use at all.

Edit: Hopefully this info helps

@Phoenix616
Copy link
Member

Phoenix616 commented Jan 29, 2021

For some strange reason, giving our members the permission ChestShop.notax.sell made it so people could actually sell to our shops and earn money. I really don't understand how it works since we don't really have anything related to tax on our server, but I only think this is a bug since its not really what you would think you have to do enable to get it working. Especially if its related to tax, a system that most servers I play on don't use at all.

Edit: Hopefully this info helps

That permission is only used for a check where the player needs to not have that permission, not where the player has it. It also sounds unrelated to the original issue, please open a new one and provide all the requested information.

@mhbates
Copy link

mhbates commented Feb 19, 2021

I had the same issue today. The ChestShop.notax.sell permisison did the trick for me as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants