leonidius20 / tradinginterface Goto Github PK
View Code? Open in Web Editor NEWShop system for NukkitX Minecraft Bedrock server, based on graphical interface.
Home Page: https://nukkitx.com/resources/trading-interface.113/
License: MIT License
Shop system for NukkitX Minecraft Bedrock server, based on graphical interface.
Home Page: https://nukkitx.com/resources/trading-interface.113/
License: MIT License
Hi I try to sell a item and it doesn't allow me to do so unfortunately. Every time I try to sell a item the shop interface states I have nothing to sell. I was wondering is there a fix to this issue ?
Doenst Work on PowerNukkit
Everytime my Server crashs when i try to sell a Item
A fatal error has been detected by the Java Runtime Environment:
--------------- T H R E A D ---------------
Current thread (0x0000558136e28000): JavaThread "main" [_thread_in_native, id=25, stack(0x00007eff0b1ee000,0x00007eff0b2eead0)]
siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x000000000000b32e
Registers:
RAX=0x0000000000000001, RBX=0x000055813b07fb18, RCX=0x000055813af1cea8, RDX=0x0000000000000018
RSP=0x00007eff0b2ec868, RBP=0x4049000000000000, RSI=0x0000000000000000, RDI=0x000055813b07fb18
R8 =0x0000000000000000, R9 =0x00007eff0b2eeb10, R10=0x0000000000000019, R11=0x00007efecf56a060
R12=0x0000000000000000, R13=0x4049000000000000, R14=0x00007eff0b2ec990, R15=0x0000558136e28000
RIP=0x000000000000b32e, EFLAGS=0x0000000000010246, CSGSFS=0x002b000000000033, ERR=0x0000000000000014
TRAPNO=0x000000000000000e
Top of Stack: (sp=0x00007eff0b2ec868)
0x00007eff0b2ec868: 00007efecf56acdd 4049000000000000
0x00007eff0b2ec878: 000055813b07fb88 0000000000000003
0x00007eff0b2ec888: 00007efecf58a620 4049000000000000
0x00007eff0b2ec898: 00007efed0daaec8 00007eff0b2ec948
0x00007eff0b2ec8a8: 0000000000000000 00007efed0daaec8
0x00007eff0b2ec8b8: 00007efefc1ad973 0000558136e28000
0x00007eff0b2ec8c8: 00007eff0b86d649 0000558136e28000
0x00007eff0b2ec8d8: 0000558136e28000 00000007c057db38
0x00007eff0b2ec8e8: 00007efed0daaec8 00007eff0b2ec948
0x00007eff0b2ec8f8: 00007efefc1ad547 0000000576e45340
0x00007eff0b2ec908: 00007eff0b2ec8f8 00007efed0daaec8
0x00007eff0b2ec918: 00007eff0b2ec990 00007efed0de1cc8
0x00007eff0b2ec928: 0000000000000000 00007efed0daaec8
0x00007eff0b2ec938: 0000000000000000 00007eff0b2ec968
0x00007eff0b2ec948: 00007eff0b2ec9e8 00007efefc19ca40
0x00007eff0b2ec958: 0000000000000000 00007efefc1a6a56
0x00007eff0b2ec968: 4049000000000000 000000060e17dad8
0x00007eff0b2ec978: 0000000000000003 000055813b07fb88
0x00007eff0b2ec988: 00007eff0b96b60f 0000000576e45340
0x00007eff0b2ec998: 0000558136e28000 0000000576e45340
0x00007eff0b2ec9a8: 00007eff0b2ec998 00007efed0da797e
0x00007eff0b2ec9b8: 00007eff0b2eca18 00007efed0de12f0
0x00007eff0b2ec9c8: 0000000000000000 00007efed0da7a18
0x00007eff0b2ec9d8: 00007eff0b2ec968 00007eff0b2ec9f8
0x00007eff0b2ec9e8: 00007eff0b2eca70 00007efefc19ca40
0x00007eff0b2ec9f8: 000000060e17dad8 0000000000000003
0x00007eff0b2eca08: 000055813b07fb88 00000007c057db38
0x00007eff0b2eca18: 0000000576e45340 0000558136e28000
0x00007eff0b2eca28: 0000000576e45340 00007eff0b2eca20
0x00007eff0b2eca38: 00007efed0da7dc1 00007eff0b2ecaa8
0x00007eff0b2eca48: 00007efed0de12f0 0000000000000000
0x00007eff0b2eca58: 00007efed0da7ec8 00007eff0b2ec9f8
Instructions: (pc=0x000000000000b32e)
0x000000000000b30e:
[error occurred during error reporting (printing registers, top of stack, instructions near pc), id 0xb]
Register to memory mapping:
RAX=0x0000000000000001 is an unknown value
RBX=0x000055813b07fb18 is an unknown value
RCX=0x000055813af1cea8 is an unknown value
RDX=0x0000000000000018 is an unknown value
RSP=0x00007eff0b2ec868 is pointing into the stack for thread: 0x0000558136e28000
RBP=0x4049000000000000 is an unknown value
RSI=0x0000000000000000 is an unknown value
RDI=0x000055813b07fb18 is an unknown value
R8 =0x0000000000000000 is an unknown value
R9 =0x00007eff0b2eeb10 is an unknown value
R10=0x0000000000000019 is an unknown value
R11=0x00007efecf56a060: <offset 0x2e060> in /tmp/sqlite-3.25.2-9bf5adc3-c4cb-4cc5-82c7-b1c3b0e958d2-libsqlitejdbc.so at 0x00007efecf53c000
R12=0x0000000000000000 is an unknown value
R13=0x4049000000000000 is an unknown value
R14=0x00007eff0b2ec990 is pointing into the stack for thread: 0x0000558136e28000
R15=0x0000558136e28000 is a thread
Stack: [0x00007eff0b1ee000,0x00007eff0b2eead0], sp=0x00007eff0b2ec868, free space=1018k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C 0x000000000000b32e
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j org.sqlite.core.NativeDB.bind_double(JID)I+0
j org.sqlite.core.DB.sqlbind(JILjava/lang/Object;)I+126
j org.sqlite.core.DB.execute(Lorg/sqlite/core/CoreStatement;[Ljava/lang/Object;)Z+81
j org.sqlite.core.DB.executeUpdate(Lorg/sqlite/core/CoreStatement;[Ljava/lang/Object;)I+3
j org.sqlite.jdbc3.JDBC3PreparedStatement.executeUpdate()I+59
j com.j256.ormlite.jdbc.JdbcDatabaseConnection.insert(Ljava/lang/String;[Ljava/lang/Object;[Lcom/j256/ormlite/field/FieldType;Lcom/j256/ormlite/support/GeneratedKeyHolder;)I+43
j com.j256.ormlite.stmt.mapped.MappedCreate.insert(Lcom/j256/ormlite/db/DatabaseType;Lcom/j256/ormlite/support/DatabaseConnection;Ljava/lang/Object;Lcom/j256/ormlite/dao/ObjectCache;)I+311
j com.j256.ormlite.stmt.StatementExecutor.create(Lcom/j256/ormlite/support/DatabaseConnection;Ljava/lang/Object;Lcom/j256/ormlite/dao/ObjectCache;)I+33
j com.j256.ormlite.dao.BaseDaoImpl.create(Ljava/lang/Object;)I+54
j ua.leonidius.trdinterface.controllers.sell.edit.AddSellableItemController.submitDetails(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V+57
j ua.leonidius.trdinterface.views.screens.ItemDetailsEditScreen.onResponse(Lcn/nukkit/event/player/PlayerFormRespondedEvent;)V+48
j ua.leonidius.trdinterface.Trading.onFormResponse(Lcn/nukkit/event/player/PlayerFormRespondedEvent;)V+27
v ~StubRoutines::call_stub
J 4785 sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (0 bytes) @ 0x00007efefce0e837 [0x00007efefce0e7c0+0x77]
J 4784 C1 sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; (104 bytes) @ 0x00007efefce0da5c [0x00007efefce0c860+0x11fc]
J 7596 C2 cn.nukkit.plugin.PluginManager.callEvent(Lcn/nukkit/event/Event;)V (162 bytes) @ 0x00007efefd6e8d74 [0x00007efefd6e8ae0+0x294]
j cn.nukkit.Player.handleDataPacket(Lcn/nukkit/network/protocol/DataPacket;)V+4017
J 6966 C1 cn.nukkit.network.Network.lambda$processPackets$3(Lcn/nukkit/Player;Lcn/nukkit/network/protocol/DataPacket;)V (53 bytes) @ 0x00007efefd5012ec [0x00007efefd501260+0x8c]
J 6965 C1 cn.nukkit.network.Network$$Lambda$143.accept(Ljava/lang/Object;)V (12 bytes) @ 0x00007efefd4ff4dc [0x00007efefd4ff380+0x15c]
J 6502 C1 java.util.ArrayList.forEach(Ljava/util/function/Consumer;)V (75 bytes) @ 0x00007efefd3a03f4 [0x00007efefd3a01e0+0x214]
J 6955 C1 cn.nukkit.network.Network.processBatch(Lcn/nukkit/network/protocol/BatchPacket;Lcn/nukkit/Player;)V (293 bytes) @ 0x00007efefd4f5a24 [0x00007efefd4f2000+0x3a24]
j cn.nukkit.Player.handleDataPacket(Lcn/nukkit/network/protocol/DataPacket;)V+97
J 6282 C1 cn.nukkit.network.RakNetInterface.process()Z (98 bytes) @ 0x00007efefd29cbe4 [0x00007efefd29c780+0x464]
J 6281 C1 cn.nukkit.network.Network.processInterfaces()V (114 bytes) @ 0x00007efefd297894 [0x00007efefd297480+0x414]
J 5791 C1 cn.nukkit.Server.tick()Z (605 bytes) @ 0x00007efefd0d582c [0x00007efefd0d50a0+0x78c]
j cn.nukkit.Server.tickProcessor()V+18
j cn.nukkit.Server.start()V+160
j cn.nukkit.Server.(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V+4470
j cn.nukkit.Nukkit.main([Ljava/lang/String;)V+292
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x00005581396cf800 JavaThread "Network Listener - #12" daemon [_thread_in_native, id=101, stack(0x00007efecd69f000,0x00007efecd79fad0)]
0x000055813989a000 JavaThread "pool-8-thread-1" [_thread_blocked, id=100, stack(0x00007efecd7a0000,0x00007efecd8a0ad0)]
0x0000558138e18000 JavaThread "Network Listener - #11" daemon [_thread_in_native, id=97, stack(0x00007efecc521000,0x00007efecc621ad0)]
0x000055813b70d000 JavaThread "Nukkit Asynchronous Task Handler #10" daemon [_thread_blocked, id=95, stack(0x00007efecc622000,0x00007efecc722ad0)]
0x0000558138c6d800 JavaThread "Nukkit Asynchronous Task Handler #9" daemon [_thread_blocked, id=94, stack(0x00007efecc723000,0x00007efecc823ad0)]
0x000055813bf8b000 JavaThread "Nukkit Asynchronous Task Handler #8" daemon [_thread_blocked, id=93, stack(0x00007efecc824000,0x00007efecc924ad0)]
0x000055813ae87000 JavaThread "Nukkit Asynchronous Task Handler #7" daemon [_thread_blocked, id=92, stack(0x00007efecc925000,0x00007efecca25ad0)]
0x000055813ae86000 JavaThread "Nukkit Asynchronous Task Handler #6" daemon [_thread_in_native, id=91, stack(0x00007efecca26000,0x00007efeccb26ad0)]
0x0000558139f5a800 JavaThread "Timer-1" daemon [_thread_blocked, id=89, stack(0x00007efeccc28000,0x00007efeccd28ad0)]
0x000055813bfa4800 JavaThread "Nukkit Asynchronous Task Handler #5" daemon [_thread_in_native, id=88, stack(0x00007efeccd29000,0x00007efecce29ad0)]
0x000055813a9d6000 JavaThread "Nukkit Asynchronous Task Handler #4" daemon [_thread_blocked, id=87, stack(0x00007efecce2a000,0x00007efeccf2aad0)]
0x000055813a9d4800 JavaThread "Nukkit Asynchronous Task Handler #3" daemon [_thread_blocked, id=86, stack(0x00007efeccf2b000,0x00007efecd02bad0)]
0x000055813ae31000 JavaThread "Nukkit Asynchronous Task Handler #2" daemon [_thread_in_native, id=85, stack(0x00007efecd02c000,0x00007efecd12cad0)]
0x0000558137a43000 JavaThread "Nukkit Asynchronous Task Handler #1" daemon [_thread_blocked, id=84, stack(0x00007efecd12d000,0x00007efecd22dad0)]
0x0000558137ea7800 JavaThread "Nukkit Asynchronous Task Handler #0" daemon [_thread_blocked, id=83, stack(0x00007efecd22e000,0x00007efecd32ead0)]
0x00005581393fb800 JavaThread "Watchdog" daemon [_thread_blocked, id=82, stack(0x00007efecd32f000,0x00007efecd42fad0)]
0x0000558138429800 JavaThread "HSQLDB Timer @52bcd7c9" daemon [_thread_blocked, id=78, stack(0x00007efed07ce000,0x00007efed08cead0)]
0x000055813aaaa000 JavaThread "Timer-0" [_thread_blocked, id=77, stack(0x00007efece594000,0x00007efece694ad0)]
0x00005581386ac000 JavaThread "Abandoned connection cleanup thread" daemon [_thread_blocked, id=76, stack(0x00007efecf836000,0x00007efecf936ad0)]
0x000055813a2f9800 JavaThread "Network Listener - #10" daemon [_thread_in_native, id=75, stack(0x00007efecf937000,0x00007efecfa37ad0)]
0x0000558138b1b000 JavaThread "Network Listener - #9" daemon [_thread_in_native, id=74, stack(0x00007efecfb2a000,0x00007efecfc2aad0)]
0x0000558138b1a000 JavaThread "Network Listener - #8" daemon [_thread_in_native, id=73, stack(0x00007efecfc2b000,0x00007efecfd2bad0)]
0x0000558138b18000 JavaThread "Network Listener - #7" daemon [_thread_in_native, id=72, stack(0x00007efecfd2c000,0x00007efecfe2cad0)]
0x000055813a39a800 JavaThread "Network Listener - #6" daemon [_thread_in_native, id=71, stack(0x00007efecfe2d000,0x00007efecff2dad0)]
0x000055813a398000 JavaThread "Network Listener - #5" daemon [_thread_in_native, id=70, stack(0x00007efecff2e000,0x00007efed002ead0)]
0x000055813aa54000 JavaThread "Network Listener - #4" daemon [_thread_in_native, id=69, stack(0x00007efed002f000,0x00007efed012fad0)]
0x000055813aa52000 JavaThread "Network Listener - #3" daemon [_thread_in_native, id=68, stack(0x00007efed0130000,0x00007efed0230ad0)]
0x000055813ab50000 JavaThread "Network Listener - #2" daemon [_thread_in_native, id=67, stack(0x00007efed0231000,0x00007efed0331ad0)]
0x000055813ab4e000 JavaThread "Network Listener - #1" daemon [_thread_in_native, id=66, stack(0x00007efed0332000,0x00007efed0432ad0)]
0x000055813a27f800 JavaThread "Network Listener - #0" daemon [_thread_in_native, id=65, stack(0x00007efed0433000,0x00007efed0533ad0)]
0x0000558138229800 JavaThread "Thread-1" [_thread_in_native, id=64, stack(0x00007efed2640000,0x00007efed2740ad0)]
0x0000558137949800 JavaThread "Service Thread" daemon [_thread_blocked, id=58, stack(0x00007efed60f1000,0x00007efed61f1ad0)]
0x000055813792e000 JavaThread "C1 CompilerThread3" daemon [_thread_blocked, id=57, stack(0x00007efed61f3000,0x00007efed62f3ad0)]
0x0000558137916000 JavaThread "C2 CompilerThread2" daemon [_thread_blocked, id=56, stack(0x00007efed62f5000,0x00007efed63f5ad0)]
0x0000558137913000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=55, stack(0x00007efed63f7000,0x00007efed64f7ad0)]
0x0000558137911000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=54, stack(0x00007efed64f9000,0x00007efed65f9ad0)]
0x000055813790e800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=53, stack(0x00007efed65fa000,0x00007efed66faad0)]
0x000055813790c800 JavaThread "Surrogate Locker Thread (Concurrent GC)" daemon [_thread_blocked, id=52, stack(0x00007efed66fb000,0x00007efed67fbad0)]
0x00005581378da800 JavaThread "Finalizer" daemon [_thread_blocked, id=51, stack(0x00007efed67fd000,0x00007efed68fdad0)]
0x00005581378d7800 JavaThread "Reference Handler" daemon [_thread_blocked, id=50, stack(0x00007efed68fe000,0x00007efed69fead0)]
=>0x0000558136e28000 JavaThread "main" [_thread_in_native, id=25, stack(0x00007eff0b1ee000,0x00007eff0b2eead0)]
Other Threads:
0x00005581378cd800 VMThread [stack: 0x00007efed6a00000,0x00007efed6b00ad0] [id=49]
0x000055813794d000 WatcherThread [stack: 0x00007efed5ff0000,0x00007efed60f0ad0] [id=59]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
heap address: 0x00000004c0000000, size: 12288 MB, Compressed Oops mode: Zero based, Oop shift amount: 3
Narrow klass base: 0x0000000000000000, Narrow klass shift: 3
Compressed class space size: 1073741824 Address: 0x00000007c0000000
Heap:
garbage-first heap total 6291456K, used 1009560K [0x00000004c0000000, 0x00000004c0403000, 0x00000007c0000000)
region size 4096K, 246 young (1007616K), 46 survivors (188416K)
Metaspace used 67946K, capacity 71016K, committed 71068K, reserved 1110016K
class space used 8911K, capacity 9673K, committed 9676K, reserved 1048576K
Heap Regions: (Y=young(eden), SU=young(survivor), HS=humongous(starts), HC=humongous(continues), CS=collection set, F=free, TS=gc time stamp, PTAMS=previous top-at-mark-start, NTAMS=next top-at-mark-start)
When players with space in their names try to access the shop GUI, it prevents it by saying "unknown command". This is a major bug on my server, so please fix it ASAP. Thank you!
In branch 'rewrite'
Add an option, in config.yml, to define the limit number that the person has to buy the item per purchase screen! Because it is very bad when selecting, with the standard limit, when the person only wants to buy 2, for example, and can only select 0 or 6.
Example in config.yml:
buy-limit: 128
Trading_Interface v2.0.0
[36m11:13:48[m [[m[34mINFO [m[m] creating table 'shops'
[36m11:13:48[m [[m[34mINFO [m[m] executed create table statement changed 0 rows: CREATE TABLE IF NOT EXISTS shops
(record_id
INTEGER PRIMARY KEY AUTOINCREMENT , name
VARCHAR NOT NULL , UNIQUE (name
))
[36m11:13:48[m [[m[34mINFO [m[m] creating table 'categories'
[36m11:13:48[m [[m[34mINFO [m[m] executed create table statement changed 1 rows: CREATE TABLE IF NOT EXISTS categories
(record_id
INTEGER PRIMARY KEY AUTOINCREMENT , shop_id
INTEGER NOT NULL , name
VARCHAR NOT NULL , UNIQUE (name
))
[36m11:13:48[m [[m[34mINFO [m[m] creating table 'buyable_items'
[36m11:13:48[m [[m[34mINFO [m[m] executed create table statement changed 1 rows: CREATE TABLE IF NOT EXISTS buyable_items
(record_id
INTEGER PRIMARY KEY AUTOINCREMENT , shop_id
INTEGER NOT NULL , category_id
INTEGER NOT NULL , item_id
VARCHAR NOT NULL , price
DOUBLE PRECISION NOT NULL , nbt
BLOB )
[36m11:13:48[m [[m[34mINFO [m[m] creating table 'sellable_items'
[36m11:13:48[m [[m[34mINFO [m[m] executed create table statement changed 1 rows: CREATE TABLE IF NOT EXISTS sellable_items
(record_id
INTEGER PRIMARY KEY AUTOINCREMENT , shop_id
INTEGER NOT NULL , item_id
VARCHAR NOT NULL , price
DOUBLE PRECISION NOT NULL , nbt
BLOB )
[36m11:13:48[m [[m[34mINFO [m[m] creating table 'discounts'
[36m11:13:48[m [[m[34mINFO [m[m] executed create table statement changed 1 rows: CREATE TABLE IF NOT EXISTS discounts
(record_id
INTEGER PRIMARY KEY AUTOINCREMENT , item_id
INTEGER NOT NULL , percent
DOUBLE PRECISION NOT NULL , end_time
BIGINT NOT NULL , UNIQUE (item_id
))
[36m11:13:48[m [[m[34mINFO [m[m] creating table 'translations'
[36m11:13:48[m [[m[34mINFO [m[m] executed create table statement changed 1 rows: CREATE TABLE IF NOT EXISTS translations
(record_id
INTEGER PRIMARY KEY AUTOINCREMENT , item_id
VARCHAR NOT NULL , translation
VARCHAR NOT NULL )
[36m11:13:48[m [[m[34mINFO [m[m]
Can you support image for Form? Form support image now, so it will be easy to know what block or item is. And it will make this plugin very confident.
Hey!
If users get, say, a diamond, which on my server is sold for quite a bit, players can rename that diamond to diamond, then sell it, and make infinite cash.
Please do resolve this issue!
Thanks!
Can you add pages to edit sell UI? It is too slow when it load sell UI because it load all at same time.
Thank you so much for creating such a nice plugin!
Can you add new feature to this plugin? For example, you can only buy items. What if the command is also available for purchase? For example, if you buy a product, the custom command like "/effect %p 1 200 0 true" will be executed. Or you can put command like enchat command so you can make enchant shop too! (%p mean the player that buy it. For example, Minecrafter buy this command, then "/effect Minecrafter 1 200 0 true" will be executed.)
Then thank you very much!
There is a serious bug!
When it arrives at the part of the item you want to sell, you click on the item you want to sell, throw it away while it is in transition, and it still considers the item to be in the inventory, but not in the inventory! So he just clicks to sell and doesn't take anything from his inventory, considering he did!
Is there any way to add customised shulker box that contains several items into the shop?
Can the plugin show how much it costs per item before selling it to the store?
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.