soknight / peconomy Goto Github PK
View Code? Open in Web Editor NEWSpigot economy plugin with unlimited currencies, vault support and more features
License: GNU General Public License v3.0
Spigot economy plugin with unlimited currencies, vault support and more features
License: GNU General Public License v3.0
The plugin loses connection at certain intervals and does not reconnect to the database.
Plugin version: 2.7.3
Log file: https://hastebin.com/oyexuxisoj.sql
Config file: https://hastebin.com/eguwasagut.yaml
So, I have tried to connect to MySQL and runeed into some problem.
The plugin start initialization and never get done.
This is the config file.
database:
# Should plugin use MySQL database as data storage?
# Specify 'true' to use SQLite or 'false' to use MySQL
use-sqlite: false
# MySQL configuration
host: 123.12.12.12
port: 3306
name: rh5623
user: rh5623
password: **********
Host IP and password omitted.
In the Console (Multicraft) this is the only message:
04.05 07:35:17 [Server] INFO [PEconomy] Loading PEconomy v2.0.2
And then, when trying to run /peco help, I get this:
04.05 07:49:52 [Server] INFO Kaxassa issued server command: /peco help
04.05 07:49:52 [Server] ERROR null
04.05 07:49:52 [Server] INFO org.bukkit.command.CommandException: Cannot execute command 'peco' in plugin PEconomy v2.0.2 - plugin is disabled.
04.05 07:49:52 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37) ~[paper-latest.jar:git-Paper-217]
04.05 07:49:52 [Server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[paper-latest.jar:git-Paper-217]
04.05 07:49:52 [Server] INFO at org.bukkit.craftbukkit.v1_15_R1.CraftServer.dispatchCommand(CraftServer.java:752) ~[paper-latest.jar:git-Paper-217]
04.05 07:49:52 [Server] INFO at net.minecraft.server.v1_15_R1.PlayerConnection.handleCommand(PlayerConnection.java:1826) ~[paper-latest.jar:git-Paper-217]
04.05 07:49:52 [Server] INFO at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1634) ~[paper-latest.jar:git-Paper-217]
04.05 07:49:52 [Server] INFO at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:47) ~[paper-latest.jar:git-Paper-217]
04.05 07:49:52 [Server] INFO at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:5) ~[paper-latest.jar:git-Paper-217]
04.05 07:49:52 [Server] INFO at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:23) ~[paper-latest.jar:git-Paper-217]
04.05 07:49:52 [Server] INFO at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) ~[paper-latest.jar:git-Paper-217]
04.05 07:49:52 [Server] INFO at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[paper-latest.jar:git-Paper-217]
04.05 07:49:52 [Server] INFO at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[paper-latest.jar:git-Paper-217]
04.05 07:49:52 [Server] INFO at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[paper-latest.jar:git-Paper-217]
04.05 07:49:52 [Server] INFO at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:1076) ~[paper-latest.jar:git-Paper-217]
04.05 07:49:52 [Server] INFO at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:1069) ~[paper-latest.jar:git-Paper-217]
04.05 07:49:52 [Server] INFO at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[paper-latest.jar:git-Paper-217]
04.05 07:49:52 [Server] INFO at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:1033) ~[paper-latest.jar:git-Paper-217]
04.05 07:49:52 [Server] INFO at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:950) ~[paper-latest.jar:git-Paper-217]
04.05 07:49:52 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_241]
When I switch back to use-sqlite: true
it runs properly.
By reference, I have two other plugins connected to MySQL (CoreProtect and nLogin).
(My English is a work in progress, also, first time reporting something in GitHub. Sorry for any mistakes).
I study English superficially from Russia. In the future, forgive my oblique language.
My idea is to let the player choose (command or menu) which currency he wants to transfer from (accordingly, not free of charge, but with a commission.)
Let's imagine the following situation. We have the main currency, then it can or cannot (depending on the setting) be converted into the second (donate currency) but with the condition (10> 1) and the second currency (50> 500).
/peco convert or /peco convert for 2 currency wallet.
When trying to use PEconomy with Vault, it will always state
[PEconomy] Vault default currency is not specified, ignoring it.
because it tries to look for the vault.currency
setting in the wrong config file (it looks in the config.yml
instead of the currencies.yml
).
When setting the vault.currency
setting in the config.yml
everything works as intended.
I believe this is caused by this line, which uses the configuration returned by getConfig()
instead of the one provided by AbstractConfig#getBukkitConfig()
.
The disable vault-hook option on the config is not respected at all. PEconomy is still hooking into vault after the config option has been disabled.
I picked a class in the source code to look at, and came here:
While this seems like harmless code, it is actually equally harmful as ignoring exceptions, as in the following code:
try {
// Do stuff
} catch (Throwable ignored) {
// Exception is lost!
}
CompletableFuture is infamous for swallowing exceptions. Run the following code snippet. No exception will be printed:
public class FutureMain {
public static void main(String[] args) {
CompletableFuture.supplyAsync(() -> {
return true;
}).thenAccept((value) -> {
throw new RuntimeException();
});
}
}
The issue is that if an exception occurs inside thenAccept, it will not be logged anywhere. For example, this exception will never be shown:
databaseManager.getWallet(name).thenAccept(wallet -> {
throw new IllegalStateException();
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.