Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/main/java/net/Indyuce/mmocore/skill/cast/listener/KeyCombos.java
This commit is contained in:
Ka0rX 2022-08-08 19:10:00 +02:00
commit 57e56ddd86
58 changed files with 5073 additions and 797 deletions

536
hs_err_pid12252.log Normal file
View File

@ -0,0 +1,536 @@
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 65536 bytes for Failed to commit metaspace.
# Possible reasons:
# The system is out of physical RAM or swap space
# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# JVM is running with Unscaled Compressed Oops mode in which the Java heap is
# placed in the first 4GB address space. The Java Heap base address is the
# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress
# to set the Java Heap base and to place the Java Heap above 4GB virtual address.
# This output file may be truncated or incomplete.
#
# Out of Memory Error (virtualSpaceNode.cpp:110), pid=12252, tid=5504
#
# JRE version: Java(TM) SE Runtime Environment (18.0.1+10) (build 18.0.1+10-24)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (18.0.1+10-24, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
--------------- S U M M A R Y ------------
Command Line: -Dmaven.multiModuleProjectDirectory=C:\Users\guill\gitProjects\mmocore -Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3 -Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\bin\m2.conf -Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven-event-listener.jar -Dfile.encoding=UTF-8 org.codehaus.classworlds.Launcher -Didea.version=2021.1.2 install --non-recursive
Host: AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx , 8 cores, 5G, Windows 10 , 64 bit Build 19041 (10.0.19041.1706)
Time: Tue May 24 23:24:28 2022 Paris, Madrid (heure duild 19041 (10.0.19041.1706) elapsed time: 0.830927 seconds (0d 0h 0m 0s)
--------------- T H R E A D ---------------
Current thread (0x00000196db61cea0): JavaThread "C1 CompilerThread0" daemon [_thread_in_vm, id=5504, stack(0x000000221d000000,0x000000221d100000)]
Current CompileTask:
C1: 831 545 3 jdk.internal.loader.ClassLoaders$AppClassLoader::loadClass (40 bytes)
Stack: [0x000000221d000000,0x000000221d100000]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x69887a]
V [jvm.dll+0x7f38bd]
V [jvm.dll+0x7f51ce]
V [jvm.dll+0x7f5883]
V [jvm.dll+0x25ca3f]
V [jvm.dll+0x7ef5cb]
V [jvm.dll+0x63ea76]
V [jvm.dll+0x63eada]
V [jvm.dll+0x64135e]
V [jvm.dll+0x64121e]
V [jvm.dll+0x63f43e]
V [jvm.dll+0x650d9a]
V [jvm.dll+0x649c8a]
V [jvm.dll+0x1e4700]
V [jvm.dll+0x1e48e6]
V [jvm.dll+0x1485de]
V [jvm.dll+0x148926]
V [jvm.dll+0x147d9a]
V [jvm.dll+0x149a81]
V [jvm.dll+0x23e8ca]
V [jvm.dll+0x23cbb5]
V [jvm.dll+0x7a5fb1]
V [jvm.dll+0x7a03ea]
V [jvm.dll+0x697725]
C [ucrtbase.dll+0x21bb2]
C [KERNEL32.DLL+0x17034]
C [ntdll.dll+0x52651]
--------------- P R O C E S S ---------------
Threads class SMR info:
_java_thread_list=0x00000196df8513a0, length=12, elements={
0x00000196be777660, 0x00000196db5e6ac0, 0x00000196db5e7720, 0x00000196db603f40,
0x00000196db6058f0, 0x00000196db606290, 0x00000196db606d70, 0x00000196db608b90,
0x00000196db61cea0, 0x00000196db6333c0, 0x00000196df884700, 0x00000196df8888a0
}
Java Threads: ( => current thread )
0x00000196be777660 JavaThread "main" [_thread_in_vm, id=16080, stack(0x000000221c200000,0x000000221c300000)]
0x00000196db5e6ac0 JavaThread "Reference Handler" daemon [_thread_blocked, id=3240, stack(0x000000221c900000,0x000000221ca00000)]
0x00000196db5e7720 JavaThread "Finalizer" daemon [_thread_blocked, id=31388, stack(0x000000221ca00000,0x000000221cb00000)]
0x00000196db603f40 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=27972, stack(0x000000221cb00000,0x000000221cc00000)]
0x00000196db6058f0 JavaThread "Attach Listener" daemon [_thread_blocked, id=29668, stack(0x000000221cc00000,0x000000221cd00000)]
0x00000196db606290 JavaThread "Service Thread" daemon [_thread_blocked, id=28240, stack(0x000000221cd00000,0x000000221ce00000)]
0x00000196db606d70 JavaThread "Monitor Deflation Thread" daemon [_thread_blocked, id=1896, stack(0x000000221ce00000,0x000000221cf00000)]
0x00000196db608b90 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=27540, stack(0x000000221cf00000,0x000000221d000000)]
=>0x00000196db61cea0 JavaThread "C1 CompilerThread0" daemon [_thread_in_vm, id=5504, stack(0x000000221d000000,0x000000221d100000)]
0x00000196db6333c0 JavaThread "Sweeper thread" daemon [_thread_blocked, id=25016, stack(0x000000221d100000,0x000000221d200000)]
0x00000196df884700 JavaThread "Notification Thread" daemon [_thread_blocked, id=36124, stack(0x000000221d200000,0x000000221d300000)]
0x00000196df8888a0 JavaThread "Common-Cleaner" daemon [_thread_blocked, id=20016, stack(0x000000221d400000,0x000000221d500000)]
Other Threads:
0x00000196be7eab00 VMThread "VM Thread" [stack: 0x000000221c800000,0x000000221c900000] [id=8764]
0x00000196df887a00 WatcherThread "VM Periodic Task Thread" [stack: 0x000000221d300000,0x000000221d400000] [id=36084]
0x00000196be7c7f90 WorkerThread "GC Thread#0" [stack: 0x000000221c300000,0x000000221c400000] [id=33236]
0x00000196be7d5d20 ConcurrentGCThread "G1 Main Marker" [stack: 0x000000221c400000,0x000000221c500000] [id=9264]
0x00000196be7d6eb0 WorkerThread "G1 Conc#0" [stack: 0x000000221c500000,0x000000221c600000] [id=9172]
0x00000196be81e530 ConcurrentGCThread "G1 Refine#0" [stack: 0x000000221c600000,0x000000221c700000] [id=25384]
0x00000196be81ee40 ConcurrentGCThread "G1 Service" [stack: 0x000000221c700000,0x000000221c800000] [id=22176]
Threads with active compile tasks:
C1 CompilerThread0 969 545 3 jdk.internal.loader.ClassLoaders$AppClassLoader::loadClass (40 bytes)
VM state: not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
[0x00000196be771460] Metaspace_lock - owner thread: 0x00000196db61cea0
[0x00000196be773730] MethodData_lock - owner thread: 0x00000196db61cea0
Heap address: 0x00000000a1400000, size: 1516 MB, Compressed Oops mode: 32-bit
CDS archive(s) mapped at: [0x0000000800000000-0x0000000800ba0000-0x0000000800ba0000), size 12189696, SharedBaseAddress: 0x0000000800000000, ArchiveRelocationMode: 0.
Compressed class space mapped at: 0x0000000800c00000-0x0000000840c00000, reserved size: 1073741824
Narrow klass base: 0x0000000800000000, Narrow klass shift: 0, Narrow klass range: 0x100000000
GC Precious Log:
CardTable entry size: 512
Card Set container configuration: InlinePtr #cards 5 size 8 Array Of Cards #cards 12 size 40 Howl #buckets 4 coarsen threshold 1843 Howl Bitmap #cards 512 size 80 coarsen threshold 460 Card regions per heap region 1 cards per card region 2048
CPUs: 8 total, 8 available
Memory: 6061M
Large Page Support: Disabled
NUMA Support: Disabled
Compressed Oops: Enabled (32-bit)
Heap Region Size: 1M
Heap Min Capacity: 8M
Heap Initial Capacity: 96M
Heap Max Capacity: 1516M
Pre-touch: Disabled
Parallel Workers: 8
Concurrent Workers: 2
Concurrent Refinement Workers: 8
Periodic GC: Disabled
Heap:
garbage-first heap total 98304K, used 5120K [0x00000000a1400000, 0x0000000100000000)
region size 1024K, 7 young (7168K), 0 survivors (0K)
Metaspace used 2358K, committed 2496K, reserved 1114112K
class space used 212K, committed 320K, reserved 1048576K
Heap Regions: E=young(eden), S=young(survivor), O=old, HS=humongous(starts), HC=humongous(continues), CS=collection set, F=free, OA=open archive, CA=closed archive, TAMS=top-at-mark-start (previous, next)
| 0|0x00000000a1400000, 0x00000000a1400000, 0x00000000a1500000| 0%| F| |TAMS 0x00000000a1400000, 0x00000000a1400000| Untracked
| 1|0x00000000a1500000, 0x00000000a1500000, 0x00000000a1600000| 0%| F| |TAMS 0x00000000a1500000, 0x00000000a1500000| Untracked
| 2|0x00000000a1600000, 0x00000000a1600000, 0x00000000a1700000| 0%| F| |TAMS 0x00000000a1600000, 0x00000000a1600000| Untracked
| 3|0x00000000a1700000, 0x00000000a1700000, 0x00000000a1800000| 0%| F| |TAMS 0x00000000a1700000, 0x00000000a1700000| Untracked
| 4|0x00000000a1800000, 0x00000000a1800000, 0x00000000a1900000| 0%| F| |TAMS 0x00000000a1800000, 0x00000000a1800000| Untracked
| 5|0x00000000a1900000, 0x00000000a1900000, 0x00000000a1a00000| 0%| F| |TAMS 0x00000000a1900000, 0x00000000a1900000| Untracked
| 6|0x00000000a1a00000, 0x00000000a1a00000, 0x00000000a1b00000| 0%| F| |TAMS 0x00000000a1a00000, 0x00000000a1a00000| Untracked
| 7|0x00000000a1b00000, 0x00000000a1b00000, 0x00000000a1c00000| 0%| F| |TAMS 0x00000000a1b00000, 0x00000000a1b00000| Untracked
| 8|0x00000000a1c00000, 0x00000000a1c00000, 0x00000000a1d00000| 0%| F| |TAMS 0x00000000a1c00000, 0x00000000a1c00000| Untracked
| 9|0x00000000a1d00000, 0x00000000a1d00000, 0x00000000a1e00000| 0%| F| |TAMS 0x00000000a1d00000, 0x00000000a1d00000| Untracked
| 10|0x00000000a1e00000, 0x00000000a1e00000, 0x00000000a1f00000| 0%| F| |TAMS 0x00000000a1e00000, 0x00000000a1e00000| Untracked
| 11|0x00000000a1f00000, 0x00000000a1f00000, 0x00000000a2000000| 0%| F| |TAMS 0x00000000a1f00000, 0x00000000a1f00000| Untracked
| 12|0x00000000a2000000, 0x00000000a2000000, 0x00000000a2100000| 0%| F| |TAMS 0x00000000a2000000, 0x00000000a2000000| Untracked
| 13|0x00000000a2100000, 0x00000000a2100000, 0x00000000a2200000| 0%| F| |TAMS 0x00000000a2100000, 0x00000000a2100000| Untracked
| 14|0x00000000a2200000, 0x00000000a2200000, 0x00000000a2300000| 0%| F| |TAMS 0x00000000a2200000, 0x00000000a2200000| Untracked
| 15|0x00000000a2300000, 0x00000000a2300000, 0x00000000a2400000| 0%| F| |TAMS 0x00000000a2300000, 0x00000000a2300000| Untracked
| 16|0x00000000a2400000, 0x00000000a2400000, 0x00000000a2500000| 0%| F| |TAMS 0x00000000a2400000, 0x00000000a2400000| Untracked
| 17|0x00000000a2500000, 0x00000000a2500000, 0x00000000a2600000| 0%| F| |TAMS 0x00000000a2500000, 0x00000000a2500000| Untracked
| 18|0x00000000a2600000, 0x00000000a2600000, 0x00000000a2700000| 0%| F| |TAMS 0x00000000a2600000, 0x00000000a2600000| Untracked
| 19|0x00000000a2700000, 0x00000000a2700000, 0x00000000a2800000| 0%| F| |TAMS 0x00000000a2700000, 0x00000000a2700000| Untracked
| 20|0x00000000a2800000, 0x00000000a2800000, 0x00000000a2900000| 0%| F| |TAMS 0x00000000a2800000, 0x00000000a2800000| Untracked
| 21|0x00000000a2900000, 0x00000000a2900000, 0x00000000a2a00000| 0%| F| |TAMS 0x00000000a2900000, 0x00000000a2900000| Untracked
| 22|0x00000000a2a00000, 0x00000000a2a00000, 0x00000000a2b00000| 0%| F| |TAMS 0x00000000a2a00000, 0x00000000a2a00000| Untracked
| 23|0x00000000a2b00000, 0x00000000a2b00000, 0x00000000a2c00000| 0%| F| |TAMS 0x00000000a2b00000, 0x00000000a2b00000| Untracked
| 24|0x00000000a2c00000, 0x00000000a2c00000, 0x00000000a2d00000| 0%| F| |TAMS 0x00000000a2c00000, 0x00000000a2c00000| Untracked
| 25|0x00000000a2d00000, 0x00000000a2d00000, 0x00000000a2e00000| 0%| F| |TAMS 0x00000000a2d00000, 0x00000000a2d00000| Untracked
| 26|0x00000000a2e00000, 0x00000000a2e00000, 0x00000000a2f00000| 0%| F| |TAMS 0x00000000a2e00000, 0x00000000a2e00000| Untracked
| 27|0x00000000a2f00000, 0x00000000a2f00000, 0x00000000a3000000| 0%| F| |TAMS 0x00000000a2f00000, 0x00000000a2f00000| Untracked
| 28|0x00000000a3000000, 0x00000000a3000000, 0x00000000a3100000| 0%| F| |TAMS 0x00000000a3000000, 0x00000000a3000000| Untracked
| 29|0x00000000a3100000, 0x00000000a3100000, 0x00000000a3200000| 0%| F| |TAMS 0x00000000a3100000, 0x00000000a3100000| Untracked
| 30|0x00000000a3200000, 0x00000000a3200000, 0x00000000a3300000| 0%| F| |TAMS 0x00000000a3200000, 0x00000000a3200000| Untracked
| 31|0x00000000a3300000, 0x00000000a3300000, 0x00000000a3400000| 0%| F| |TAMS 0x00000000a3300000, 0x00000000a3300000| Untracked
| 32|0x00000000a3400000, 0x00000000a3400000, 0x00000000a3500000| 0%| F| |TAMS 0x00000000a3400000, 0x00000000a3400000| Untracked
| 33|0x00000000a3500000, 0x00000000a3500000, 0x00000000a3600000| 0%| F| |TAMS 0x00000000a3500000, 0x00000000a3500000| Untracked
| 34|0x00000000a3600000, 0x00000000a3600000, 0x00000000a3700000| 0%| F| |TAMS 0x00000000a3600000, 0x00000000a3600000| Untracked
| 35|0x00000000a3700000, 0x00000000a3700000, 0x00000000a3800000| 0%| F| |TAMS 0x00000000a3700000, 0x00000000a3700000| Untracked
| 36|0x00000000a3800000, 0x00000000a3800000, 0x00000000a3900000| 0%| F| |TAMS 0x00000000a3800000, 0x00000000a3800000| Untracked
| 37|0x00000000a3900000, 0x00000000a3900000, 0x00000000a3a00000| 0%| F| |TAMS 0x00000000a3900000, 0x00000000a3900000| Untracked
| 38|0x00000000a3a00000, 0x00000000a3a00000, 0x00000000a3b00000| 0%| F| |TAMS 0x00000000a3a00000, 0x00000000a3a00000| Untracked
| 39|0x00000000a3b00000, 0x00000000a3b00000, 0x00000000a3c00000| 0%| F| |TAMS 0x00000000a3b00000, 0x00000000a3b00000| Untracked
| 40|0x00000000a3c00000, 0x00000000a3c00000, 0x00000000a3d00000| 0%| F| |TAMS 0x00000000a3c00000, 0x00000000a3c00000| Untracked
| 41|0x00000000a3d00000, 0x00000000a3d00000, 0x00000000a3e00000| 0%| F| |TAMS 0x00000000a3d00000, 0x00000000a3d00000| Untracked
| 42|0x00000000a3e00000, 0x00000000a3e00000, 0x00000000a3f00000| 0%| F| |TAMS 0x00000000a3e00000, 0x00000000a3e00000| Untracked
| 43|0x00000000a3f00000, 0x00000000a3f00000, 0x00000000a4000000| 0%| F| |TAMS 0x00000000a3f00000, 0x00000000a3f00000| Untracked
| 44|0x00000000a4000000, 0x00000000a4000000, 0x00000000a4100000| 0%| F| |TAMS 0x00000000a4000000, 0x00000000a4000000| Untracked
| 45|0x00000000a4100000, 0x00000000a4100000, 0x00000000a4200000| 0%| F| |TAMS 0x00000000a4100000, 0x00000000a4100000| Untracked
| 46|0x00000000a4200000, 0x00000000a4200000, 0x00000000a4300000| 0%| F| |TAMS 0x00000000a4200000, 0x00000000a4200000| Untracked
| 47|0x00000000a4300000, 0x00000000a4300000, 0x00000000a4400000| 0%| F| |TAMS 0x00000000a4300000, 0x00000000a4300000| Untracked
| 48|0x00000000a4400000, 0x00000000a4400000, 0x00000000a4500000| 0%| F| |TAMS 0x00000000a4400000, 0x00000000a4400000| Untracked
| 49|0x00000000a4500000, 0x00000000a4500000, 0x00000000a4600000| 0%| F| |TAMS 0x00000000a4500000, 0x00000000a4500000| Untracked
| 50|0x00000000a4600000, 0x00000000a4600000, 0x00000000a4700000| 0%| F| |TAMS 0x00000000a4600000, 0x00000000a4600000| Untracked
| 51|0x00000000a4700000, 0x00000000a4700000, 0x00000000a4800000| 0%| F| |TAMS 0x00000000a4700000, 0x00000000a4700000| Untracked
| 52|0x00000000a4800000, 0x00000000a4800000, 0x00000000a4900000| 0%| F| |TAMS 0x00000000a4800000, 0x00000000a4800000| Untracked
| 53|0x00000000a4900000, 0x00000000a4900000, 0x00000000a4a00000| 0%| F| |TAMS 0x00000000a4900000, 0x00000000a4900000| Untracked
| 54|0x00000000a4a00000, 0x00000000a4a00000, 0x00000000a4b00000| 0%| F| |TAMS 0x00000000a4a00000, 0x00000000a4a00000| Untracked
| 55|0x00000000a4b00000, 0x00000000a4b00000, 0x00000000a4c00000| 0%| F| |TAMS 0x00000000a4b00000, 0x00000000a4b00000| Untracked
| 56|0x00000000a4c00000, 0x00000000a4c00000, 0x00000000a4d00000| 0%| F| |TAMS 0x00000000a4c00000, 0x00000000a4c00000| Untracked
| 57|0x00000000a4d00000, 0x00000000a4d00000, 0x00000000a4e00000| 0%| F| |TAMS 0x00000000a4d00000, 0x00000000a4d00000| Untracked
| 58|0x00000000a4e00000, 0x00000000a4e00000, 0x00000000a4f00000| 0%| F| |TAMS 0x00000000a4e00000, 0x00000000a4e00000| Untracked
| 59|0x00000000a4f00000, 0x00000000a4f00000, 0x00000000a5000000| 0%| F| |TAMS 0x00000000a4f00000, 0x00000000a4f00000| Untracked
| 60|0x00000000a5000000, 0x00000000a5000000, 0x00000000a5100000| 0%| F| |TAMS 0x00000000a5000000, 0x00000000a5000000| Untracked
| 61|0x00000000a5100000, 0x00000000a5100000, 0x00000000a5200000| 0%| F| |TAMS 0x00000000a5100000, 0x00000000a5100000| Untracked
| 62|0x00000000a5200000, 0x00000000a5200000, 0x00000000a5300000| 0%| F| |TAMS 0x00000000a5200000, 0x00000000a5200000| Untracked
| 63|0x00000000a5300000, 0x00000000a5300000, 0x00000000a5400000| 0%| F| |TAMS 0x00000000a5300000, 0x00000000a5300000| Untracked
| 64|0x00000000a5400000, 0x00000000a5400000, 0x00000000a5500000| 0%| F| |TAMS 0x00000000a5400000, 0x00000000a5400000| Untracked
| 65|0x00000000a5500000, 0x00000000a5500000, 0x00000000a5600000| 0%| F| |TAMS 0x00000000a5500000, 0x00000000a5500000| Untracked
| 66|0x00000000a5600000, 0x00000000a5600000, 0x00000000a5700000| 0%| F| |TAMS 0x00000000a5600000, 0x00000000a5600000| Untracked
| 67|0x00000000a5700000, 0x00000000a5700000, 0x00000000a5800000| 0%| F| |TAMS 0x00000000a5700000, 0x00000000a5700000| Untracked
| 68|0x00000000a5800000, 0x00000000a5800000, 0x00000000a5900000| 0%| F| |TAMS 0x00000000a5800000, 0x00000000a5800000| Untracked
| 69|0x00000000a5900000, 0x00000000a5900000, 0x00000000a5a00000| 0%| F| |TAMS 0x00000000a5900000, 0x00000000a5900000| Untracked
| 70|0x00000000a5a00000, 0x00000000a5a00000, 0x00000000a5b00000| 0%| F| |TAMS 0x00000000a5a00000, 0x00000000a5a00000| Untracked
| 71|0x00000000a5b00000, 0x00000000a5b00000, 0x00000000a5c00000| 0%| F| |TAMS 0x00000000a5b00000, 0x00000000a5b00000| Untracked
| 72|0x00000000a5c00000, 0x00000000a5c00000, 0x00000000a5d00000| 0%| F| |TAMS 0x00000000a5c00000, 0x00000000a5c00000| Untracked
| 73|0x00000000a5d00000, 0x00000000a5d00000, 0x00000000a5e00000| 0%| F| |TAMS 0x00000000a5d00000, 0x00000000a5d00000| Untracked
| 74|0x00000000a5e00000, 0x00000000a5e00000, 0x00000000a5f00000| 0%| F| |TAMS 0x00000000a5e00000, 0x00000000a5e00000| Untracked
| 75|0x00000000a5f00000, 0x00000000a5f00000, 0x00000000a6000000| 0%| F| |TAMS 0x00000000a5f00000, 0x00000000a5f00000| Untracked
| 76|0x00000000a6000000, 0x00000000a6000000, 0x00000000a6100000| 0%| F| |TAMS 0x00000000a6000000, 0x00000000a6000000| Untracked
| 77|0x00000000a6100000, 0x00000000a6100000, 0x00000000a6200000| 0%| F| |TAMS 0x00000000a6100000, 0x00000000a6100000| Untracked
| 78|0x00000000a6200000, 0x00000000a6200000, 0x00000000a6300000| 0%| F| |TAMS 0x00000000a6200000, 0x00000000a6200000| Untracked
| 79|0x00000000a6300000, 0x00000000a6300000, 0x00000000a6400000| 0%| F| |TAMS 0x00000000a6300000, 0x00000000a6300000| Untracked
| 80|0x00000000a6400000, 0x00000000a6400000, 0x00000000a6500000| 0%| F| |TAMS 0x00000000a6400000, 0x00000000a6400000| Untracked
| 81|0x00000000a6500000, 0x00000000a6500000, 0x00000000a6600000| 0%| F| |TAMS 0x00000000a6500000, 0x00000000a6500000| Untracked
| 82|0x00000000a6600000, 0x00000000a6600000, 0x00000000a6700000| 0%| F| |TAMS 0x00000000a6600000, 0x00000000a6600000| Untracked
| 83|0x00000000a6700000, 0x00000000a6700000, 0x00000000a6800000| 0%| F| |TAMS 0x00000000a6700000, 0x00000000a6700000| Untracked
| 84|0x00000000a6800000, 0x00000000a6800000, 0x00000000a6900000| 0%| F| |TAMS 0x00000000a6800000, 0x00000000a6800000| Untracked
| 85|0x00000000a6900000, 0x00000000a6900000, 0x00000000a6a00000| 0%| F| |TAMS 0x00000000a6900000, 0x00000000a6900000| Untracked
| 86|0x00000000a6a00000, 0x00000000a6a00000, 0x00000000a6b00000| 0%| F| |TAMS 0x00000000a6a00000, 0x00000000a6a00000| Untracked
| 87|0x00000000a6b00000, 0x00000000a6b00000, 0x00000000a6c00000| 0%| F| |TAMS 0x00000000a6b00000, 0x00000000a6b00000| Untracked
| 88|0x00000000a6c00000, 0x00000000a6c00000, 0x00000000a6d00000| 0%| F| |TAMS 0x00000000a6c00000, 0x00000000a6c00000| Untracked
| 89|0x00000000a6d00000, 0x00000000a6d76700, 0x00000000a6e00000| 46%| E| |TAMS 0x00000000a6d00000, 0x00000000a6d00000| Complete
| 90|0x00000000a6e00000, 0x00000000a6f00000, 0x00000000a6f00000|100%| E|CS|TAMS 0x00000000a6e00000, 0x00000000a6e00000| Complete
| 91|0x00000000a6f00000, 0x00000000a7000000, 0x00000000a7000000|100%| E|CS|TAMS 0x00000000a6f00000, 0x00000000a6f00000| Complete
| 92|0x00000000a7000000, 0x00000000a7100000, 0x00000000a7100000|100%| E| |TAMS 0x00000000a7000000, 0x00000000a7000000| Complete
| 93|0x00000000a7100000, 0x00000000a7200000, 0x00000000a7200000|100%| E|CS|TAMS 0x00000000a7100000, 0x00000000a7100000| Complete
| 94|0x00000000a7200000, 0x00000000a7300000, 0x00000000a7300000|100%| E|CS|TAMS 0x00000000a7200000, 0x00000000a7200000| Complete
| 95|0x00000000a7300000, 0x00000000a7400000, 0x00000000a7400000|100%| E|CS|TAMS 0x00000000a7300000, 0x00000000a7300000| Complete
Card table byte_map: [0x00000196d56e0000,0x00000196d59e0000] _byte_map_base: 0x00000196d51d6000
Marking Bits (Prev, Next): (CMBitMap*) 0x00000196be7c95a0, (CMBitMap*) 0x00000196be7c95e0
Prev Bits: [0x00000196d5ce0000, 0x00000196d7490000)
Next Bits: [0x00000196d7490000, 0x00000196d8c40000)
Polling page: 0x00000196bc8d0000
Metaspace:
Usage:
Non-class: 2.10 MB used.
Class: 212.52 KB used.
Both: 2.30 MB used.
Virtual space:
Non-class space: 64.00 MB reserved, 2.12 MB ( 3%) committed, 1 nodes.
Class space: 1.00 GB reserved, 320.00 KB ( <1%) committed, 1 nodes.
Both: 1.06 GB reserved, 2.44 MB ( <1%) committed.
Chunk freelists:
Non-Class: 3.25 MB
Class: 3.66 MB
Both: 6.91 MB
MaxMetaspaceSize: unlimited
CompressedClassSpaceSize: 1.00 GB
Initial GC threshold: 21.00 MB
Current GC threshold: 21.00 MB
CDS: on
MetaspaceReclaimPolicy: balanced
- commit_granule_bytes: 65536.
- commit_granule_words: 8192.
- virtual_space_node_default_size: 8388608.
- enlarge_chunks_in_place: 1.
- new_chunks_are_fully_committed: 0.
- uncommit_free_chunks: 1.
- use_allocation_guard: 0.
Internal statistics:
num_allocs_failed_limit: 0.
num_arena_births: 32.
num_arena_deaths: 0.
num_vsnodes_births: 2.
num_vsnodes_deaths: 0.
num_space_committed: 39.
num_space_uncommitted: 0.
num_chunks_returned_to_freelist: 0.
num_chunks_taken_from_freelist: 74.
num_chunk_merges: 0.
num_chunk_splits: 50.
num_chunks_enlarged: 39.
num_inconsistent_stats: 0.
CodeHeap 'non-profiled nmethods': size=120000Kb used=153Kb max_used=153Kb free=119846Kb
bounds [0x00000196cdb80000, 0x00000196cddf0000, 0x00000196d50b0000]
CodeHeap 'profiled nmethods': size=120000Kb used=883Kb max_used=883Kb free=119116Kb
bounds [0x00000196c6650000, 0x00000196c68c0000, 0x00000196cdb80000]
CodeHeap 'non-nmethods': size=5760Kb used=1140Kb max_used=1155Kb free=4619Kb
bounds [0x00000196c60b0000, 0x00000196c6320000, 0x00000196c6650000]
total_blobs=957 nmethods=544 adapters=326
compilation: enabled
stopped_count=0, restarted_count=0
full_count=0
Compilation events (20 events):
Event: 0.809 Thread 0x00000196db61cea0 534 3 java.lang.String::indexOf (18 bytes)
Event: 0.809 Thread 0x00000196db61cea0 nmethod 534 0x00000196c6729c90 code [0x00000196c6729e60, 0x00000196c672a128]
Event: 0.810 Thread 0x00000196db61cea0 535 3 java.lang.String::indexOf (113 bytes)
Event: 0.810 Thread 0x00000196db61cea0 nmethod 535 0x00000196c672a290 code [0x00000196c672a4c0, 0x00000196c672aae8]
Event: 0.811 Thread 0x00000196db61cea0 536 3 java.net.URL::<init> (8 bytes)
Event: 0.811 Thread 0x00000196db61cea0 nmethod 536 0x00000196c672ac90 code [0x00000196c672ae40, 0x00000196c672af88]
Event: 0.812 Thread 0x00000196db608b90 537 % 4 java.lang.StringLatin1::indexOf @ 30 (121 bytes)
Event: 0.816 Thread 0x00000196db61cea0 539 3 jdk.internal.jimage.BasicImageReader::getLocationIndex (52 bytes)
Event: 0.817 Thread 0x00000196db61cea0 nmethod 539 0x00000196c672b010 code [0x00000196c672b200, 0x00000196c672b698]
Event: 0.819 Thread 0x00000196db61cea0 541 3 java.util.ArrayList$Itr::next (66 bytes)
Event: 0.820 Thread 0x00000196db61cea0 nmethod 541 0x00000196c672b910 code [0x00000196c672bb00, 0x00000196c672bec8]
Event: 0.820 Thread 0x00000196db61cea0 542 3 java.util.ArrayList$Itr::checkForComodification (23 bytes)
Event: 0.820 Thread 0x00000196db61cea0 nmethod 542 0x00000196c672c090 code [0x00000196c672c240, 0x00000196c672c408]
Event: 0.820 Thread 0x00000196db61cea0 543 3 java.lang.Character::getType (9 bytes)
Event: 0.820 Thread 0x00000196db61cea0 nmethod 543 0x00000196c672c510 code [0x00000196c672c6c0, 0x00000196c672c8b8]
Event: 0.820 Thread 0x00000196db61cea0 544 3 java.lang.CharacterDataLatin1::getType (11 bytes)
Event: 0.820 Thread 0x00000196db61cea0 nmethod 544 0x00000196c672c990 code [0x00000196c672cb40, 0x00000196c672ccf8]
Event: 0.824 Thread 0x00000196db61cea0 545 3 jdk.internal.loader.ClassLoaders$AppClassLoader::loadClass (40 bytes)
Event: 0.825 Thread 0x00000196db608b90 nmethod 537% 0x00000196cdba5610 code [0x00000196cdba57a0, 0x00000196cdba5b18]
Event: 0.825 Thread 0x00000196db608b90 540 4 java.nio.Buffer::scope (17 bytes)
GC Heap History (0 events):
No events
Deoptimization events (4 events):
Event: 0.300 Thread 0x00000196be777660 Uncommon trap: trap_request=0xffffff45 fr.pc=0x00000196cdb8b264 relative=0x0000000000000064
Event: 0.300 Thread 0x00000196be777660 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00000196cdb8b264 method=java.io.WinNTFileSystem.isSlash(C)Z @ 9 c2
Event: 0.300 Thread 0x00000196be777660 DEOPT PACKING pc=0x00000196cdb8b264 sp=0x000000221c2fe330
Event: 0.300 Thread 0x00000196be777660 DEOPT UNPACKING pc=0x00000196c61023a3 sp=0x000000221c2fe2b8 mode 2
Classes loaded (20 events):
Event: 0.776 Loading class sun/net/ProgressMeteringPolicy
Event: 0.776 Loading class sun/net/ProgressMeteringPolicy done
Event: 0.776 Loading class sun/net/DefaultProgressMeteringPolicy done
Event: 0.782 Loading class java/lang/IllegalAccessException
Event: 0.782 Loading class java/lang/IllegalAccessException done
Event: 0.783 Loading class java/lang/InstantiationException
Event: 0.783 Loading class java/lang/InstantiationException done
Event: 0.792 Loading class java/io/StringWriter
Event: 0.792 Loading class java/io/StringWriter done
Event: 0.793 Loading class java/io/StringReader
Event: 0.793 Loading class java/io/StringReader done
Event: 0.797 Loading class java/lang/AssertionError
Event: 0.797 Loading class java/lang/AssertionError done
Event: 0.805 Loading class java/lang/StringIndexOutOfBoundsException
Event: 0.805 Loading class java/lang/IndexOutOfBoundsException
Event: 0.805 Loading class java/lang/IndexOutOfBoundsException done
Event: 0.805 Loading class java/lang/StringIndexOutOfBoundsException done
Event: 0.818 Loading class jdk/internal/misc/ScopedMemoryAccess$Scope
Event: 0.818 Loading class jdk/internal/misc/ScopedMemoryAccess$Scope done
Event: 0.824 Loading class java/io/FileReader
Classes unloaded (0 events):
No events
Classes redefined (0 events):
No events
Internal exceptions (3 events):
Event: 0.332 Thread 0x00000196be777660 Exception <a 'java/lang/NoSuchMethodError'{0x00000000a704d590}: 'java.lang.Object java.lang.invoke.Invokers$Holder.invokeExact_MT(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object)'> (0x00000000a704d590)
thrown [s\open\src\hotspot\share\interpreter\linkResolver.cpp, line 766]
Event: 0.468 Thread 0x00000196be777660 Exception <a 'java/lang/NoSuchMethodError'{0x00000000a6f51a28}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.invokeStaticInit(java.lang.Object, int, int, int, int)'> (0x00000000a6f51a28)
thrown [s\open\src\hotspot\share\interpreter\linkResolver.cpp, line 766]
Event: 0.601 Thread 0x00000196be777660 Exception <a 'java/lang/NoSuchMethodError'{0x00000000a6f9a260}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.invokeStaticInit(java.lang.Object, java.lang.Object, int, int, int, int)'> (0x00000000a6f9a260)
thrown [s\open\src\hotspot\share\interpreter\linkResolver.cpp, line 766]
VM Operations (12 events):
Event: 0.116 Executing VM operation: HandshakeAllThreads
Event: 0.116 Executing VM operation: HandshakeAllThreads done
Event: 0.363 Executing VM operation: HandshakeAllThreads
Event: 0.363 Executing VM operation: HandshakeAllThreads done
Event: 0.500 Executing VM operation: HandshakeAllThreads
Event: 0.500 Executing VM operation: HandshakeAllThreads done
Event: 0.612 Executing VM operation: HandshakeAllThreads
Event: 0.612 Executing VM operation: HandshakeAllThreads done
Event: 0.659 Executing VM operation: HandshakeAllThreads
Event: 0.659 Executing VM operation: HandshakeAllThreads done
Event: 0.773 Executing VM operation: HandshakeAllThreads
Event: 0.774 Executing VM operation: HandshakeAllThreads done
Events (20 events):
Event: 0.030 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\jsvml.dll
Event: 0.031 Thread 0x00000196be777660 Thread added: 0x00000196be777660
Event: 0.035 Thread 0x00000196db5e6ac0 Thread added: 0x00000196db5e6ac0
Event: 0.035 Thread 0x00000196db5e7720 Thread added: 0x00000196db5e7720
Event: 0.056 Thread 0x00000196db603f40 Thread added: 0x00000196db603f40
Event: 0.056 Thread 0x00000196db6058f0 Thread added: 0x00000196db6058f0
Event: 0.056 Thread 0x00000196db606290 Thread added: 0x00000196db606290
Event: 0.056 Thread 0x00000196db606d70 Thread added: 0x00000196db606d70
Event: 0.057 Thread 0x00000196db608b90 Thread added: 0x00000196db608b90
Event: 0.057 Thread 0x00000196db61cea0 Thread added: 0x00000196db61cea0
Event: 0.057 Thread 0x00000196db6333c0 Thread added: 0x00000196db6333c0
Event: 0.086 Thread 0x00000196df884700 Thread added: 0x00000196df884700
Event: 0.094 Thread 0x00000196df8888a0 Thread added: 0x00000196df8888a0
Event: 0.102 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\net.dll
Event: 0.107 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\nio.dll
Event: 0.115 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\zip.dll
Event: 0.368 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\verify.dll
Event: 0.399 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\jimage.dll
Event: 0.653 Loaded shared library C:\Users\guill\AppData\Local\Temp\jansi-1.17.1-2708375098780757364.dll
Event: 0.690 Loaded shared library C:\Users\guill\AppData\Local\Temp\jansi-1.17.1-3176157090017154440.dll
Dynamic libraries:
0x00007ff7a7750000 - 0x00007ff7a7760000 C:\Program Files\Java\jdk-18.0.1\bin\java.exe
0x00007ffbfbb50000 - 0x00007ffbfbd45000 C:\WINDOWS\SYSTEM32\ntdll.dll
0x00007ffbd8b00000 - 0x00007ffbd8b16000 C:\Program Files\Avast Software\Avast\aswhook.dll
0x00007ffbf9ba0000 - 0x00007ffbf9c5d000 C:\WINDOWS\System32\KERNEL32.DLL
0x00007ffbf97d0000 - 0x00007ffbf9a9d000 C:\WINDOWS\System32\KERNELBASE.dll
0x00007ffbf9aa0000 - 0x00007ffbf9ba0000 C:\WINDOWS\System32\ucrtbase.dll
0x00007ffbf2cb0000 - 0x00007ffbf2cc8000 C:\Program Files\Java\jdk-18.0.1\bin\jli.dll
0x00007ffbec2b0000 - 0x00007ffbec2ca000 C:\Program Files\Java\jdk-18.0.1\bin\VCRUNTIME140.dll
0x00007ffbfb5f0000 - 0x00007ffbfb69e000 C:\WINDOWS\System32\ADVAPI32.dll
0x00007ffbf9da0000 - 0x00007ffbf9e3e000 C:\WINDOWS\System32\msvcrt.dll
0x00007ffbfa6b0000 - 0x00007ffbfa74c000 C:\WINDOWS\System32\sechost.dll
0x00007ffbfb460000 - 0x00007ffbfb585000 C:\WINDOWS\System32\RPCRT4.dll
0x00007ffbfb7c0000 - 0x00007ffbfb960000 C:\WINDOWS\System32\USER32.dll
0x00007ffbdc100000 - 0x00007ffbdc39a000 C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e\COMCTL32.dll
0x00007ffbf9700000 - 0x00007ffbf9722000 C:\WINDOWS\System32\win32u.dll
0x00007ffbfa680000 - 0x00007ffbfa6aa000 C:\WINDOWS\System32\GDI32.dll
0x00007ffbf9540000 - 0x00007ffbf964b000 C:\WINDOWS\System32\gdi32full.dll
0x00007ffbf9340000 - 0x00007ffbf93dd000 C:\WINDOWS\System32\msvcp_win.dll
0x00007ffbf2c30000 - 0x00007ffbf2c3a000 C:\WINDOWS\SYSTEM32\VERSION.dll
0x00007ffbfa650000 - 0x00007ffbfa680000 C:\WINDOWS\System32\IMM32.DLL
0x00007ffbf3df0000 - 0x00007ffbf3dfc000 C:\Program Files\Java\jdk-18.0.1\bin\vcruntime140_1.dll
0x00007ffbda4c0000 - 0x00007ffbda54d000 C:\Program Files\Java\jdk-18.0.1\bin\msvcp140.dll
0x00007ffbbf6a0000 - 0x00007ffbc02b0000 C:\Program Files\Java\jdk-18.0.1\bin\server\jvm.dll
0x00007ffbf9c60000 - 0x00007ffbf9c68000 C:\WINDOWS\System32\PSAPI.DLL
0x00007ffbe6a50000 - 0x00007ffbe6a59000 C:\WINDOWS\SYSTEM32\WSOCK32.dll
0x00007ffbedb20000 - 0x00007ffbedb47000 C:\WINDOWS\SYSTEM32\WINMM.dll
0x00007ffbfa7b0000 - 0x00007ffbfa81b000 C:\WINDOWS\System32\WS2_32.dll
0x00007ffbf7120000 - 0x00007ffbf7132000 C:\WINDOWS\SYSTEM32\kernel.appcore.dll
0x00007ffbf07b0000 - 0x00007ffbf07ba000 C:\Program Files\Java\jdk-18.0.1\bin\jimage.dll
0x00007ffbe8240000 - 0x00007ffbe8424000 C:\WINDOWS\SYSTEM32\DBGHELP.DLL
0x00007ffbe8210000 - 0x00007ffbe823c000 C:\WINDOWS\SYSTEM32\dbgcore.DLL
0x00007ffbf92b0000 - 0x00007ffbf9332000 C:\WINDOWS\System32\bcryptPrimitives.dll
0x00007ffbec280000 - 0x00007ffbec2a5000 C:\Program Files\Java\jdk-18.0.1\bin\java.dll
0x00007ffbd4ec0000 - 0x00007ffbd4f96000 C:\Program Files\Java\jdk-18.0.1\bin\jsvml.dll
0x00007ffbfa8d0000 - 0x00007ffbfb014000 C:\WINDOWS\System32\SHELL32.dll
0x00007ffbf7320000 - 0x00007ffbf7ab4000 C:\WINDOWS\SYSTEM32\windows.storage.dll
0x00007ffbfb020000 - 0x00007ffbfb374000 C:\WINDOWS\System32\combase.dll
0x00007ffbf8bf0000 - 0x00007ffbf8c1c000 C:\WINDOWS\SYSTEM32\Wldp.dll
0x00007ffbfa090000 - 0x00007ffbfa13d000 C:\WINDOWS\System32\SHCORE.dll
0x00007ffbfb590000 - 0x00007ffbfb5e5000 C:\WINDOWS\System32\shlwapi.dll
0x00007ffbf91a0000 - 0x00007ffbf91bf000 C:\WINDOWS\SYSTEM32\profapi.dll
0x00007ffbec260000 - 0x00007ffbec273000 C:\Program Files\Java\jdk-18.0.1\bin\net.dll
0x00007ffbf02b0000 - 0x00007ffbf03ba000 C:\WINDOWS\SYSTEM32\WINHTTP.dll
0x00007ffbf8910000 - 0x00007ffbf897a000 C:\WINDOWS\system32\mswsock.dll
0x00007ffbebfa0000 - 0x00007ffbebfb6000 C:\Program Files\Java\jdk-18.0.1\bin\nio.dll
0x00007ffbe4750000 - 0x00007ffbe4768000 C:\Program Files\Java\jdk-18.0.1\bin\zip.dll
0x00007ffbf3e60000 - 0x00007ffbf3e70000 C:\Program Files\Java\jdk-18.0.1\bin\verify.dll
0x00007ffbf8b40000 - 0x00007ffbf8b58000 C:\WINDOWS\SYSTEM32\CRYPTSP.dll
0x00007ffbf8290000 - 0x00007ffbf82c4000 C:\WINDOWS\system32\rsaenh.dll
0x00007ffbf97a0000 - 0x00007ffbf97c7000 C:\WINDOWS\System32\bcrypt.dll
0x00007ffbf9120000 - 0x00007ffbf914e000 C:\WINDOWS\SYSTEM32\USERENV.dll
0x00007ffbf8b60000 - 0x00007ffbf8b6c000 C:\WINDOWS\SYSTEM32\CRYPTBASE.dll
0x00007ffbf8610000 - 0x00007ffbf864b000 C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL
0x00007ffbf9ec0000 - 0x00007ffbf9ec8000 C:\WINDOWS\System32\NSI.dll
0x00007ffbefaa0000 - 0x00007ffbefab7000 C:\WINDOWS\SYSTEM32\dhcpcsvc6.DLL
0x00007ffbf0450000 - 0x00007ffbf046d000 C:\WINDOWS\SYSTEM32\dhcpcsvc.DLL
0x00007ffbf8650000 - 0x00007ffbf871b000 C:\WINDOWS\SYSTEM32\DNSAPI.dll
0x00007ffbf3800000 - 0x00007ffbf380a000 C:\Users\guill\AppData\Local\Temp\jansi-1.17.1-2708375098780757364.dll
0x00007ffbf2c80000 - 0x00007ffbf2c8a000 C:\Users\guill\AppData\Local\Temp\jansi-1.17.1-3176157090017154440.dll
dbghelp: loaded successfully - version: 4.0.5 - missing functions: none
symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;C:\Program Files\Java\jdk-18.0.1\bin;C:\WINDOWS\SYSTEM32;C:\Program Files\Avast Software\Avast;C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e;C:\Program Files\Java\jdk-18.0.1\bin\server;C:\Users\guill\AppData\Local\Temp
VM Arguments:
jvm_args: -Dmaven.multiModuleProjectDirectory=C:\Users\guill\gitProjects\mmocore -Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3 -Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\bin\m2.conf -Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven-event-listener.jar -Dfile.encoding=UTF-8
java_command: org.codehaus.classworlds.Launcher -Didea.version=2021.1.2 install --non-recursive
java_class_path (initial): C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\boot\plexus-classworlds.license
Launcher Type: SUN_STANDARD
[Global flags]
intx CICompilerCount = 4 {product} {ergonomic}
uint ConcGCThreads = 2 {product} {ergonomic}
uint G1ConcRefinementThreads = 8 {product} {ergonomic}
size_t G1HeapRegionSize = 1048576 {product} {ergonomic}
uintx GCDrainStackTargetSize = 64 {product} {ergonomic}
size_t InitialHeapSize = 100663296 {product} {ergonomic}
size_t MarkStackSize = 4194304 {product} {ergonomic}
size_t MaxHeapSize = 1589641216 {product} {ergonomic}
size_t MaxNewSize = 953155584 {product} {ergonomic}
size_t MinHeapDeltaBytes = 1048576 {product} {ergonomic}
size_t MinHeapSize = 8388608 {product} {ergonomic}
uintx NonNMethodCodeHeapSize = 5839372 {pd product} {ergonomic}
uintx NonProfiledCodeHeapSize = 122909434 {pd product} {ergonomic}
uintx ProfiledCodeHeapSize = 122909434 {pd product} {ergonomic}
uintx ReservedCodeCacheSize = 251658240 {pd product} {ergonomic}
bool SegmentedCodeCache = true {product} {ergonomic}
size_t SoftMaxHeapSize = 1589641216 {manageable} {ergonomic}
bool UseCompressedClassPointers = true {product lp64_product} {ergonomic}
bool UseCompressedOops = true {product lp64_product} {ergonomic}
bool UseG1GC = true {product} {ergonomic}
bool UseLargePagesIndividualAllocation = false {pd product} {ergonomic}
Logging:
Log output configuration:
#0: stdout all=warning uptime,level,tags foldmultilines=false
#1: stderr all=off uptime,level,tags foldmultilines=false
Environment Variables:
PATH=C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files\Java\jdk-16.0.2\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;PATH;C:\Users\guill\AppData\Local\Microsoft\WindowsApps;C:\Windows\System32;;C:\Users\guill\Desktop\Microsoft VS Code\bin;C:\Users\guill\AppData\Roaming\npm
USERNAME=guill
OS=Windows_NT
PROCESSOR_IDENTIFIER=AMD64 Family 23 Model 24 Stepping 1, AuthenticAMD
--------------- S Y S T E M ---------------
OS:
Windows 10 , 64 bit Build 19041 (10.0.19041.1706)
OS uptime: 11 days 18:11 hours
Hyper-V role detected
CPU: total 8 (initial active 8) (8 cores per cpu, 2 threads per core) family 23 model 24 stepping 1 microcode 0x0, cx8, cmov, fxsr, ht, mmx, 3dnowpref, sse, sse2, sse3, ssse3, sse4a, sse4.1, sse4.2, popcnt, lzcnt, tsc, tscinvbit, avx, avx2, aes, clmul, bmi1, bmi2, adx, sha, fma, vzeroupper, clflush, clflushopt, hv
Memory: 4k page, system-wide physical 6061M (387M free)
TotalPageFile size 24493M (AvailPageFile size 0M)
current process WorkingSet (physical memory assigned to process): 44M, peak: 44M
current process commit charge ("private bytes"): 182M, peak: 182M
vm_info: Java HotSpot(TM) 64-Bit Server VM (18.0.1+10-24) for windows-amd64 JRE (18.0.1+10-24), built on Mar 9 2022 22:41:56 by "mach5one" with MS VC++ 16.8 / 16.9 (VS2019)
END.

525
hs_err_pid23924.log Normal file
View File

@ -0,0 +1,525 @@
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 65536 bytes for Failed to commit metaspace.
# Possible reasons:
# The system is out of physical RAM or swap space
# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# JVM is running with Unscaled Compressed Oops mode in which the Java heap is
# placed in the first 4GB address space. The Java Heap base address is the
# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress
# to set the Java Heap base and to place the Java Heap above 4GB virtual address.
# This output file may be truncated or incomplete.
#
# Out of Memory Error (virtualSpaceNode.cpp:110), pid=23924, tid=35452
#
# JRE version: Java(TM) SE Runtime Environment (18.0.1+10) (build 18.0.1+10-24)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (18.0.1+10-24, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
--------------- S U M M A R Y ------------
Command Line: -Dmaven.multiModuleProjectDirectory=C:\Users\guill\gitProjects\mmocore -Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3 -Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\bin\m2.conf -Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven-event-listener.jar -Dfile.encoding=UTF-8 org.codehaus.classworlds.Launcher -Didea.version=2021.1.2 install --non-recursive
Host: AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx , 8 cores, 5G, Windows 10 , 64 bit Build 19041 (10.0.19041.1706)
Time: Tue May 24 23:24:35 2022 Paris, Madrid (heure duild 19041 (10.0.19041.1706) elapsed time: 1.633790 seconds (0d 0h 0m 1s)
--------------- T H R E A D ---------------
Current thread (0x000002cbfa035c40): JavaThread "main" [_thread_in_vm, id=35452, stack(0x000000db19a00000,0x000000db19b00000)]
Stack: [0x000000db19a00000,0x000000db19b00000]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x69887a]
V [jvm.dll+0x7f38bd]
V [jvm.dll+0x7f51ce]
V [jvm.dll+0x7f5883]
V [jvm.dll+0x25ca3f]
V [jvm.dll+0x7ef5cb]
V [jvm.dll+0x63ea76]
V [jvm.dll+0x63eada]
V [jvm.dll+0x64135e]
V [jvm.dll+0x64121e]
V [jvm.dll+0x63f43e]
V [jvm.dll+0x649ab7]
V [jvm.dll+0x64ce3b]
V [jvm.dll+0x76af50]
V [jvm.dll+0x57dc2a]
V [jvm.dll+0x57f856]
V [jvm.dll+0x57d4be]
V [jvm.dll+0x57fe0b]
V [jvm.dll+0x659f38]
V [jvm.dll+0x655f11]
C 0x000002cb8787d621
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j java.lang.invoke.MethodHandleNatives.resolve(Ljava/lang/invoke/MemberName;Ljava/lang/Class;IZ)Ljava/lang/invoke/MemberName;+0 java.base@18.0.1
j java.lang.invoke.MemberName$Factory.resolve(BLjava/lang/invoke/MemberName;Ljava/lang/Class;IZ)Ljava/lang/invoke/MemberName;+36 java.base@18.0.1
j java.lang.invoke.MemberName$Factory.resolveOrFail(BLjava/lang/invoke/MemberName;Ljava/lang/Class;ILjava/lang/Class;)Ljava/lang/invoke/MemberName;+31 java.base@18.0.1
j java.lang.invoke.DirectMethodHandle.makePreparedLambdaForm(Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/LambdaForm;+330 java.base@18.0.1
j java.lang.invoke.DirectMethodHandle.preparedLambdaForm(Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/LambdaForm;+17 java.base@18.0.1
j java.lang.invoke.DirectMethodHandle.preparedLambdaForm(Ljava/lang/invoke/MemberName;Z)Ljava/lang/invoke/LambdaForm;+159 java.base@18.0.1
j java.lang.invoke.DirectMethodHandle.preparedLambdaForm(Ljava/lang/invoke/MemberName;)Ljava/lang/invoke/LambdaForm;+2 java.base@18.0.1
j java.lang.invoke.DirectMethodHandle.make(BLjava/lang/Class;Ljava/lang/invoke/MemberName;Ljava/lang/Class;)Ljava/lang/invoke/DirectMethodHandle;+163 java.base@18.0.1
j java.lang.invoke.DirectMethodHandle.make(Ljava/lang/Class;Ljava/lang/invoke/MemberName;)Ljava/lang/invoke/DirectMethodHandle;+17 java.base@18.0.1
j java.lang.invoke.DirectMethodHandle.make(Ljava/lang/invoke/MemberName;)Ljava/lang/invoke/DirectMethodHandle;+17 java.base@18.0.1
j java.lang.invoke.Invokers.basicInvoker()Ljava/lang/invoke/MethodHandle;+60 java.base@18.0.1
j java.lang.invoke.LambdaForm$NamedFunction.<init>(Ljava/lang/invoke/MethodType;)V+42 java.base@18.0.1
j java.lang.invoke.LambdaForm$Name.<init>(Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)V+6 java.base@18.0.1
j java.lang.invoke.Invokers.invokeHandleForm(Ljava/lang/invoke/MethodType;ZI)Ljava/lang/invoke/LambdaForm;+595 java.base@18.0.1
j java.lang.invoke.Invokers.methodHandleInvokeLinkerMethod(Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;+144 java.base@18.0.1
j java.lang.invoke.MethodHandleNatives.linkMethodImpl(Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;+20 java.base@18.0.1
j java.lang.invoke.MethodHandleNatives.linkMethod(Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;+14 java.base@18.0.1
v ~StubRoutines::call_stub
j jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+72 java.base@18.0.1
j jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+23 java.base@18.0.1
j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+102 java.base@18.0.1
j org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced([Ljava/lang/String;)V+45
j org.codehaus.plexus.classworlds.launcher.Launcher.launch([Ljava/lang/String;)V+2
j org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode([Ljava/lang/String;)I+101
j org.codehaus.plexus.classworlds.launcher.Launcher.main([Ljava/lang/String;)V+1
j org.codehaus.classworlds.Launcher.main([Ljava/lang/String;)V+1
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Threads class SMR info:
_java_thread_list=0x000002cb9b18d4a0, length=12, elements={
0x000002cbfa035c40, 0x000002cb96ee2c60, 0x000002cb96ee6070, 0x000002cb96f00d20,
0x000002cb96f02ad0, 0x000002cb96f03c10, 0x000002cb96f04e90, 0x000002cb96f09a80,
0x000002cb96f2bd60, 0x000002cb96f406c0, 0x000002cb9b1ca2c0, 0x000002cb9b1d2850
}
Java Threads: ( => current thread )
=>0x000002cbfa035c40 JavaThread "main" [_thread_in_vm, id=35452, stack(0x000000db19a00000,0x000000db19b00000)]
0x000002cb96ee2c60 JavaThread "Reference Handler" daemon [_thread_blocked, id=5596, stack(0x000000db1a100000,0x000000db1a200000)]
0x000002cb96ee6070 JavaThread "Finalizer" daemon [_thread_blocked, id=23040, stack(0x000000db1a200000,0x000000db1a300000)]
0x000002cb96f00d20 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=34692, stack(0x000000db1a300000,0x000000db1a400000)]
0x000002cb96f02ad0 JavaThread "Attach Listener" daemon [_thread_blocked, id=10076, stack(0x000000db1a400000,0x000000db1a500000)]
0x000002cb96f03c10 JavaThread "Service Thread" daemon [_thread_blocked, id=30556, stack(0x000000db1a500000,0x000000db1a600000)]
0x000002cb96f04e90 JavaThread "Monitor Deflation Thread" daemon [_thread_blocked, id=27468, stack(0x000000db1a600000,0x000000db1a700000)]
0x000002cb96f09a80 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=24056, stack(0x000000db1a700000,0x000000db1a800000)]
0x000002cb96f2bd60 JavaThread "C1 CompilerThread0" daemon [_thread_in_vm, id=22596, stack(0x000000db1a800000,0x000000db1a900000)]
0x000002cb96f406c0 JavaThread "Sweeper thread" daemon [_thread_blocked, id=18792, stack(0x000000db1a900000,0x000000db1aa00000)]
0x000002cb9b1ca2c0 JavaThread "Notification Thread" daemon [_thread_blocked, id=3768, stack(0x000000db1aa00000,0x000000db1ab00000)]
0x000002cb9b1d2850 JavaThread "Common-Cleaner" daemon [_thread_blocked, id=24964, stack(0x000000db1ac00000,0x000000db1ad00000)]
Other Threads:
0x000002cbfa0fe0b0 VMThread "VM Thread" [stack: 0x000000db1a000000,0x000000db1a100000] [id=14012]
0x000002cb9b1d25e0 WatcherThread "VM Periodic Task Thread" [stack: 0x000000db1ab00000,0x000000db1ac00000] [id=30256]
0x000002cbfa0889b0 WorkerThread "GC Thread#0" [stack: 0x000000db19b00000,0x000000db19c00000] [id=19068]
0x000002cbfa096740 ConcurrentGCThread "G1 Main Marker" [stack: 0x000000db19c00000,0x000000db19d00000] [id=30540]
0x000002cbfa0978d0 WorkerThread "G1 Conc#0" [stack: 0x000000db19d00000,0x000000db19e00000] [id=22284]
0x000002cbfa0dc550 ConcurrentGCThread "G1 Refine#0" [stack: 0x000000db19e00000,0x000000db19f00000] [id=34192]
0x000002cbfa0dce60 ConcurrentGCThread "G1 Service" [stack: 0x000000db19f00000,0x000000db1a000000] [id=17324]
Threads with active compile tasks:
C1 CompilerThread0 1768 307 3 jdk.internal.org.objectweb.asm.ByteVector::putShort (52 bytes)
VM state: not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
[0x000002cbfa01e690] Metaspace_lock - owner thread: 0x000002cbfa035c40
[0x000002cbfa02ff60] MethodData_lock - owner thread: 0x000002cb96f2bd60
Heap address: 0x00000000a1400000, size: 1516 MB, Compressed Oops mode: 32-bit
CDS archive(s) mapped at: [0x0000000800000000-0x0000000800ba0000-0x0000000800ba0000), size 12189696, SharedBaseAddress: 0x0000000800000000, ArchiveRelocationMode: 0.
Compressed class space mapped at: 0x0000000800c00000-0x0000000840c00000, reserved size: 1073741824
Narrow klass base: 0x0000000800000000, Narrow klass shift: 0, Narrow klass range: 0x100000000
GC Precious Log:
CardTable entry size: 512
Card Set container configuration: InlinePtr #cards 5 size 8 Array Of Cards #cards 12 size 40 Howl #buckets 4 coarsen threshold 1843 Howl Bitmap #cards 512 size 80 coarsen threshold 460 Card regions per heap region 1 cards per card region 2048
CPUs: 8 total, 8 available
Memory: 6061M
Large Page Support: Disabled
NUMA Support: Disabled
Compressed Oops: Enabled (32-bit)
Heap Region Size: 1M
Heap Min Capacity: 8M
Heap Initial Capacity: 96M
Heap Max Capacity: 1516M
Pre-touch: Disabled
Parallel Workers: 8
Concurrent Workers: 2
Concurrent Refinement Workers: 8
Periodic GC: Disabled
Heap:
garbage-first heap total 98304K, used 3072K [0x00000000a1400000, 0x0000000100000000)
region size 1024K, 4 young (4096K), 0 survivors (0K)
Metaspace used 709K, committed 832K, reserved 1114112K
class space used 47K, committed 128K, reserved 1048576K
Heap Regions: E=young(eden), S=young(survivor), O=old, HS=humongous(starts), HC=humongous(continues), CS=collection set, F=free, OA=open archive, CA=closed archive, TAMS=top-at-mark-start (previous, next)
| 0|0x00000000a1400000, 0x00000000a1400000, 0x00000000a1500000| 0%| F| |TAMS 0x00000000a1400000, 0x00000000a1400000| Untracked
| 1|0x00000000a1500000, 0x00000000a1500000, 0x00000000a1600000| 0%| F| |TAMS 0x00000000a1500000, 0x00000000a1500000| Untracked
| 2|0x00000000a1600000, 0x00000000a1600000, 0x00000000a1700000| 0%| F| |TAMS 0x00000000a1600000, 0x00000000a1600000| Untracked
| 3|0x00000000a1700000, 0x00000000a1700000, 0x00000000a1800000| 0%| F| |TAMS 0x00000000a1700000, 0x00000000a1700000| Untracked
| 4|0x00000000a1800000, 0x00000000a1800000, 0x00000000a1900000| 0%| F| |TAMS 0x00000000a1800000, 0x00000000a1800000| Untracked
| 5|0x00000000a1900000, 0x00000000a1900000, 0x00000000a1a00000| 0%| F| |TAMS 0x00000000a1900000, 0x00000000a1900000| Untracked
| 6|0x00000000a1a00000, 0x00000000a1a00000, 0x00000000a1b00000| 0%| F| |TAMS 0x00000000a1a00000, 0x00000000a1a00000| Untracked
| 7|0x00000000a1b00000, 0x00000000a1b00000, 0x00000000a1c00000| 0%| F| |TAMS 0x00000000a1b00000, 0x00000000a1b00000| Untracked
| 8|0x00000000a1c00000, 0x00000000a1c00000, 0x00000000a1d00000| 0%| F| |TAMS 0x00000000a1c00000, 0x00000000a1c00000| Untracked
| 9|0x00000000a1d00000, 0x00000000a1d00000, 0x00000000a1e00000| 0%| F| |TAMS 0x00000000a1d00000, 0x00000000a1d00000| Untracked
| 10|0x00000000a1e00000, 0x00000000a1e00000, 0x00000000a1f00000| 0%| F| |TAMS 0x00000000a1e00000, 0x00000000a1e00000| Untracked
| 11|0x00000000a1f00000, 0x00000000a1f00000, 0x00000000a2000000| 0%| F| |TAMS 0x00000000a1f00000, 0x00000000a1f00000| Untracked
| 12|0x00000000a2000000, 0x00000000a2000000, 0x00000000a2100000| 0%| F| |TAMS 0x00000000a2000000, 0x00000000a2000000| Untracked
| 13|0x00000000a2100000, 0x00000000a2100000, 0x00000000a2200000| 0%| F| |TAMS 0x00000000a2100000, 0x00000000a2100000| Untracked
| 14|0x00000000a2200000, 0x00000000a2200000, 0x00000000a2300000| 0%| F| |TAMS 0x00000000a2200000, 0x00000000a2200000| Untracked
| 15|0x00000000a2300000, 0x00000000a2300000, 0x00000000a2400000| 0%| F| |TAMS 0x00000000a2300000, 0x00000000a2300000| Untracked
| 16|0x00000000a2400000, 0x00000000a2400000, 0x00000000a2500000| 0%| F| |TAMS 0x00000000a2400000, 0x00000000a2400000| Untracked
| 17|0x00000000a2500000, 0x00000000a2500000, 0x00000000a2600000| 0%| F| |TAMS 0x00000000a2500000, 0x00000000a2500000| Untracked
| 18|0x00000000a2600000, 0x00000000a2600000, 0x00000000a2700000| 0%| F| |TAMS 0x00000000a2600000, 0x00000000a2600000| Untracked
| 19|0x00000000a2700000, 0x00000000a2700000, 0x00000000a2800000| 0%| F| |TAMS 0x00000000a2700000, 0x00000000a2700000| Untracked
| 20|0x00000000a2800000, 0x00000000a2800000, 0x00000000a2900000| 0%| F| |TAMS 0x00000000a2800000, 0x00000000a2800000| Untracked
| 21|0x00000000a2900000, 0x00000000a2900000, 0x00000000a2a00000| 0%| F| |TAMS 0x00000000a2900000, 0x00000000a2900000| Untracked
| 22|0x00000000a2a00000, 0x00000000a2a00000, 0x00000000a2b00000| 0%| F| |TAMS 0x00000000a2a00000, 0x00000000a2a00000| Untracked
| 23|0x00000000a2b00000, 0x00000000a2b00000, 0x00000000a2c00000| 0%| F| |TAMS 0x00000000a2b00000, 0x00000000a2b00000| Untracked
| 24|0x00000000a2c00000, 0x00000000a2c00000, 0x00000000a2d00000| 0%| F| |TAMS 0x00000000a2c00000, 0x00000000a2c00000| Untracked
| 25|0x00000000a2d00000, 0x00000000a2d00000, 0x00000000a2e00000| 0%| F| |TAMS 0x00000000a2d00000, 0x00000000a2d00000| Untracked
| 26|0x00000000a2e00000, 0x00000000a2e00000, 0x00000000a2f00000| 0%| F| |TAMS 0x00000000a2e00000, 0x00000000a2e00000| Untracked
| 27|0x00000000a2f00000, 0x00000000a2f00000, 0x00000000a3000000| 0%| F| |TAMS 0x00000000a2f00000, 0x00000000a2f00000| Untracked
| 28|0x00000000a3000000, 0x00000000a3000000, 0x00000000a3100000| 0%| F| |TAMS 0x00000000a3000000, 0x00000000a3000000| Untracked
| 29|0x00000000a3100000, 0x00000000a3100000, 0x00000000a3200000| 0%| F| |TAMS 0x00000000a3100000, 0x00000000a3100000| Untracked
| 30|0x00000000a3200000, 0x00000000a3200000, 0x00000000a3300000| 0%| F| |TAMS 0x00000000a3200000, 0x00000000a3200000| Untracked
| 31|0x00000000a3300000, 0x00000000a3300000, 0x00000000a3400000| 0%| F| |TAMS 0x00000000a3300000, 0x00000000a3300000| Untracked
| 32|0x00000000a3400000, 0x00000000a3400000, 0x00000000a3500000| 0%| F| |TAMS 0x00000000a3400000, 0x00000000a3400000| Untracked
| 33|0x00000000a3500000, 0x00000000a3500000, 0x00000000a3600000| 0%| F| |TAMS 0x00000000a3500000, 0x00000000a3500000| Untracked
| 34|0x00000000a3600000, 0x00000000a3600000, 0x00000000a3700000| 0%| F| |TAMS 0x00000000a3600000, 0x00000000a3600000| Untracked
| 35|0x00000000a3700000, 0x00000000a3700000, 0x00000000a3800000| 0%| F| |TAMS 0x00000000a3700000, 0x00000000a3700000| Untracked
| 36|0x00000000a3800000, 0x00000000a3800000, 0x00000000a3900000| 0%| F| |TAMS 0x00000000a3800000, 0x00000000a3800000| Untracked
| 37|0x00000000a3900000, 0x00000000a3900000, 0x00000000a3a00000| 0%| F| |TAMS 0x00000000a3900000, 0x00000000a3900000| Untracked
| 38|0x00000000a3a00000, 0x00000000a3a00000, 0x00000000a3b00000| 0%| F| |TAMS 0x00000000a3a00000, 0x00000000a3a00000| Untracked
| 39|0x00000000a3b00000, 0x00000000a3b00000, 0x00000000a3c00000| 0%| F| |TAMS 0x00000000a3b00000, 0x00000000a3b00000| Untracked
| 40|0x00000000a3c00000, 0x00000000a3c00000, 0x00000000a3d00000| 0%| F| |TAMS 0x00000000a3c00000, 0x00000000a3c00000| Untracked
| 41|0x00000000a3d00000, 0x00000000a3d00000, 0x00000000a3e00000| 0%| F| |TAMS 0x00000000a3d00000, 0x00000000a3d00000| Untracked
| 42|0x00000000a3e00000, 0x00000000a3e00000, 0x00000000a3f00000| 0%| F| |TAMS 0x00000000a3e00000, 0x00000000a3e00000| Untracked
| 43|0x00000000a3f00000, 0x00000000a3f00000, 0x00000000a4000000| 0%| F| |TAMS 0x00000000a3f00000, 0x00000000a3f00000| Untracked
| 44|0x00000000a4000000, 0x00000000a4000000, 0x00000000a4100000| 0%| F| |TAMS 0x00000000a4000000, 0x00000000a4000000| Untracked
| 45|0x00000000a4100000, 0x00000000a4100000, 0x00000000a4200000| 0%| F| |TAMS 0x00000000a4100000, 0x00000000a4100000| Untracked
| 46|0x00000000a4200000, 0x00000000a4200000, 0x00000000a4300000| 0%| F| |TAMS 0x00000000a4200000, 0x00000000a4200000| Untracked
| 47|0x00000000a4300000, 0x00000000a4300000, 0x00000000a4400000| 0%| F| |TAMS 0x00000000a4300000, 0x00000000a4300000| Untracked
| 48|0x00000000a4400000, 0x00000000a4400000, 0x00000000a4500000| 0%| F| |TAMS 0x00000000a4400000, 0x00000000a4400000| Untracked
| 49|0x00000000a4500000, 0x00000000a4500000, 0x00000000a4600000| 0%| F| |TAMS 0x00000000a4500000, 0x00000000a4500000| Untracked
| 50|0x00000000a4600000, 0x00000000a4600000, 0x00000000a4700000| 0%| F| |TAMS 0x00000000a4600000, 0x00000000a4600000| Untracked
| 51|0x00000000a4700000, 0x00000000a4700000, 0x00000000a4800000| 0%| F| |TAMS 0x00000000a4700000, 0x00000000a4700000| Untracked
| 52|0x00000000a4800000, 0x00000000a4800000, 0x00000000a4900000| 0%| F| |TAMS 0x00000000a4800000, 0x00000000a4800000| Untracked
| 53|0x00000000a4900000, 0x00000000a4900000, 0x00000000a4a00000| 0%| F| |TAMS 0x00000000a4900000, 0x00000000a4900000| Untracked
| 54|0x00000000a4a00000, 0x00000000a4a00000, 0x00000000a4b00000| 0%| F| |TAMS 0x00000000a4a00000, 0x00000000a4a00000| Untracked
| 55|0x00000000a4b00000, 0x00000000a4b00000, 0x00000000a4c00000| 0%| F| |TAMS 0x00000000a4b00000, 0x00000000a4b00000| Untracked
| 56|0x00000000a4c00000, 0x00000000a4c00000, 0x00000000a4d00000| 0%| F| |TAMS 0x00000000a4c00000, 0x00000000a4c00000| Untracked
| 57|0x00000000a4d00000, 0x00000000a4d00000, 0x00000000a4e00000| 0%| F| |TAMS 0x00000000a4d00000, 0x00000000a4d00000| Untracked
| 58|0x00000000a4e00000, 0x00000000a4e00000, 0x00000000a4f00000| 0%| F| |TAMS 0x00000000a4e00000, 0x00000000a4e00000| Untracked
| 59|0x00000000a4f00000, 0x00000000a4f00000, 0x00000000a5000000| 0%| F| |TAMS 0x00000000a4f00000, 0x00000000a4f00000| Untracked
| 60|0x00000000a5000000, 0x00000000a5000000, 0x00000000a5100000| 0%| F| |TAMS 0x00000000a5000000, 0x00000000a5000000| Untracked
| 61|0x00000000a5100000, 0x00000000a5100000, 0x00000000a5200000| 0%| F| |TAMS 0x00000000a5100000, 0x00000000a5100000| Untracked
| 62|0x00000000a5200000, 0x00000000a5200000, 0x00000000a5300000| 0%| F| |TAMS 0x00000000a5200000, 0x00000000a5200000| Untracked
| 63|0x00000000a5300000, 0x00000000a5300000, 0x00000000a5400000| 0%| F| |TAMS 0x00000000a5300000, 0x00000000a5300000| Untracked
| 64|0x00000000a5400000, 0x00000000a5400000, 0x00000000a5500000| 0%| F| |TAMS 0x00000000a5400000, 0x00000000a5400000| Untracked
| 65|0x00000000a5500000, 0x00000000a5500000, 0x00000000a5600000| 0%| F| |TAMS 0x00000000a5500000, 0x00000000a5500000| Untracked
| 66|0x00000000a5600000, 0x00000000a5600000, 0x00000000a5700000| 0%| F| |TAMS 0x00000000a5600000, 0x00000000a5600000| Untracked
| 67|0x00000000a5700000, 0x00000000a5700000, 0x00000000a5800000| 0%| F| |TAMS 0x00000000a5700000, 0x00000000a5700000| Untracked
| 68|0x00000000a5800000, 0x00000000a5800000, 0x00000000a5900000| 0%| F| |TAMS 0x00000000a5800000, 0x00000000a5800000| Untracked
| 69|0x00000000a5900000, 0x00000000a5900000, 0x00000000a5a00000| 0%| F| |TAMS 0x00000000a5900000, 0x00000000a5900000| Untracked
| 70|0x00000000a5a00000, 0x00000000a5a00000, 0x00000000a5b00000| 0%| F| |TAMS 0x00000000a5a00000, 0x00000000a5a00000| Untracked
| 71|0x00000000a5b00000, 0x00000000a5b00000, 0x00000000a5c00000| 0%| F| |TAMS 0x00000000a5b00000, 0x00000000a5b00000| Untracked
| 72|0x00000000a5c00000, 0x00000000a5c00000, 0x00000000a5d00000| 0%| F| |TAMS 0x00000000a5c00000, 0x00000000a5c00000| Untracked
| 73|0x00000000a5d00000, 0x00000000a5d00000, 0x00000000a5e00000| 0%| F| |TAMS 0x00000000a5d00000, 0x00000000a5d00000| Untracked
| 74|0x00000000a5e00000, 0x00000000a5e00000, 0x00000000a5f00000| 0%| F| |TAMS 0x00000000a5e00000, 0x00000000a5e00000| Untracked
| 75|0x00000000a5f00000, 0x00000000a5f00000, 0x00000000a6000000| 0%| F| |TAMS 0x00000000a5f00000, 0x00000000a5f00000| Untracked
| 76|0x00000000a6000000, 0x00000000a6000000, 0x00000000a6100000| 0%| F| |TAMS 0x00000000a6000000, 0x00000000a6000000| Untracked
| 77|0x00000000a6100000, 0x00000000a6100000, 0x00000000a6200000| 0%| F| |TAMS 0x00000000a6100000, 0x00000000a6100000| Untracked
| 78|0x00000000a6200000, 0x00000000a6200000, 0x00000000a6300000| 0%| F| |TAMS 0x00000000a6200000, 0x00000000a6200000| Untracked
| 79|0x00000000a6300000, 0x00000000a6300000, 0x00000000a6400000| 0%| F| |TAMS 0x00000000a6300000, 0x00000000a6300000| Untracked
| 80|0x00000000a6400000, 0x00000000a6400000, 0x00000000a6500000| 0%| F| |TAMS 0x00000000a6400000, 0x00000000a6400000| Untracked
| 81|0x00000000a6500000, 0x00000000a6500000, 0x00000000a6600000| 0%| F| |TAMS 0x00000000a6500000, 0x00000000a6500000| Untracked
| 82|0x00000000a6600000, 0x00000000a6600000, 0x00000000a6700000| 0%| F| |TAMS 0x00000000a6600000, 0x00000000a6600000| Untracked
| 83|0x00000000a6700000, 0x00000000a6700000, 0x00000000a6800000| 0%| F| |TAMS 0x00000000a6700000, 0x00000000a6700000| Untracked
| 84|0x00000000a6800000, 0x00000000a6800000, 0x00000000a6900000| 0%| F| |TAMS 0x00000000a6800000, 0x00000000a6800000| Untracked
| 85|0x00000000a6900000, 0x00000000a6900000, 0x00000000a6a00000| 0%| F| |TAMS 0x00000000a6900000, 0x00000000a6900000| Untracked
| 86|0x00000000a6a00000, 0x00000000a6a00000, 0x00000000a6b00000| 0%| F| |TAMS 0x00000000a6a00000, 0x00000000a6a00000| Untracked
| 87|0x00000000a6b00000, 0x00000000a6b00000, 0x00000000a6c00000| 0%| F| |TAMS 0x00000000a6b00000, 0x00000000a6b00000| Untracked
| 88|0x00000000a6c00000, 0x00000000a6c00000, 0x00000000a6d00000| 0%| F| |TAMS 0x00000000a6c00000, 0x00000000a6c00000| Untracked
| 89|0x00000000a6d00000, 0x00000000a6d00000, 0x00000000a6e00000| 0%| F| |TAMS 0x00000000a6d00000, 0x00000000a6d00000| Untracked
| 90|0x00000000a6e00000, 0x00000000a6e00000, 0x00000000a6f00000| 0%| F| |TAMS 0x00000000a6e00000, 0x00000000a6e00000| Untracked
| 91|0x00000000a6f00000, 0x00000000a6f00000, 0x00000000a7000000| 0%| F| |TAMS 0x00000000a6f00000, 0x00000000a6f00000| Untracked
| 92|0x00000000a7000000, 0x00000000a7076a70, 0x00000000a7100000| 46%| E| |TAMS 0x00000000a7000000, 0x00000000a7000000| Complete
| 93|0x00000000a7100000, 0x00000000a7200000, 0x00000000a7200000|100%| E|CS|TAMS 0x00000000a7100000, 0x00000000a7100000| Complete
| 94|0x00000000a7200000, 0x00000000a7300000, 0x00000000a7300000|100%| E|CS|TAMS 0x00000000a7200000, 0x00000000a7200000| Complete
| 95|0x00000000a7300000, 0x00000000a7400000, 0x00000000a7400000|100%| E|CS|TAMS 0x00000000a7300000, 0x00000000a7300000| Complete
Card table byte_map: [0x000002cbfa730000,0x000002cbfaa30000] _byte_map_base: 0x000002cbfa226000
Marking Bits (Prev, Next): (CMBitMap*) 0x000002cbfa089fc0, (CMBitMap*) 0x000002cbfa08a000
Prev Bits: [0x000002cbfad30000, 0x000002cbfc4e0000)
Next Bits: [0x000002cbfc4e0000, 0x000002cbfdc90000)
Polling page: 0x000002cbf7f70000
Metaspace:
Usage:
Non-class: 662.75 KB used.
Class: 47.21 KB used.
Both: 709.96 KB used.
Virtual space:
Non-class space: 64.00 MB reserved, 704.00 KB ( 1%) committed, 1 nodes.
Class space: 1.00 GB reserved, 128.00 KB ( <1%) committed, 1 nodes.
Both: 1.06 GB reserved, 832.00 KB ( <1%) committed.
Chunk freelists:
Non-Class: 3.85 MB
Class: 3.72 MB
Both: 7.56 MB
MaxMetaspaceSize: unlimited
CompressedClassSpaceSize: 1.00 GB
Initial GC threshold: 21.00 MB
Current GC threshold: 21.00 MB
CDS: on
MetaspaceReclaimPolicy: balanced
- commit_granule_bytes: 65536.
- commit_granule_words: 8192.
- virtual_space_node_default_size: 8388608.
- enlarge_chunks_in_place: 1.
- new_chunks_are_fully_committed: 0.
- uncommit_free_chunks: 1.
- use_allocation_guard: 0.
Internal statistics:
num_allocs_failed_limit: 0.
num_arena_births: 20.
num_arena_deaths: 0.
num_vsnodes_births: 2.
num_vsnodes_deaths: 0.
num_space_committed: 13.
num_space_uncommitted: 0.
num_chunks_returned_to_freelist: 0.
num_chunks_taken_from_freelist: 34.
num_chunk_merges: 0.
num_chunk_splits: 22.
num_chunks_enlarged: 16.
num_inconsistent_stats: 0.
CodeHeap 'non-profiled nmethods': size=120000Kb used=90Kb max_used=90Kb free=119910Kb
bounds [0x000002cb8f340000, 0x000002cb8f5b0000, 0x000002cb96870000]
CodeHeap 'profiled nmethods': size=120000Kb used=399Kb max_used=399Kb free=119600Kb
bounds [0x000002cb87e10000, 0x000002cb88080000, 0x000002cb8f340000]
CodeHeap 'non-nmethods': size=5760Kb used=1111Kb max_used=1111Kb free=4648Kb
bounds [0x000002cb87870000, 0x000002cb87ae0000, 0x000002cb87e10000]
total_blobs=682 nmethods=307 adapters=288
compilation: enabled
stopped_count=0, restarted_count=0
full_count=0
Compilation events (20 events):
Event: 1.522 Thread 0x000002cb96f2bd60 nmethod 292 0x000002cb87e70710 code [0x000002cb87e708c0, 0x000002cb87e70b58]
Event: 1.525 Thread 0x000002cb96f2bd60 293 3 jdk.internal.org.objectweb.asm.SymbolTable::put (150 bytes)
Event: 1.526 Thread 0x000002cb96f2bd60 nmethod 293 0x000002cb87e70c10 code [0x000002cb87e70e00, 0x000002cb87e71698]
Event: 1.528 Thread 0x000002cb96f2bd60 294 1 java.lang.invoke.MethodType$ConcurrentWeakInternSet$WeakEntry::hashCode (5 bytes)
Event: 1.528 Thread 0x000002cb96f2bd60 nmethod 294 0x000002cb8f354e90 code [0x000002cb8f355020, 0x000002cb8f3550f8]
Event: 1.528 Thread 0x000002cb96f2bd60 295 3 java.lang.Class::getClassLoader (28 bytes)
Event: 1.529 Thread 0x000002cb96f2bd60 nmethod 295 0x000002cb87e71990 code [0x000002cb87e71b40, 0x000002cb87e71d98]
Event: 1.588 Thread 0x000002cb96f2bd60 300 3 java.lang.invoke.MemberName::testAllFlags (7 bytes)
Event: 1.589 Thread 0x000002cb96f2bd60 nmethod 300 0x000002cb87e71e90 code [0x000002cb87e72020, 0x000002cb87e721f8]
Event: 1.589 Thread 0x000002cb96f2bd60 302 3 java.lang.invoke.LambdaForm$BasicType::basicType (19 bytes)
Event: 1.590 Thread 0x000002cb96f2bd60 nmethod 302 0x000002cb87e72290 code [0x000002cb87e72460, 0x000002cb87e726b8]
Event: 1.590 Thread 0x000002cb96f2bd60 303 3 jdk.internal.org.objectweb.asm.SymbolTable$Entry::<init> (17 bytes)
Event: 1.590 Thread 0x000002cb96f2bd60 nmethod 303 0x000002cb87e72810 code [0x000002cb87e729c0, 0x000002cb87e72b48]
Event: 1.590 Thread 0x000002cb96f2bd60 304 3 jdk.internal.org.objectweb.asm.ByteVector::putByte (39 bytes)
Event: 1.590 Thread 0x000002cb96f2bd60 nmethod 304 0x000002cb87e72c10 code [0x000002cb87e72dc0, 0x000002cb87e72fa8]
Event: 1.590 Thread 0x000002cb96f2bd60 305 1 java.lang.invoke.MethodTypeForm::parameterSlotCount (5 bytes)
Event: 1.590 Thread 0x000002cb96f2bd60 nmethod 305 0x000002cb8f356210 code [0x000002cb8f3563a0, 0x000002cb8f356478]
Event: 1.590 Thread 0x000002cb96f2bd60 306 3 jdk.internal.org.objectweb.asm.SymbolTable::addConstantUtf8 (98 bytes)
Event: 1.591 Thread 0x000002cb96f2bd60 nmethod 306 0x000002cb87e73110 code [0x000002cb87e73340, 0x000002cb87e73938]
Event: 1.591 Thread 0x000002cb96f2bd60 307 3 jdk.internal.org.objectweb.asm.ByteVector::putShort (52 bytes)
GC Heap History (0 events):
No events
Deoptimization events (4 events):
Event: 1.087 Thread 0x000002cbfa035c40 Uncommon trap: trap_request=0xffffff45 fr.pc=0x000002cb8f34af64 relative=0x0000000000000064
Event: 1.087 Thread 0x000002cbfa035c40 Uncommon trap: reason=unstable_if action=reinterpret pc=0x000002cb8f34af64 method=java.io.WinNTFileSystem.isSlash(C)Z @ 9 c2
Event: 1.087 Thread 0x000002cbfa035c40 DEOPT PACKING pc=0x000002cb8f34af64 sp=0x000000db19afe380
Event: 1.087 Thread 0x000002cbfa035c40 DEOPT UNPACKING pc=0x000002cb878c23a3 sp=0x000000db19afe308 mode 2
Classes loaded (20 events):
Event: 0.511 Loading class java/net/URLConnection
Event: 0.512 Loading class java/net/URLConnection done
Event: 0.512 Loading class sun/net/www/URLConnection done
Event: 0.512 Loading class sun/net/www/protocol/file/FileURLConnection done
Event: 0.513 Loading class sun/net/www/MessageHeader
Event: 0.513 Loading class sun/net/www/MessageHeader done
Event: 0.516 Loading class java/io/FilePermission$1
Event: 0.516 Loading class jdk/internal/access/JavaIOFilePermissionAccess
Event: 0.517 Loading class jdk/internal/access/JavaIOFilePermissionAccess done
Event: 0.517 Loading class java/io/FilePermission$1 done
Event: 0.529 Loading class java/io/FilePermissionCollection
Event: 0.530 Loading class java/io/FilePermissionCollection done
Event: 0.530 Loading class java/util/Vector
Event: 0.532 Loading class java/util/Vector done
Event: 0.532 Loading class java/io/FilePermissionCollection$1
Event: 0.533 Loading class java/io/FilePermissionCollection$1 done
Event: 1.032 Loading class java/lang/IllegalStateException
Event: 1.035 Loading class java/lang/IllegalStateException done
Event: 1.471 Loading class sun/invoke/util/VerifyAccess$1
Event: 1.479 Loading class sun/invoke/util/VerifyAccess$1 done
Classes unloaded (0 events):
No events
Classes redefined (0 events):
No events
Internal exceptions (0 events):
No events
VM Operations (4 events):
Event: 0.172 Executing VM operation: HandshakeAllThreads
Event: 0.172 Executing VM operation: HandshakeAllThreads done
Event: 1.184 Executing VM operation: Cleanup
Event: 1.205 Executing VM operation: Cleanup done
Events (17 events):
Event: 0.015 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\java.dll
Event: 0.031 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\jsvml.dll
Event: 0.032 Thread 0x000002cbfa035c40 Thread added: 0x000002cbfa035c40
Event: 0.042 Thread 0x000002cb96ee2c60 Thread added: 0x000002cb96ee2c60
Event: 0.043 Thread 0x000002cb96ee6070 Thread added: 0x000002cb96ee6070
Event: 0.080 Thread 0x000002cb96f00d20 Thread added: 0x000002cb96f00d20
Event: 0.080 Thread 0x000002cb96f02ad0 Thread added: 0x000002cb96f02ad0
Event: 0.080 Thread 0x000002cb96f03c10 Thread added: 0x000002cb96f03c10
Event: 0.080 Thread 0x000002cb96f04e90 Thread added: 0x000002cb96f04e90
Event: 0.081 Thread 0x000002cb96f09a80 Thread added: 0x000002cb96f09a80
Event: 0.081 Thread 0x000002cb96f2bd60 Thread added: 0x000002cb96f2bd60
Event: 0.081 Thread 0x000002cb96f406c0 Thread added: 0x000002cb96f406c0
Event: 0.133 Thread 0x000002cb9b1ca2c0 Thread added: 0x000002cb9b1ca2c0
Event: 0.143 Thread 0x000002cb9b1d2850 Thread added: 0x000002cb9b1d2850
Event: 0.153 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\net.dll
Event: 0.158 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\nio.dll
Event: 0.170 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\zip.dll
Dynamic libraries:
0x00007ff7a7750000 - 0x00007ff7a7760000 C:\Program Files\Java\jdk-18.0.1\bin\java.exe
0x00007ffbfbb50000 - 0x00007ffbfbd45000 C:\WINDOWS\SYSTEM32\ntdll.dll
0x00007ffbd8b00000 - 0x00007ffbd8b16000 C:\Program Files\Avast Software\Avast\aswhook.dll
0x00007ffbf9ba0000 - 0x00007ffbf9c5d000 C:\WINDOWS\System32\KERNEL32.DLL
0x00007ffbf97d0000 - 0x00007ffbf9a9d000 C:\WINDOWS\System32\KERNELBASE.dll
0x00007ffbf9aa0000 - 0x00007ffbf9ba0000 C:\WINDOWS\System32\ucrtbase.dll
0x00007ffbec2b0000 - 0x00007ffbec2ca000 C:\Program Files\Java\jdk-18.0.1\bin\VCRUNTIME140.dll
0x00007ffbf2cb0000 - 0x00007ffbf2cc8000 C:\Program Files\Java\jdk-18.0.1\bin\jli.dll
0x00007ffbfb5f0000 - 0x00007ffbfb69e000 C:\WINDOWS\System32\ADVAPI32.dll
0x00007ffbf9da0000 - 0x00007ffbf9e3e000 C:\WINDOWS\System32\msvcrt.dll
0x00007ffbfa6b0000 - 0x00007ffbfa74c000 C:\WINDOWS\System32\sechost.dll
0x00007ffbfb460000 - 0x00007ffbfb585000 C:\WINDOWS\System32\RPCRT4.dll
0x00007ffbfb7c0000 - 0x00007ffbfb960000 C:\WINDOWS\System32\USER32.dll
0x00007ffbf9700000 - 0x00007ffbf9722000 C:\WINDOWS\System32\win32u.dll
0x00007ffbdc100000 - 0x00007ffbdc39a000 C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e\COMCTL32.dll
0x00007ffbfa680000 - 0x00007ffbfa6aa000 C:\WINDOWS\System32\GDI32.dll
0x00007ffbf9540000 - 0x00007ffbf964b000 C:\WINDOWS\System32\gdi32full.dll
0x00007ffbf9340000 - 0x00007ffbf93dd000 C:\WINDOWS\System32\msvcp_win.dll
0x00007ffbf2c30000 - 0x00007ffbf2c3a000 C:\WINDOWS\SYSTEM32\VERSION.dll
0x00007ffbfa650000 - 0x00007ffbfa680000 C:\WINDOWS\System32\IMM32.DLL
0x00007ffbf3df0000 - 0x00007ffbf3dfc000 C:\Program Files\Java\jdk-18.0.1\bin\vcruntime140_1.dll
0x00007ffbda4c0000 - 0x00007ffbda54d000 C:\Program Files\Java\jdk-18.0.1\bin\msvcp140.dll
0x00007ffbbf6a0000 - 0x00007ffbc02b0000 C:\Program Files\Java\jdk-18.0.1\bin\server\jvm.dll
0x00007ffbf9c60000 - 0x00007ffbf9c68000 C:\WINDOWS\System32\PSAPI.DLL
0x00007ffbe6a50000 - 0x00007ffbe6a59000 C:\WINDOWS\SYSTEM32\WSOCK32.dll
0x00007ffbfa7b0000 - 0x00007ffbfa81b000 C:\WINDOWS\System32\WS2_32.dll
0x00007ffbedb20000 - 0x00007ffbedb47000 C:\WINDOWS\SYSTEM32\WINMM.dll
0x00007ffbf7120000 - 0x00007ffbf7132000 C:\WINDOWS\SYSTEM32\kernel.appcore.dll
0x00007ffbf07b0000 - 0x00007ffbf07ba000 C:\Program Files\Java\jdk-18.0.1\bin\jimage.dll
0x00007ffbe8240000 - 0x00007ffbe8424000 C:\WINDOWS\SYSTEM32\DBGHELP.DLL
0x00007ffbe8210000 - 0x00007ffbe823c000 C:\WINDOWS\SYSTEM32\dbgcore.DLL
0x00007ffbf92b0000 - 0x00007ffbf9332000 C:\WINDOWS\System32\bcryptPrimitives.dll
0x00007ffbec280000 - 0x00007ffbec2a5000 C:\Program Files\Java\jdk-18.0.1\bin\java.dll
0x00007ffbd4ec0000 - 0x00007ffbd4f96000 C:\Program Files\Java\jdk-18.0.1\bin\jsvml.dll
0x00007ffbfa8d0000 - 0x00007ffbfb014000 C:\WINDOWS\System32\SHELL32.dll
0x00007ffbf7320000 - 0x00007ffbf7ab4000 C:\WINDOWS\SYSTEM32\windows.storage.dll
0x00007ffbfb020000 - 0x00007ffbfb374000 C:\WINDOWS\System32\combase.dll
0x00007ffbf8bf0000 - 0x00007ffbf8c1c000 C:\WINDOWS\SYSTEM32\Wldp.dll
0x00007ffbfa090000 - 0x00007ffbfa13d000 C:\WINDOWS\System32\SHCORE.dll
0x00007ffbfb590000 - 0x00007ffbfb5e5000 C:\WINDOWS\System32\shlwapi.dll
0x00007ffbf91a0000 - 0x00007ffbf91bf000 C:\WINDOWS\SYSTEM32\profapi.dll
0x00007ffbec260000 - 0x00007ffbec273000 C:\Program Files\Java\jdk-18.0.1\bin\net.dll
0x00007ffbf02b0000 - 0x00007ffbf03ba000 C:\WINDOWS\SYSTEM32\WINHTTP.dll
0x00007ffbf8910000 - 0x00007ffbf897a000 C:\WINDOWS\system32\mswsock.dll
0x00007ffbebfa0000 - 0x00007ffbebfb6000 C:\Program Files\Java\jdk-18.0.1\bin\nio.dll
0x00007ffbe4750000 - 0x00007ffbe4768000 C:\Program Files\Java\jdk-18.0.1\bin\zip.dll
dbghelp: loaded successfully - version: 4.0.5 - missing functions: none
symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;C:\Program Files\Java\jdk-18.0.1\bin;C:\WINDOWS\SYSTEM32;C:\Program Files\Avast Software\Avast;C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e;C:\Program Files\Java\jdk-18.0.1\bin\server
VM Arguments:
jvm_args: -Dmaven.multiModuleProjectDirectory=C:\Users\guill\gitProjects\mmocore -Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3 -Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\bin\m2.conf -Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven-event-listener.jar -Dfile.encoding=UTF-8
java_command: org.codehaus.classworlds.Launcher -Didea.version=2021.1.2 install --non-recursive
java_class_path (initial): C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\boot\plexus-classworlds.license
Launcher Type: SUN_STANDARD
[Global flags]
intx CICompilerCount = 4 {product} {ergonomic}
uint ConcGCThreads = 2 {product} {ergonomic}
uint G1ConcRefinementThreads = 8 {product} {ergonomic}
size_t G1HeapRegionSize = 1048576 {product} {ergonomic}
uintx GCDrainStackTargetSize = 64 {product} {ergonomic}
size_t InitialHeapSize = 100663296 {product} {ergonomic}
size_t MarkStackSize = 4194304 {product} {ergonomic}
size_t MaxHeapSize = 1589641216 {product} {ergonomic}
size_t MaxNewSize = 953155584 {product} {ergonomic}
size_t MinHeapDeltaBytes = 1048576 {product} {ergonomic}
size_t MinHeapSize = 8388608 {product} {ergonomic}
uintx NonNMethodCodeHeapSize = 5839372 {pd product} {ergonomic}
uintx NonProfiledCodeHeapSize = 122909434 {pd product} {ergonomic}
uintx ProfiledCodeHeapSize = 122909434 {pd product} {ergonomic}
uintx ReservedCodeCacheSize = 251658240 {pd product} {ergonomic}
bool SegmentedCodeCache = true {product} {ergonomic}
size_t SoftMaxHeapSize = 1589641216 {manageable} {ergonomic}
bool UseCompressedClassPointers = true {product lp64_product} {ergonomic}
bool UseCompressedOops = true {product lp64_product} {ergonomic}
bool UseG1GC = true {product} {ergonomic}
bool UseLargePagesIndividualAllocation = false {pd product} {ergonomic}
Logging:
Log output configuration:
#0: stdout all=warning uptime,level,tags foldmultilines=false
#1: stderr all=off uptime,level,tags foldmultilines=false
Environment Variables:
PATH=C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files\Java\jdk-16.0.2\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;PATH;C:\Users\guill\AppData\Local\Microsoft\WindowsApps;C:\Windows\System32;;C:\Users\guill\Desktop\Microsoft VS Code\bin;C:\Users\guill\AppData\Roaming\npm
USERNAME=guill
OS=Windows_NT
PROCESSOR_IDENTIFIER=AMD64 Family 23 Model 24 Stepping 1, AuthenticAMD
--------------- S Y S T E M ---------------
OS:
Windows 10 , 64 bit Build 19041 (10.0.19041.1706)
OS uptime: 11 days 18:11 hours
Hyper-V role detected
CPU: total 8 (initial active 8) (8 cores per cpu, 2 threads per core) family 23 model 24 stepping 1 microcode 0x0, cx8, cmov, fxsr, ht, mmx, 3dnowpref, sse, sse2, sse3, ssse3, sse4a, sse4.1, sse4.2, popcnt, lzcnt, tsc, tscinvbit, avx, avx2, aes, clmul, bmi1, bmi2, adx, sha, fma, vzeroupper, clflush, clflushopt, hv
Memory: 4k page, system-wide physical 6061M (441M free)
TotalPageFile size 24493M (AvailPageFile size 0M)
current process WorkingSet (physical memory assigned to process): 34M, peak: 34M
current process commit charge ("private bytes"): 178M, peak: 178M
vm_info: Java HotSpot(TM) 64-Bit Server VM (18.0.1+10-24) for windows-amd64 JRE (18.0.1+10-24), built on Mar 9 2022 22:41:56 by "mach5one" with MS VC++ 16.8 / 16.9 (VS2019)
END.

1124
replay_pid12252.log Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,18 +2,17 @@ package net.Indyuce.mmocore;
import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.UtilityMethods;
import io.lumine.mythic.lib.metrics.bukkit.Metrics;
import io.lumine.mythic.lib.version.SpigotPlugin;
import net.Indyuce.mmocore.comp.citizens.CitizenInteractEventListener;
import net.Indyuce.mmocore.comp.citizens.CitizensMMOLoader;
import net.Indyuce.mmocore.comp.mythicmobs.MythicHook;
import net.Indyuce.mmocore.comp.mythicmobs.MythicMobsMMOLoader;
import net.Indyuce.mmocore.api.ConfigFile;
import net.Indyuce.mmocore.api.PlayerActionBar;
import net.Indyuce.mmocore.api.player.PlayerData;
import net.Indyuce.mmocore.api.player.attribute.AttributeModifier;
import net.Indyuce.mmocore.api.player.profess.resource.PlayerResource;
import net.Indyuce.mmocore.command.*;
import net.Indyuce.mmocore.comp.citizens.CitizenInteractEventListener;
import net.Indyuce.mmocore.comp.citizens.CitizensMMOLoader;
import net.Indyuce.mmocore.comp.mythicmobs.MythicHook;
import net.Indyuce.mmocore.comp.mythicmobs.MythicMobsMMOLoader;
import net.Indyuce.mmocore.comp.placeholder.DefaultParser;
import net.Indyuce.mmocore.comp.placeholder.PlaceholderAPIParser;
import net.Indyuce.mmocore.comp.placeholder.PlaceholderParser;
@ -45,19 +44,19 @@ import net.Indyuce.mmocore.party.PartyModule;
import net.Indyuce.mmocore.party.PartyModuleType;
import net.Indyuce.mmocore.party.provided.MMOCorePartyModule;
import net.Indyuce.mmocore.skill.cast.SkillCastingMode;
import net.Indyuce.mmocore.skill.custom.mechanic.ExperienceMechanic;
import net.Indyuce.mmocore.skill.custom.mechanic.ManaMechanic;
import net.Indyuce.mmocore.skill.custom.mechanic.StaminaMechanic;
import net.Indyuce.mmocore.skill.custom.mechanic.StelliumMechanic;
import net.Indyuce.mmocore.script.mechanic.ExperienceMechanic;
import net.Indyuce.mmocore.script.mechanic.StaminaMechanic;
import net.Indyuce.mmocore.script.mechanic.ManaMechanic;
import net.Indyuce.mmocore.script.mechanic.StelliumMechanic;
import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import io.lumine.mythic.lib.metrics.bukkit.Metrics;
import org.bukkit.command.CommandMap;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;
import org.jetbrains.annotations.NotNull;
import org.spigotmc.SpigotConfig;
import java.io.File;
import java.lang.reflect.Field;
@ -83,9 +82,8 @@ public class MMOCore extends JavaPlugin {
public final LootChestManager lootChests = new LootChestManager();
public final MMOLoadManager loadManager = new MMOLoadManager();
public final RestrictionManager restrictionManager = new RestrictionManager();
public final StatManager statManager = new StatManager();
@Deprecated
public final SkillTreeManager skillTreeManager = new SkillTreeManager();
public final StatManager statManager = new StatManager();
// Profession managers
public final CustomBlockManager mineManager = new CustomBlockManager();
@ -104,12 +102,8 @@ public class MMOCore extends JavaPlugin {
// Modules
@NotNull
public PartyModule partyModule;
@NotNull
public GuildModule guildModule;
public boolean shouldDebugSQL, hasBungee;
private static final int MYTHICLIB_COMPATIBILITY_INDEX = 7;
public boolean shouldDebugSQL = false;
public MMOCore() {
plugin = this;
@ -183,9 +177,6 @@ public class MMOCore extends JavaPlugin {
MMOCore.plugin.getLogger().log(Level.INFO, "Hooked onto MythicMobs");
}
// Checks if the server runs with Bungee
hasBungee = SpigotConfig.bungee & !Bukkit.getServer().getOnlineMode();
/*
* Resource regeneration. Must check if entity is dead otherwise regen will make
* the 'respawn' button glitched plus HURT entity effect bug
@ -317,7 +308,8 @@ public class MMOCore extends JavaPlugin {
commandMap.register("mmocore", new PartyCommand(config.getConfigurationSection("party")));
if (config.contains("guild"))
commandMap.register("mmocore", new GuildCommand(config.getConfigurationSection("guild")));
if (config.contains("skill-tree"))
commandMap.register("mmocore", new SkillTreeCommand(config.getConfigurationSection("skill-tree")));
if (hasEconomy() && economy.isValid()) {
if (config.contains("withdraw"))
commandMap.register("mmocore", new WithdrawCommand(config.getConfigurationSection("withdraw")));
@ -349,8 +341,10 @@ public class MMOCore extends JavaPlugin {
}.runTaskTimerAsynchronously(MMOCore.plugin, autosave, autosave);
}
}
@Override
public void onDisable() {
// Save player data
for (PlayerData data : PlayerData.getAll())
if (data.isFullyLoaded()) {
@ -377,7 +371,7 @@ public class MMOCore extends JavaPlugin {
* Called either when the server starts when initializing the manager for
* the first time, or when issuing a plugin reload; in that case, stuff
* like listeners must all be cleared before.
*
* <p>
* Also see {@link MMOCoreManager}
*
* @param clearBefore True when issuing a plugin reload
@ -388,7 +382,6 @@ public class MMOCore extends JavaPlugin {
configManager = new ConfigManager();
statManager.initialize(clearBefore);
if (clearBefore)
MythicLib.plugin.getSkills().initialize(true);
skillManager.initialize(clearBefore);
@ -401,7 +394,7 @@ public class MMOCore extends JavaPlugin {
// Drop tables must be loaded before professions
dropTableManager.initialize(clearBefore);
statManager.initialize(clearBefore);
professionManager.initialize(clearBefore);
classManager.initialize(clearBefore);
@ -439,7 +432,7 @@ public class MMOCore extends JavaPlugin {
}
public static void sqlDebug(String s) {
if(!MMOCore.plugin.shouldDebugSQL) return;
if (!MMOCore.plugin.shouldDebugSQL) return;
MMOCore.plugin.getLogger().warning("- [SQL Debug] " + s);
}
}

View File

@ -17,5 +17,8 @@ public enum SoundEvent {
,NOT_ENOUGH_POINTS,
CANCEL_QUEST,
START_QUEST,
CLOSE_LOOT_CHEST;
CLOSE_LOOT_CHEST,
LEVEL_SKILL_TREE_NODE,
RESET_SKILL_TREE,
CHANGE_SKILL_TREE;
}

View File

@ -3,6 +3,7 @@ package net.Indyuce.mmocore.api.player;
import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.api.player.MMOPlayerData;
import io.lumine.mythic.lib.player.cooldown.CooldownMap;
import io.lumine.mythic.lib.player.modifier.PlayerModifier;
import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.api.ConfigMessage;
import net.Indyuce.mmocore.api.SoundEvent;
@ -18,6 +19,7 @@ import net.Indyuce.mmocore.api.player.profess.resource.PlayerResource;
import net.Indyuce.mmocore.api.player.social.FriendRequest;
import net.Indyuce.mmocore.api.player.stats.PlayerStats;
import net.Indyuce.mmocore.api.quest.PlayerQuests;
import net.Indyuce.mmocore.api.quest.trigger.Trigger;
import net.Indyuce.mmocore.api.util.Closable;
import net.Indyuce.mmocore.api.util.MMOCoreUtils;
import net.Indyuce.mmocore.experience.EXPSource;
@ -34,6 +36,13 @@ import net.Indyuce.mmocore.player.Unlockable;
import net.Indyuce.mmocore.skill.ClassSkill;
import net.Indyuce.mmocore.skill.RegisteredSkill;
import net.Indyuce.mmocore.skill.cast.SkillCastingHandler;
import net.Indyuce.mmocore.tree.IntegerCoordinates;
import net.Indyuce.mmocore.tree.NodeState;
import net.Indyuce.mmocore.tree.SkillTreeNode;
import net.Indyuce.mmocore.tree.skilltree.LinkedSkillTree;
import net.Indyuce.mmocore.tree.skilltree.SkillTree;
import net.Indyuce.mmocore.tree.skilltree.display.DisplayInfo;
import net.Indyuce.mmocore.tree.skilltree.display.Icon;
import net.Indyuce.mmocore.waypoint.Waypoint;
import net.Indyuce.mmocore.waypoint.WaypointOption;
import net.md_5.bungee.api.ChatMessageType;
@ -50,6 +59,8 @@ import org.jetbrains.annotations.NotNull;
import javax.annotation.Nullable;
import java.util.*;
import java.util.logging.Level;
import java.util.stream.Collectors;
public class PlayerData extends OfflinePlayerData implements Closable, ExperienceTableClaimer {
@ -66,11 +77,12 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
*/
@Nullable
private PlayerClass profess;
private int level, classPoints, skillPoints, attributePoints, attributeReallocationPoints, skillReallocationPoints;
private int level, classPoints, skillPoints, attributePoints, attributeReallocationPoints, skillTreeReallocationPoints, skillReallocationPoints;
private double experience;
private double mana, stamina, stellium;
private Guild guild;
private SkillCastingHandler skillCasting;
private SkillTree cachedSkillTree;
private final PlayerQuests questData;
private final PlayerStats playerStats;
@ -83,6 +95,9 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
private final Map<String, SavedClassInformation> classSlots = new HashMap<>();
private final Map<PlayerActivity, Long> lastActivity = new HashMap<>();
private final Map<SkillTreeNode, Integer> nodeLevels = new HashMap<>();
private final Map<SkillTreeNode, NodeState> nodeStates = new HashMap<>();
private final Map<String, Integer> skillTreePoints = new HashMap<>();
/**
* Saves all the items that have been unlocked so far by
@ -159,6 +174,158 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
}
}
public void setupNodeState() {
for (SkillTree skillTree : MMOCore.plugin.skillTreeManager.getAll())
if (skillTree instanceof LinkedSkillTree) {
LinkedSkillTree linkedSkillTree = (LinkedSkillTree) skillTree;
linkedSkillTree.setupNodeState(this);
} else {
skillTree.setupNodeState(this);
}
}
public void setSkillTreePoints(String treeId, int points) {
skillTreePoints.put(treeId, points);
}
public void giveSkillTreePoints(String id, int val) {
skillTreePoints.put(id, skillTreePoints.get(id) + val);
}
public int countSkillTreePoints(SkillTree skillTree) {
return nodeLevels.keySet().stream().filter(node -> node.getTree().equals(skillTree)).mapToInt(nodeLevels::get).sum();
}
public Map<String, Integer> getSkillTreePoints() {
return skillTreePoints;
}
public boolean containsSkillPointTreeId(String treeId) {
return skillTreePoints.containsKey(treeId);
}
public Set<Map.Entry<String, Integer>> getNodeLevelsEntrySet() {
HashMap<String, Integer> nodeLevelsString = new HashMap<>();
for (SkillTreeNode node : nodeLevels.keySet()) {
nodeLevelsString.put(node.getFullId(), nodeLevels.get(node));
}
return nodeLevelsString.entrySet();
}
public void removeModifiersFrom(SkillTree skillTree) {
for (SkillTreeNode node : skillTree.getNodes()) {
for (int i = 0; i < node.getMaxLevel(); i++) {
List<PlayerModifier> modifiers = node.getModifiers(i);
if (modifiers != null) {
for (PlayerModifier modifier : modifiers) {
modifier.unregister(getMMOPlayerData());
}
}
}
}
}
public boolean canIncrementNodeLevel(SkillTreeNode node) {
NodeState nodeState = nodeStates.get(node);
//Check the State of the node
if (nodeState != NodeState.UNLOCKED && nodeState != NodeState.UNLOCKABLE)
return false;
return getNodeLevel(node) < node.getMaxLevel() && (skillTreePoints.get(node.getTree().getId()) > 0 || skillTreePoints.get("global") > 0);
}
/**
* Increments the node level by one, change the states of branches of the tree.
* Consumes skill tree points from the tree first and then consumes the global skill-tree points ('all')
*/
public <T extends SkillTree> void incrementNodeLevel(SkillTreeNode node) {
setNodeLevel(node, getNodeLevel(node) + 1);
//Triggers the triggers of the node
List<Trigger> triggers = node.getTriggers(getNodeLevel(node));
if (triggers != null) {
for (Trigger trigger : triggers) {
trigger.apply(this);
}
}
//Applies player modifiers
List<PlayerModifier> modifiers = node.getModifiers(getNodeLevel(node));
if (modifiers != null)
for (PlayerModifier modifier : modifiers) {
modifier.register(getMMOPlayerData());
}
if (nodeStates.get(node) == NodeState.UNLOCKABLE)
setNodeState(node, NodeState.UNLOCKED);
if (skillTreePoints.get(node.getTree().getId()) > 0)
withdrawSkillTreePoints(node.getTree().getId(), 1);
else
withdrawSkillTreePoints("global", 1);
//We unload the nodeStates map (for the skill tree) and reload it completely
for (SkillTreeNode node1 : node.getTree().getNodes()) {
nodeStates.remove(node1);
}
node.getTree().setupNodeState(this);
}
/**
* Returns the icon the node should have.
*/
public Icon getIcon(SkillTreeNode node) {
SkillTree skillTree = node.getTree();
DisplayInfo displayInfo = new DisplayInfo(nodeStates.get(node), node.getSize());
return skillTree.getIcon(displayInfo);
}
public Icon getIcon(SkillTree skillTree, IntegerCoordinates coordinates) {
if (skillTree.isNode(coordinates)) {
SkillTreeNode node = skillTree.getNode(coordinates);
if (nodeStates.get(node) == null) {
skillTree.getNodes().forEach(nodee -> Bukkit.broadcastMessage(nodee.getId() + " " + nodeStates.get(nodee)));
}
DisplayInfo displayInfo = new DisplayInfo(nodeStates.get(node), node.getSize());
return skillTree.getIcon(displayInfo);
}
if (skillTree.isPath(coordinates))
return skillTree.getIcon(DisplayInfo.pathInfo);
return null;
}
public int getSkillTreePoint(String treeId) {
return skillTreePoints.get(treeId);
}
public void withdrawSkillTreePoints(String treeId, int withdraw) {
skillTreePoints.put(treeId, skillTreePoints.get(treeId) - withdraw);
}
public void setNodeState(SkillTreeNode node, NodeState nodeState) {
nodeStates.put(node, nodeState);
}
public NodeState getNodeState(SkillTreeNode node) {
return nodeStates.get(node);
}
public boolean hasNodeState(SkillTreeNode node) {
return nodeStates.containsKey(node);
}
public int getNodeLevel(SkillTreeNode node) {
return nodeLevels.get(node);
}
public void setNodeLevel(SkillTreeNode node, int nodeLevel) {
nodeLevels.put(node, nodeLevel);
}
public void addNodeLevel(SkillTreeNode node) {
nodeLevels.put(node, nodeLevels.get(node) + 1);
}
@Override
public void close() {
@ -217,6 +384,17 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
return Math.max(1, level);
}
public void setCachedSkillTree(SkillTree cachedSkillTree) {
this.cachedSkillTree = cachedSkillTree;
}
@NotNull
public SkillTree getOpenedSkillTree() {
if (cachedSkillTree == null)
return MMOCore.plugin.skillTreeManager.getAll().stream().findFirst().get();
return cachedSkillTree;
}
@Nullable
public AbstractParty getParty() {
return MMOCore.plugin.partyModule.getParty(this);
@ -251,6 +429,17 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
return sum;
}
public int getAttributePoints() {
return attributePoints;
}
public int getAttributeReallocationPoints() {
return attributeReallocationPoints;
}
public int getSkillTreeReallocationPoints() {
return skillTreeReallocationPoints;
}
@Override
public int getClaims(ExperienceObject object, ExperienceTable table, ExperienceItem item) {
@ -279,14 +468,6 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
// return skillReallocationPoints;
// }
public int getAttributePoints() {
return attributePoints;
}
public int getAttributeReallocationPoints() {
return attributeReallocationPoints;
}
public boolean isOnline() {
return mmoData.isOnline();
}
@ -379,6 +560,10 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
classPoints = Math.max(0, value);
}
public void setSkillTreeReallocationPoints(int value) {
skillTreeReallocationPoints = Math.max(0, value);
}
public boolean hasSavedClass(PlayerClass profess) {
return classSlots.containsKey(profess.getId());
}
@ -614,7 +799,6 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
new SmallParticleEffect(getPlayer(), Particle.SPELL_INSTANT);
}
getStats().updateStats();
}
refreshVanillaExp();
@ -807,6 +991,7 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
skills.remove(skill);
}
@Deprecated
public boolean hasSkillUnlocked(RegisteredSkill skill) {
return getProfess().hasSkill(skill.getHandler().getId()) && hasSkillUnlocked(getProfess().getSkill(skill.getHandler().getId()));
}
@ -849,6 +1034,10 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
setAttributeReallocationPoints(attributeReallocationPoints + value);
}
public void giveSkillTreeReallocationPoints(int value) {
setSkillTreeReallocationPoints(skillTreeReallocationPoints + value);
}
public CooldownMap getCooldownMap() {
return mmoData.getCooldownMap();
}
@ -876,8 +1065,6 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
public void setBoundSkill(int slot, ClassSkill skill) {
Validate.notNull(skill, "Skill cannot be null");
if (boundSkills.size() < getProfess().getMaxBoundSkills())
boundSkills.add(skill);
else
@ -903,6 +1090,7 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
* @return If the player can change its current class to
* a subclass
*/
@Deprecated
public boolean canChooseSubclass() {
for (Subclass subclass : getProfess().getSubclasses())
if (getLevel() >= subclass.getLevel())

View File

@ -5,7 +5,15 @@ import com.mojang.authlib.properties.Property;
import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.UtilityMethods;
import io.lumine.mythic.lib.api.MMOLineConfig;
import io.lumine.mythic.lib.api.player.EquipmentSlot;
import io.lumine.mythic.lib.api.util.PostLoadObject;
import io.lumine.mythic.lib.player.modifier.ModifierSource;
import io.lumine.mythic.lib.player.skill.PassiveSkill;
import io.lumine.mythic.lib.script.Script;
import io.lumine.mythic.lib.skill.SimpleSkill;
import io.lumine.mythic.lib.skill.Skill;
import io.lumine.mythic.lib.skill.handler.MythicLibSkillHandler;
import io.lumine.mythic.lib.skill.trigger.TriggerType;
import io.lumine.mythic.lib.version.VersionMaterial;
import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.api.player.PlayerData;
@ -20,20 +28,18 @@ import net.Indyuce.mmocore.experience.ExpCurve;
import net.Indyuce.mmocore.experience.ExperienceObject;
import net.Indyuce.mmocore.experience.droptable.ExperienceTable;
import net.Indyuce.mmocore.loot.chest.particle.CastingParticle;
import net.Indyuce.mmocore.player.playerclass.ClassTrigger;
import net.Indyuce.mmocore.player.playerclass.ClassTriggerType;
import net.Indyuce.mmocore.player.stats.StatInfo;
import net.Indyuce.mmocore.skill.ClassSkill;
import net.Indyuce.mmocore.skill.RegisteredSkill;
import net.Indyuce.mmocore.skill.cast.KeyCombo;
import net.Indyuce.mmocore.skill.cast.PlayerKey;
import net.md_5.bungee.api.ChatColor;
import org.apache.commons.lang.Validate;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.craftbukkit.libs.org.apache.commons.lang3.Validate;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.jetbrains.annotations.NotNull;
@ -48,31 +54,35 @@ public class PlayerClass extends PostLoadObject implements ExperienceObject {
private final List<String> description = new ArrayList<>(), attrDescription = new ArrayList<>();
private final ItemStack icon;
private final Map<ClassOption, Boolean> options = new HashMap<>();
private final ManaDisplayOptions manaDisplay;
private final int maxLevel, displayOrder;
@NotNull
private final ManaDisplayOptions manaDisplay;
@NotNull
private final ExpCurve expCurve;
@Nullable
private final ExperienceTable expTable;
@NotNull
private final CastingParticle castParticle;
private final int maxBoundSkills;
private final List<PassiveSkill> classScripts = new LinkedList();
private final Map<String, LinearValue> stats = new HashMap<>();
private final Map<String, ClassSkill> skills = new LinkedHashMap<>();
private final List<Subclass> subclasses = new ArrayList<>();
@Nullable
//If the class redefines its own key combos.
private final HashMap<KeyCombo,Integer> combos= new HashMap<>();
// If the class redefines its own key combos.
private final Map<KeyCombo, Integer> combos = new HashMap<>();
private int longestCombo;
@Deprecated
private final Map<String, ClassTrigger> classTriggers = new HashMap<>();
private final Map<PlayerResource, ResourceRegeneration> resourceHandlers = new HashMap<>();
@Deprecated
private final Map<String, EventTrigger> eventTriggers = new HashMap<>();
private final CastingParticle castParticle;
public PlayerClass(String id, FileConfiguration config) {
super(config);
@ -119,17 +129,27 @@ public class PlayerClass extends PostLoadObject implements ExperienceObject {
}
this.expTable = expTable;
if (config.contains("scripts"))
for (String key : config.getConfigurationSection("scripts").getKeys(false))
try {
final TriggerType trigger = TriggerType.valueOf(UtilityMethods.enumName(key));
final Script script = MythicLib.plugin.getSkills().loadScript(config.getConfigurationSection("scripts." + key));
final Skill castSkill = new SimpleSkill(trigger, new MythicLibSkillHandler(script));
final PassiveSkill skill = new PassiveSkill("MMOCoreClassScript", castSkill, EquipmentSlot.OTHER, ModifierSource.OTHER);
classScripts.add(skill);
} catch (IllegalArgumentException exception) {
MMOCore.plugin.getLogger().log(Level.WARNING, "Could not load script '" + key + "' from class '" + id + "': " + exception.getMessage());
}
ConfigurationSection section=config.getConfigurationSection("combos");
if(section!=null) {
// Load different combos
for (String key : section.getKeys(false))
if (config.contains("key-combos"))
for (String key : config.getConfigurationSection("key-combos").getKeys(false))
try {
int spellSlot = Integer.valueOf(key);
Validate.isTrue(spellSlot >= 0, "Spell slot must be at least 0");
Validate.isTrue(!combos.values().contains(spellSlot), "There is already a key combo with the same skill slot");
KeyCombo combo = new KeyCombo();
for (String str : section.getStringList(key))
for (String str : config.getStringList("key-combos." + key))
combo.registerKey(PlayerKey.valueOf(UtilityMethods.enumName(str)));
combos.put(combo, spellSlot);
@ -138,16 +158,14 @@ public class PlayerClass extends PostLoadObject implements ExperienceObject {
MMOCore.plugin.getLogger().log(Level.WARNING, "Could not load key combo '" + key + "': " + exception.getMessage());
}
}
if (config.contains("triggers"))
for (String key : config.getConfigurationSection("triggers").getKeys(false)) {
for (String key : config.getConfigurationSection("triggers").getKeys(false))
try {
String format = key.toLowerCase().replace("_", "-").replace(" ", "-");
eventTriggers.put(format, new EventTrigger(format, config.getStringList("triggers." + key)));
} catch (IllegalArgumentException exception) {
MMOCore.log(Level.WARNING, "Could not load trigger '" + key + "' from class '" + id + "':" + exception.getMessage());
}
}
if (config.contains("attributes"))
for (String key : config.getConfigurationSection("attributes").getKeys(false))
@ -341,10 +359,15 @@ public class PlayerClass extends PostLoadObject implements ExperienceObject {
return equals(playerData.getProfess());
}
@Nullable
@Deprecated
public ClassTrigger getClassTrigger(ClassTriggerType type) {
return classTriggers.get(type);
/**
* @return A list of passive skills which correspond to class
* scripts wrapped in a format recognized by MythicLib.
* Class scripts are handled just like
* passive skills
*/
@NotNull
public List<PassiveSkill> getScripts() {
return classScripts;
}
@Deprecated
@ -352,7 +375,6 @@ public class PlayerClass extends PostLoadObject implements ExperienceObject {
return eventTriggers.keySet();
}
@Deprecated
public boolean hasEventTriggers(String name) {
return eventTriggers.containsKey(name);
@ -415,7 +437,7 @@ public class PlayerClass extends PostLoadObject implements ExperienceObject {
}
@Nullable
public HashMap<KeyCombo, Integer> getCombos() {
public Map<KeyCombo, Integer> getKeyCombos() {
return combos;
}

View File

@ -6,13 +6,13 @@ import io.lumine.mythic.lib.api.stat.StatMap;
import io.lumine.mythic.lib.api.stat.modifier.StatModifier;
import io.lumine.mythic.lib.player.modifier.ModifierSource;
import io.lumine.mythic.lib.player.modifier.ModifierType;
import io.lumine.mythic.lib.player.skill.PassiveSkill;
import io.lumine.mythic.lib.player.skill.PassiveSkillMap;
import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.api.player.PlayerData;
import net.Indyuce.mmocore.experience.Profession;
import net.Indyuce.mmocore.player.stats.StatInfo;
import net.Indyuce.mmocore.skill.ClassSkill;
import org.apache.commons.lang.Validate;
import org.jetbrains.annotations.NotNull;
public class PlayerStats {
private final PlayerData data;
@ -96,9 +96,15 @@ public class PlayerStats {
*
* This updates the player's PASSIVE skills
*/
data.getMMOPlayerData().getPassiveSkillMap().removeModifiers("MMOCorePassiveSkill");
final PassiveSkillMap skillMap = data.getMMOPlayerData().getPassiveSkillMap();
skillMap.removeModifiers("MMOCorePassiveSkill");
for (ClassSkill skill : data.getProfess().getSkills())
if (skill.getSkill().getTrigger().isPassive())
data.getMMOPlayerData().getPassiveSkillMap().addModifier(skill.toPassive(data));
skillMap.addModifier(skill.toPassive(data));
// This updates the player's class SCRIPTS
skillMap.removeModifiers("MMOCoreClassScript");
for (PassiveSkill script : data.getProfess().getScripts())
skillMap.addModifier(script);
}
}

View File

@ -53,6 +53,44 @@ public class MMOCoreUtils {
return builder.toString();
}
/**
*
* @param value an integer you want to convert
* @return the string representing the integer but with roman letters
*/
public static String toRomanNumerals(int value) {
LinkedHashMap<String, Integer> roman_numerals = new LinkedHashMap<String, Integer>();
roman_numerals.put("M", 1000);
roman_numerals.put("CM", 900);
roman_numerals.put("D", 500);
roman_numerals.put("CD", 400);
roman_numerals.put("C", 100);
roman_numerals.put("XC", 90);
roman_numerals.put("L", 50);
roman_numerals.put("XL", 40);
roman_numerals.put("X", 10);
roman_numerals.put("IX", 9);
roman_numerals.put("V", 5);
roman_numerals.put("IV", 4);
roman_numerals.put("I", 1);
String res = "";
for(Map.Entry<String, Integer> entry : roman_numerals.entrySet()){
int matches = value/entry.getValue();
res += repeat(entry.getKey(), matches);
value = value % entry.getValue();
}
return res;
}
private static String repeat(String s, int n) {
if(s == null) {
return null;
}
final StringBuilder sb = new StringBuilder();
for(int i = 0; i < n; i++) {
sb.append(s);
}
return sb.toString();
}
/**
* Displays an in game indicator using a hologram. This uses
* LumineUtils hologramFactory to summon holograms
@ -85,11 +123,6 @@ public class MMOCoreUtils {
return t;
}
public static String toEnumName(String str) {
return str.replace("-","_").replace(" ","_").toUpperCase();
}
public static String toBase64(ItemStack[] items) {
try {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();

View File

@ -1,5 +1,6 @@
package net.Indyuce.mmocore.command;
import io.lumine.mythic.lib.UtilityMethods;
import net.Indyuce.mmocore.MMOCore;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
@ -18,7 +19,7 @@ public class CommandVerbose {
for (CommandType type : CommandType.values())
try {
values.put(type, VerboseValue.valueOf(config.getString(type.name().toLowerCase(), "TRUE").toUpperCase()));
values.put(type, VerboseValue.valueOf(config.getString(UtilityMethods.enumName(type.name()), "TRUE").toUpperCase()));
} catch (IllegalArgumentException exception) {
values.put(type, VerboseValue.TRUE);
MMOCore.plugin.getLogger().log(Level.WARNING, "Could not load command verbose action for " + type.name());
@ -55,6 +56,7 @@ public class CommandVerbose {
LEVEL,
NOCD,
POINTS,
SKILL_TREE_POINTS,
RESET,
RESOURCE,
WAYPOINT;

View File

@ -0,0 +1,38 @@
package net.Indyuce.mmocore.command;
import net.Indyuce.mmocore.api.event.MMOCommandEvent;
import net.Indyuce.mmocore.api.player.PlayerData;
import net.Indyuce.mmocore.manager.InventoryManager;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.defaults.BukkitCommand;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import java.util.Optional;
public class SkillTreeCommand extends BukkitCommand {
public SkillTreeCommand(ConfigurationSection config) {
super(config.getString("main"));
setAliases(config.getStringList("aliases"));
setDescription("Opens the skills menu.");
}
@Override
public boolean execute(@NotNull CommandSender sender, String s, String[] args) {
if (!(sender instanceof Player))
return false;
PlayerData data = PlayerData.get((Player) sender);
MMOCommandEvent event = new MMOCommandEvent(data, "skills");
Bukkit.getServer().getPluginManager().callEvent(event);
if (event.isCancelled())
return true;
InventoryManager.TREE_VIEW.newInventory(data).open();
return true;
}
}

View File

@ -20,13 +20,15 @@ public class AdminCommandTreeNode extends CommandTreeNode {
addChild(new ExperienceCommandTreeNode(this));
addChild(new LevelCommandTreeNode(this));
addChild(new AttributeCommandTreeNode(this));
addChild(new SkillCommandTreeNode(this));
addChild(new PointsCommandTreeNode("skill", this, PlayerData::setSkillPoints, PlayerData::giveSkillPoints, PlayerData::getSkillPoints));
addChild(new PointsCommandTreeNode("class", this, PlayerData::setClassPoints, PlayerData::giveClassPoints, PlayerData::getClassPoints));
addChild(new PointsCommandTreeNode("attribute", this, PlayerData::setAttributePoints, PlayerData::giveAttributePoints, PlayerData::getAttributePoints));
addChild(new PointsCommandTreeNode("attr-realloc", this, PlayerData::setAttributeReallocationPoints, PlayerData::giveAttributeReallocationPoints, PlayerData::getAttributeReallocationPoints));
addChild(new PointsCommandTreeNode("skill-realloc",this,PlayerData::setSkillReallocationPoints,PlayerData::giveSkillReallocationPoints,PlayerData::getSkillReallocationPoints));
addChild(new SkillCommandTreeNode(this));
addChild(new PointsCommandTreeNode("skill-realloc", this, PlayerData::setSkillReallocationPoints, PlayerData::giveSkillReallocationPoints, PlayerData::getSkillReallocationPoints));
addChild(new PointsCommandTreeNode("skill-tree-realloc", this, PlayerData::setSkillTreeReallocationPoints, PlayerData::giveSkillTreeReallocationPoints, PlayerData::getSkillTreeReallocationPoints));
for (PlayerResource res : PlayerResource.values())
addChild(new ResourceCommandTreeNode(res.name().toLowerCase(), this, res));
}

View File

@ -0,0 +1,88 @@
package net.Indyuce.mmocore.command.rpg.admin;
import io.lumine.mythic.lib.command.api.CommandTreeNode;
import io.lumine.mythic.lib.command.api.Parameter;
import io.lumine.mythic.utils.functions.TriConsumer;
import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.api.player.PlayerData;
import net.Indyuce.mmocore.command.CommandVerbose;
import net.Indyuce.mmocore.tree.skilltree.SkillTree;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
import java.util.function.BiFunction;
import java.util.stream.Collectors;
public class SkillTreePointsCommandTreeNode extends CommandTreeNode {
BiFunction<PlayerData, String,Integer> get;
public SkillTreePointsCommandTreeNode(CommandTreeNode parent, TriConsumer<PlayerData, Integer, String> set,
TriConsumer<PlayerData, Integer, String> give, BiFunction<PlayerData, String,Integer> get) {
super(parent, "skill-tree-points");
addChild(new ActionCommandTreeNode(this, "give", give));
addChild(new ActionCommandTreeNode(this, "set", set));
this.get = get;
}
@Override
public CommandResult execute(CommandSender commandSender, String[] strings) {
return CommandResult.THROW_USAGE;
}
public class ActionCommandTreeNode extends CommandTreeNode {
private final TriConsumer<PlayerData, Integer, String> action;
public ActionCommandTreeNode(CommandTreeNode parent, String id, TriConsumer<PlayerData, Integer, String> action) {
super(parent, id);
this.action = action;
addParameter(Parameter.PLAYER);
addParameter(Parameter.AMOUNT);
addParameter(new Parameter("<type>", ((explorer, list) -> {
MMOCore.plugin.skillTreeManager.getAll().forEach(tree -> list.add(tree.getId()));
list.add("global");
})));
}
@Override
public CommandResult execute(CommandSender sender, String[] args) {
if (args.length < 6)
return CommandResult.THROW_USAGE;
Player player = Bukkit.getPlayer(args[3]);
if (player == null) {
sender.sendMessage(ChatColor.RED + "Could not find the player called " + args[3] + ".");
return CommandResult.FAILURE;
}
int amount;
try {
amount = Integer.parseInt(args[4]);
} catch (Exception e) {
sender.sendMessage(ChatColor.RED + args[4] + " is not a valid number.");
return CommandResult.FAILURE;
}
List<String> list = new ArrayList();
MMOCore.plugin.skillTreeManager.getAll().forEach(tree -> list.add(tree.getId()));
list.add("global");
String id = args[5];
if (!list.contains(id)) {
sender.sendMessage("Could not find the type of points " + id + ".");
return CommandResult.FAILURE;
}
PlayerData data = PlayerData.get(player);
action.accept(data, amount, args[5]);
CommandVerbose.verbose(sender, CommandVerbose.CommandType.SKILL_TREE_POINTS, ChatColor.GOLD + player.getName()
+ ChatColor.YELLOW + " now has " + ChatColor.GOLD + get.apply(data, id) + ChatColor.YELLOW + " " + id + " skill tree points.");
return CommandResult.SUCCESS;
}
}
}

View File

@ -213,7 +213,6 @@ public class PlayerProfessions {
// Apply profession experience table
if (profession.hasExperienceTable())
profession.getExperienceTable().claim(playerData, level, profession);
}
if (check) {

View File

@ -0,0 +1,375 @@
package net.Indyuce.mmocore.gui;
import io.lumine.mythic.lib.MythicLib;
import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.api.SoundEvent;
import net.Indyuce.mmocore.api.player.PlayerData;
import net.Indyuce.mmocore.gui.api.EditableInventory;
import net.Indyuce.mmocore.gui.api.GeneratedInventory;
import net.Indyuce.mmocore.gui.api.InventoryClickContext;
import net.Indyuce.mmocore.gui.api.item.InventoryItem;
import net.Indyuce.mmocore.gui.api.item.Placeholders;
import net.Indyuce.mmocore.gui.api.item.SimplePlaceholderItem;
import net.Indyuce.mmocore.tree.IntegerCoordinates;
import net.Indyuce.mmocore.tree.NodeState;
import net.Indyuce.mmocore.tree.skilltree.SkillTree;
import net.Indyuce.mmocore.tree.SkillTreeNode;
import net.Indyuce.mmocore.tree.skilltree.display.Icon;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.event.inventory.ClickType;
import org.bukkit.event.inventory.InventoryAction;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.persistence.PersistentDataContainer;
import org.bukkit.persistence.PersistentDataType;
import java.util.ArrayList;
import java.util.List;
public class SkillTreeViewer extends EditableInventory {
public SkillTreeViewer() {
super("skill-tree");
}
@Override
public InventoryItem load(String function, ConfigurationSection config) {
if (function.equals("skill-tree")) {
return new SkillTreeItem(config);
}
if (function.equals("reallocation"))
return new InventoryItem<SkillTreeInventory>(config) {
@Override
public Placeholders getPlaceholders(SkillTreeInventory inv, int n) {
Placeholders holders = new Placeholders();
holders.register("skill-tree-points", inv.getPlayerData().getSkillTreePoint(inv.getSkillTree().getId()));
holders.register("global-points", inv.getPlayerData().getSkillTreePoint("global"));
holders.register("realloc-points", inv.getPlayerData().getSkillTreeReallocationPoints());
holders.register("total", inv.getPlayerData().countSkillTreePoints(inv.getSkillTree()));
return holders;
}
};
if (function.equals("skill-tree-node"))
return new SkillTreeNodeItem(config);
if (function.equals("next-tree-list-page")) {
return new NextTreeListPageItem(config);
}
if (function.equals("previous-tree-list-page")) {
return new PreviousTreeListPageItem(config);
}
return null;
}
public SkillTreeInventory newInventory(PlayerData playerData) {
return new SkillTreeInventory(playerData, this);
}
public class SkillTreeItem extends InventoryItem<SkillTreeInventory> {
public SkillTreeItem(ConfigurationSection config) {
//We must use this constructor to show that there are not specified material
super(Material.BARRIER, config);
}
@Override
public boolean hasDifferentDisplay() {
return true;
}
@Override
public ItemStack display(SkillTreeInventory inv, int n) {
int index = inv.getEditable().getByFunction("skill-tree").getSlots().size() * inv.treeListPage + n;
if (!MMOCore.plugin.skillTreeManager.has(index)) {
return new ItemStack(Material.AIR);
}
SkillTree skillTree = MMOCore.plugin.skillTreeManager.get(index);
//We display with the material corresponding to the skillTree
ItemStack item = super.display(inv, n, skillTree.getItem());
ItemMeta meta = item.getItemMeta();
meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);
meta.setDisplayName(skillTree.getName());
meta.setLore(skillTree.getLore());
PersistentDataContainer container = meta.getPersistentDataContainer();
container.set(new NamespacedKey(MMOCore.plugin, "skill-tree-id"), PersistentDataType.STRING, skillTree.getId());
item.setItemMeta(meta);
return item;
}
@Override
public Placeholders getPlaceholders(SkillTreeInventory inv, int n) {
int index = inv.getEditable().getByFunction("skill-tree").getSlots().size() * inv.treeListPage + n;
SkillTree skillTree = MMOCore.plugin.skillTreeManager.get(index);
Placeholders holders = new Placeholders();
holders.register("name", skillTree.getName());
holders.register("id", skillTree.getId());
return holders;
}
}
public class NextTreeListPageItem extends SimplePlaceholderItem<SkillTreeInventory> {
public NextTreeListPageItem(ConfigurationSection config) {
super(config);
}
@Override
public boolean canDisplay(SkillTreeInventory inv) {
return inv.getTreeListPage() < inv.getMaxTreeListPage();
}
}
public class PreviousTreeListPageItem extends SimplePlaceholderItem<SkillTreeInventory> {
public PreviousTreeListPageItem(ConfigurationSection config) {
super(config);
}
@Override
public boolean canDisplay(SkillTreeInventory inv) {
return inv.getTreeListPage() > 0;
}
}
public class SkillTreeNodeItem extends InventoryItem<SkillTreeInventory> {
public SkillTreeNodeItem(ConfigurationSection config) {
super(Material.AIR, config);
}
@Override
public boolean hasDifferentDisplay() {
return true;
}
/**
* Display the node/path with the lore and name filled in the yml of the skill tree node with the right material
* and model-data.
* You don't need to give any name or lore in the gui/skilltree.yml all the information are filled in
* the yml of the skill tree.
*/
@Override
public ItemStack display(SkillTreeInventory inv, int n) {
int slot = getSlots().get(n);
int deltaX = (slot - inv.getMinSlot()) % 9;
int deltaY = (slot - inv.getMinSlot()) / 9;
IntegerCoordinates coordinates = new IntegerCoordinates(inv.getX() + deltaX, inv.getY() + deltaY);
if (inv.getSkillTree().isNode(coordinates) || inv.getSkillTree().isPath(coordinates)) {
Icon icon = inv.getPlayerData().getIcon(inv.getSkillTree(), coordinates);
ItemStack item = super.display(inv, n, icon.getMaterial(), icon.getCustomModelData());
ItemMeta meta = item.getItemMeta();
if (inv.getSkillTree().isNode(coordinates)) {
SkillTreeNode node = inv.getSkillTree().getNode(coordinates);
List<String> lore = new ArrayList<>(node.getLore(inv.getPlayerData()));
lore.add("");
getLore().forEach(str -> lore.add(MythicLib.plugin.parseColors(getPlaceholders(inv, n).apply(inv.getPlayer(), str))));
meta.setLore(lore);
meta.setDisplayName(node.getName());
}
//If it is path we remove the display name and the lore.
else {
meta.setLore(new ArrayList<>());
meta.setDisplayName(" ");
}
meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);
PersistentDataContainer container = meta.getPersistentDataContainer();
container.set(new NamespacedKey(MMOCore.plugin, "coordinates.x"), PersistentDataType.INTEGER, coordinates.getX());
container.set(new NamespacedKey(MMOCore.plugin, "coordinates.y"), PersistentDataType.INTEGER, coordinates.getY());
item.setItemMeta(meta);
return item;
}
return new ItemStack(Material.AIR);
}
@Override
public Placeholders getPlaceholders(SkillTreeInventory inv, int n) {
Placeholders holders = new Placeholders();
holders.register("skill-tree", inv.getSkillTree().getName());
holders.register("skill-tree-points", inv.getPlayerData().getSkillTreePoint(inv.getSkillTree().getId()));
holders.register("global-points", inv.getPlayerData().getSkillTreePoint("global"));
return holders;
}
}
public class SkillTreeInventory extends GeneratedInventory {
private int x, y;
//width and height correspond to the the size of the 'board' representing the skill tree
private int minSlot, middleSlot, maxSlot;
private final int width, height;
private int treeListPage;
private final int maxTreeListPage;
private final SkillTree skillTree;
public SkillTreeInventory(PlayerData playerData, EditableInventory editable) {
super(playerData, editable);
skillTree = playerData.getOpenedSkillTree();
maxTreeListPage = (MMOCore.plugin.skillTreeManager.getAll().size() - 1) / editable.getByFunction("skill-tree").getSlots().size();
//We get the width and height of the GUI(corresponding to the slots given)
List<Integer> slots = editable.getByFunction("skill-tree-node").getSlots();
minSlot = 64;
maxSlot = 0;
for (int slot : slots) {
if (slot < minSlot)
minSlot = slot;
if (slot > maxSlot)
maxSlot = slot;
}
width = (maxSlot - minSlot) % 9;
height = (maxSlot - minSlot) / 9;
middleSlot = minSlot + width / 2 + 9 * (height / 2);
x -= width / 2;
y -= height / 2;
}
public int getX() {
return x;
}
public int getY() {
return y;
}
public int getTreeListPage() {
return treeListPage;
}
public int getMaxTreeListPage() {
return maxTreeListPage;
}
@Override
public String calculateName() {
return getEditable().getName().replace("{skill-tree-name}", skillTree.getName()).replace("{skill-tree-id}", skillTree.getId());
}
public SkillTree getSkillTree() {
return skillTree;
}
public int getMinSlot() {
return minSlot;
}
@Override
public void whenClicked(InventoryClickContext event, InventoryItem item) {
if (item.getFunction().equals("next-tree-list-page")) {
treeListPage++;
open();
}
if (item.getFunction().equals("previous-tree-list-page")) {
treeListPage--;
open();
}
if (item.getFunction().equals("reallocation")) {
int spent = playerData.countSkillTreePoints(skillTree);
if (spent < 1) {
MMOCore.plugin.configManager.getSimpleMessage("no-skill-tree-points-spent").send(player);
MMOCore.plugin.soundManager.getSound(SoundEvent.NOT_ENOUGH_POINTS).playTo(getPlayer());
event.setCancelled(true);
return;
}
if (getPlayerData().getSkillTreeReallocationPoints() <= 0) {
MMOCore.plugin.configManager.getSimpleMessage("not-skill-tree-reallocation-point").send(player);
MMOCore.plugin.soundManager.getSound(SoundEvent.NOT_ENOUGH_POINTS).playTo(getPlayer());
event.setCancelled(true);
return;
} else {
int reallocated = playerData.countSkillTreePoints(skillTree);
//We remove all the nodeStates progress
playerData.giveSkillTreePoints(skillTree.getId(), reallocated);
playerData.giveSkillTreeReallocationPoints(-1);
//We unregister all the modifiers or the player
playerData.removeModifiersFrom(skillTree);
for (SkillTreeNode node : skillTree.getNodes()) {
playerData.setNodeLevel(node, 0);
playerData.setNodeState(node, NodeState.LOCKED);
}
skillTree.setupNodeState(playerData);
MMOCore.plugin.configManager.getSimpleMessage("reallocated-points", "points", "" + playerData.getSkillTreePoint(skillTree.getId()), "skill-tree", skillTree.getName()).send(player);
MMOCore.plugin.soundManager.getSound(SoundEvent.RESET_SKILL_TREE).playTo(player);
event.setCancelled(true);
open();
return;
}
}
if (item.getFunction().equals("skill-tree")) {
String id = event.getItemStack().getItemMeta().getPersistentDataContainer().get(
new NamespacedKey(MMOCore.plugin, "skill-tree-id"), PersistentDataType.STRING);
playerData.setCachedSkillTree(MMOCore.plugin.skillTreeManager.get(id));
MMOCore.plugin.soundManager.getSound(SoundEvent.CHANGE_SKILL_TREE).playTo(player);
newInventory(playerData).open();
event.setCancelled(true);
return;
}
if (item.getFunction().equals("skill-tree-node")) {
if (event.getClickType() == ClickType.RIGHT) {
int offset = event.getSlot();
int xOffset=offset%9-middleSlot%9;
int yOffset=offset/9-middleSlot/9;
x += xOffset;
y += yOffset-1;
open();
event.setCancelled(true);
return;
}
else if (event.getClickType() == ClickType.LEFT) {
PersistentDataContainer container = event.getItemStack().getItemMeta().getPersistentDataContainer();
int x = container.get(new NamespacedKey(MMOCore.plugin, "coordinates.x"), PersistentDataType.INTEGER);
int y = container.get(new NamespacedKey(MMOCore.plugin, "coordinates.y"), PersistentDataType.INTEGER);
SkillTreeNode node = skillTree.getNode(new IntegerCoordinates(x, y));
if (playerData.canIncrementNodeLevel(node)) {
playerData.incrementNodeLevel(node);
MMOCore.plugin.configManager.getSimpleMessage("upgrade-skill-node", "skill-node", node.getName(), "level", "" + playerData.getNodeLevel(node)).send(player);
MMOCore.plugin.soundManager.getSound(SoundEvent.LEVEL_UP).playTo(getPlayer());
open();
event.setCancelled(true);
return;
} else if (playerData.getNodeState(node) == NodeState.LOCKED || playerData.getNodeState(node) == NodeState.FULLY_LOCKED) {
MMOCore.plugin.configManager.getSimpleMessage("locked-node").send(player);
MMOCore.plugin.soundManager.getSound(SoundEvent.NOT_ENOUGH_POINTS).playTo(getPlayer());
event.setCancelled(true);
return;
} else if (playerData.getNodeLevel(node) >= node.getMaxLevel()) {
MMOCore.plugin.configManager.getSimpleMessage("skill-node-max-level-hit").send(player);
MMOCore.plugin.soundManager.getSound(SoundEvent.NOT_ENOUGH_POINTS).playTo(getPlayer());
event.setCancelled(true);
return;
}
//Else the player doesn't doesn't have the skill tree points
else {
MMOCore.plugin.configManager.getSimpleMessage("not-enough-skill-tree-points").send(player);
MMOCore.plugin.soundManager.getSound(SoundEvent.NOT_ENOUGH_POINTS).playTo(getPlayer());
event.setCancelled(true);
return;
}
}
}
}
}
}

View File

@ -1,6 +1,7 @@
package net.Indyuce.mmocore.gui.api;
import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.UtilityMethods;
import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.api.util.MMOCoreUtils;
import net.Indyuce.mmocore.gui.api.adaptor.AdaptorType;
@ -39,7 +40,7 @@ public abstract class EditableInventory {
public void reload(FileConfiguration config) {
this.config = config;
this.adaptorType = AdaptorType.valueOf(MMOCoreUtils.toEnumName(config.getString("adaptor-type", "classic-adaptor")));
this.adaptorType = AdaptorType.valueOf(UtilityMethods.enumName(config.getString("adaptor-type", "classic-adaptor")));
Validate.notNull(adaptorType, config.getString("adaptor-type") + " does not correspond to an adaptor-type.");//TODO
this.name = config.getString("name");

View File

@ -134,11 +134,19 @@ public abstract class InventoryItem<T extends GeneratedInventory> {
}
public ItemStack display(T inv, int n) {
return display(inv, n, null);
}
public ItemStack display(T inv, int n, Material specificMaterial) {
return display(inv, n, specificMaterial, 0);
}
public ItemStack display(T inv, int n, Material specificMaterial, int modelData) {
Placeholders placeholders = getPlaceholders(inv, n);
ItemStack item = new ItemStack(material);
ItemStack item = new ItemStack(specificMaterial == null ? material : specificMaterial);
ItemMeta meta = item.getItemMeta();
meta.setCustomModelData(modelData);
if (texture != null && meta instanceof SkullMeta)
applyTexture(texture, (SkullMeta) meta);
@ -161,6 +169,7 @@ public abstract class InventoryItem<T extends GeneratedInventory> {
return item;
}
private void applyTexture(String value, SkullMeta meta) {
try {
GameProfile profile = new GameProfile(UUID.randomUUID(), null);

View File

@ -0,0 +1,50 @@
package net.Indyuce.mmocore.listener;
import io.lumine.mythic.lib.api.player.MMOPlayerData;
import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.api.event.PlayerChangeClassEvent;
import net.Indyuce.mmocore.api.event.PlayerLevelUpEvent;
import net.Indyuce.mmocore.script.trigger.MMOCoreTriggerType;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
/**
* This class calls trigger types registered by MMOCore
* which are specific to player classes.
*
* @see {@link MMOCoreTriggerType}
*/
public class ClassScriptListener implements Listener {
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onClassChange(PlayerChangeClassEvent event) {
// With delay
Bukkit.getScheduler().runTask(MMOCore.plugin, () -> {
final MMOPlayerData caster = event.getData().getMMOPlayerData();
caster.triggerSkills(MMOCoreTriggerType.CLASS_CHOSEN, null);
});
}
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onLevelUp(PlayerLevelUpEvent event) {
// With delay
Bukkit.getScheduler().runTask(MMOCore.plugin, () -> {
final MMOPlayerData caster = event.getData().getMMOPlayerData();
caster.triggerSkills(MMOCoreTriggerType.LEVEL_UP, null);
});
}
/* @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onBlockBreak(BlockBreakEvent event) {
performScripts(event.getPlayer(), MMOCoreTriggerType.BREAK_BLOCK);
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onBlockPlace(BlockBreakEvent event) {
performScripts(event.getPlayer(), MMOCoreTriggerType.PLACE_BLOCK);
}*/
}

View File

@ -1,106 +0,0 @@
package net.Indyuce.mmocore.listener;
import io.lumine.mythic.lib.api.event.PlayerAttackEvent;
import io.lumine.mythic.lib.api.player.EquipmentSlot;
import io.lumine.mythic.lib.damage.DamageType;
import io.lumine.mythic.lib.skill.result.SkillResult;
import io.lumine.mythic.lib.skill.trigger.TriggerMetadata;
import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.api.event.PlayerChangeClassEvent;
import net.Indyuce.mmocore.api.event.PlayerLevelUpEvent;
import net.Indyuce.mmocore.api.player.PlayerData;
import net.Indyuce.mmocore.player.playerclass.ClassTrigger;
import net.Indyuce.mmocore.player.playerclass.ClassTriggerType;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import javax.annotation.Nullable;
import javax.inject.Provider;
import java.util.HashMap;
import java.util.Map;
/**
* This class still uses quest triggers because this was implemented
* in 1.9 and 1.9 is big enough as an update.
* <p>
* Future implementation will utilize skill mechanics. MMOCore 1.10
* will merge the quest triggers with the ML skill mechanics.
*
* @author jules
* @see {@link ClassTrigger}
*/
@Deprecated
public class ClassTriggers implements Listener {
@Deprecated
private static final Map<DamageType, ClassTriggerType> damageTriggers = new HashMap<>();
static {
damageTriggers.put(DamageType.MAGIC, ClassTriggerType.MAGIC_DAMAGE);
damageTriggers.put(DamageType.PHYSICAL, ClassTriggerType.PHYSICAL_DAMAGE);
damageTriggers.put(DamageType.PROJECTILE, ClassTriggerType.PROJECTILE_DAMAGE);
damageTriggers.put(DamageType.WEAPON, ClassTriggerType.WEAPON_DAMAGE);
damageTriggers.put(DamageType.SKILL, ClassTriggerType.SKILL_DAMAGE);
damageTriggers.put(DamageType.UNARMED, ClassTriggerType.SKILL_DAMAGE);
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onAttack(PlayerAttackEvent event) {
for (Map.Entry<DamageType, ClassTriggerType> entry : damageTriggers.entrySet())
if (event.getDamage().hasType(entry.getKey()))
applyTriggers(event.getPlayer(), entry.getValue(), () -> new TriggerMetadata(event.getAttack(), event.getEntity()));
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onClassChange(PlayerChangeClassEvent event) {
Bukkit.getScheduler().runTask(MMOCore.plugin, () -> applyTriggers(event.getData(), ClassTriggerType.CLASS_CHOSEN));
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onLevelUp(PlayerLevelUpEvent event) {
applyTriggers(event.getData(), ClassTriggerType.LEVEL_UP);
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onBlockBreak(BlockBreakEvent event) {
applyTriggers(event.getPlayer(), ClassTriggerType.BREAK_BLOCK);
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
public void onBlockPlace(BlockBreakEvent event) {
applyTriggers(event.getPlayer(), ClassTriggerType.PLACE_BLOCK);
}
private SkillResult applyTriggers(Player player, ClassTriggerType type) {
return applyTriggers(PlayerData.get(player), type);
}
private SkillResult applyTriggers(PlayerData player, ClassTriggerType type) {
return applyTriggers(player, type, () -> new TriggerMetadata(player.getMMOPlayerData().getStatMap().cache(EquipmentSlot.MAIN_HAND), null, null));
}
@Nullable
private SkillResult applyTriggers(Player player, ClassTriggerType type, Provider<TriggerMetadata> triggerMetaProvider) {
return applyTriggers(PlayerData.get(player), type, triggerMetaProvider);
}
/**
* Apply class shortcut skills from a specific class trigger type.
*
* @param player Player triggering
* @param type Trigger type
* @param triggerMetaProvider Small optimization: if no shortcut skill is found
* with the corresponding trigger type, trigger meta
* is not calculated which saves computations
* @return Skill result or null if no shortcut skill was cast
*/
@Nullable
private SkillResult applyTriggers(PlayerData player, ClassTriggerType type, Provider<TriggerMetadata> triggerMetaProvider) {
ClassTrigger trigger = player.getProfess().getClassTrigger(type);
return trigger == null ? null : trigger.trigger(triggerMetaProvider.get());
}
}

View File

@ -75,6 +75,9 @@ public class ConfigManager {
loadDefaultFile("expcurves", "levels.txt");
loadDefaultFile("expcurves", "mining.txt");
}
if(!new File(MMOCore.plugin.getDataFolder()+"/skilltree").exists()) {
loadDefaultFile("skilltree","combat.yml");
}
loadDefaultFile("attributes.yml");
loadDefaultFile("items.yml");

View File

@ -5,9 +5,7 @@ import java.util.List;
import java.util.logging.Level;
import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.gui.AttributeView;
import net.Indyuce.mmocore.gui.SkillList;
import net.Indyuce.mmocore.gui.WaypointViewer;
import net.Indyuce.mmocore.gui.*;
import net.Indyuce.mmocore.gui.social.friend.EditableFriendList;
import net.Indyuce.mmocore.gui.social.friend.EditableFriendRemoval;
import net.Indyuce.mmocore.gui.social.guild.EditableGuildCreation;
@ -15,12 +13,6 @@ import net.Indyuce.mmocore.gui.social.guild.EditableGuildView;
import net.Indyuce.mmocore.gui.social.party.EditablePartyCreation;
import net.Indyuce.mmocore.gui.social.party.EditablePartyView;
import net.Indyuce.mmocore.api.ConfigFile;
import net.Indyuce.mmocore.gui.ClassConfirmation;
import net.Indyuce.mmocore.gui.ClassSelect;
import net.Indyuce.mmocore.gui.PlayerStats;
import net.Indyuce.mmocore.gui.QuestViewer;
import net.Indyuce.mmocore.gui.SubclassConfirmation;
import net.Indyuce.mmocore.gui.SubclassSelect;
import net.Indyuce.mmocore.gui.api.EditableInventory;
public class InventoryManager {
@ -39,8 +31,8 @@ public class InventoryManager {
public static final EditableGuildCreation GUILD_CREATION = new EditableGuildCreation();
public static final QuestViewer QUEST_LIST = new QuestViewer();
public static final AttributeView ATTRIBUTE_VIEW = new AttributeView();
public static final List<EditableInventory> list = Arrays.asList(PLAYER_STATS, ATTRIBUTE_VIEW, SKILL_LIST, CLASS_SELECT, SUBCLASS_SELECT, SUBCLASS_CONFIRM, QUEST_LIST, WAYPOINTS, CLASS_CONFIRM, FRIEND_LIST, FRIEND_REMOVAL, PARTY_VIEW, PARTY_CREATION, GUILD_VIEW, GUILD_CREATION);
public static final SkillTreeViewer TREE_VIEW = new SkillTreeViewer();
public static final List<EditableInventory> list = Arrays.asList(PLAYER_STATS, ATTRIBUTE_VIEW, TREE_VIEW,SKILL_LIST, CLASS_SELECT, SUBCLASS_SELECT, SUBCLASS_CONFIRM, QUEST_LIST, WAYPOINTS, CLASS_CONFIRM, FRIEND_LIST, FRIEND_REMOVAL, PARTY_VIEW, PARTY_CREATION, GUILD_VIEW, GUILD_CREATION);
public static void load() {
list.forEach(inv -> {

View File

@ -1,21 +1,77 @@
package net.Indyuce.mmocore.manager;
import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.manager.registry.MMOCoreRegister;
import net.Indyuce.mmocore.tree.SkillTree;
import net.Indyuce.mmocore.tree.SkillTreeNode;
import net.Indyuce.mmocore.tree.skilltree.SkillTree;
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.File;
import java.util.*;
import java.util.stream.Collectors;
@Deprecated
public class SkillTreeManager extends MMOCoreRegister<SkillTree> {
private final HashMap<String,SkillTreeNode> skillTreeNodes = new HashMap<>();
@Override
public void register(SkillTree tree){
super.register(tree);
tree.getNodes().forEach((node)->skillTreeNodes.put(node.getFullId(),node));
}
public boolean has(int index) {
return index>=0 &&index<registered.values().stream().collect(Collectors.toList()).size();
}
public SkillTreeNode getNode(String fullId) {
return skillTreeNodes.get(fullId);
}
/**
* Useful to recursively go trough trees
*
* @return The list of all the roots (e.g the nodes without any parents
*/
public List<SkillTreeNode> getRootNodes() {
return skillTreeNodes.values().stream().filter(treeNode -> treeNode.getSoftParents().size()==0).collect(Collectors.toList());
}
public Collection<SkillTreeNode> getAllNodes() {
return skillTreeNodes.values();
}
public SkillTree get(int index) {
return registered.values().stream().collect(Collectors.toList()).get(index);
}
@Override
public String getRegisteredObjectName() {
return "skill tree";
}
@Override
public void initialize(boolean clearBefore) {
if (clearBefore)
registered.clear();
File file = new File(MMOCore.plugin.getDataFolder() + "/skillTree");
if (!file.exists())
file.mkdirs();
load(file);
}
// TODO
public void load(File file) {
if (file.isDirectory()) {
List<File> fileList = Arrays.asList(file.listFiles()).stream().sorted().collect(Collectors.toList());
for (File child : fileList) {
load(child);
}
} else {
register(SkillTree.loadSkillTree(YamlConfiguration.loadConfiguration(file)));
}
}
}

View File

@ -8,7 +8,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
public abstract class MMOCoreRegister<T extends RegisterObject> implements MMOCoreManager {
public abstract class MMOCoreRegister<T extends RegisteredObject> implements MMOCoreManager {
protected final Map<String, T> registered = new HashMap<>();
public void register(T t) {
@ -21,6 +21,9 @@ public abstract class MMOCoreRegister<T extends RegisterObject> implements MMOCo
public T get(String id) {
return Objects.requireNonNull(registered.get(id), "Could not find " + getRegisteredObjectName() + " with ID '" + id + "'");
}
public boolean has(String id){
return registered.containsKey(id);
}
public Collection<T> getAll() {
return registered.values();

View File

@ -1,6 +1,6 @@
package net.Indyuce.mmocore.manager.registry;
public interface RegisterObject {
public interface RegisteredObject {
/**
* Identifier used to register an object

View File

@ -1,58 +0,0 @@
package net.Indyuce.mmocore.player.playerclass;
import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.UtilityMethods;
import io.lumine.mythic.lib.api.MMOLineConfig;
import io.lumine.mythic.lib.script.Script;
import io.lumine.mythic.lib.script.mechanic.Mechanic;
import io.lumine.mythic.lib.skill.SimpleSkill;
import io.lumine.mythic.lib.skill.Skill;
import io.lumine.mythic.lib.skill.handler.MythicLibSkillHandler;
import io.lumine.mythic.lib.skill.result.SkillResult;
import io.lumine.mythic.lib.skill.trigger.TriggerMetadata;
import io.lumine.mythic.lib.skill.trigger.TriggerType;
import io.lumine.mythic.lib.util.configobject.ConfigObject;
import net.Indyuce.mmocore.listener.ClassTriggers;
import org.apache.commons.lang.Validate;
import java.util.List;
/**
* Class triggers are shortcuts for the MythicLib custom
* passive skill creation system.
* <p>
* A class trigger is defined by a {@link ClassTriggerType} which
* determines when the action is performed, and a set of {@link Mechanic}
* which determines what happens when triggered.
* <p>
* Class triggers fully replace 'event triggers' which were an
* over simplified implementation of passive skills.
*
* @author jules
* @see {@link ClassTriggers}
*/
@Deprecated
public class ClassTrigger {
private final ClassTriggerType type;
private final Script skill = new Script("classTrigger", false);
private final Skill castableSkill = new SimpleSkill(TriggerType.CAST, new MythicLibSkillHandler(skill));
public ClassTrigger(String triggerTypeString, List<String> mechanicStringList) {
Validate.notNull(mechanicStringList, "Mechanic list cannot be null");
type = ClassTriggerType.valueOf(UtilityMethods.enumName(triggerTypeString));
for (String key : mechanicStringList) {
ConfigObject config = new MMOLineConfig(key);
Mechanic mechanic = MythicLib.plugin.getSkills().loadMechanic(config);
skill.getMechanics().add(mechanic);
}
}
public ClassTriggerType getType() {
return type;
}
public SkillResult trigger(TriggerMetadata triggerMeta) {
return castableSkill.cast(triggerMeta);
}
}

View File

@ -1,29 +0,0 @@
package net.Indyuce.mmocore.player.playerclass;
public enum ClassTriggerType {
BREAK_BLOCK,
PLACE_BLOCK,
CLASS_CHOSEN,
LEVEL_UP,
@Deprecated
MAGIC_DAMAGE,
@Deprecated
PHYSICAL_DAMAGE,
@Deprecated
PROJECTILE_DAMAGE,
@Deprecated
WEAPON_DAMAGE,
@Deprecated
SKILL_DAMAGE,
@Deprecated
UNARMED_DAMAGE;
}

View File

@ -1,6 +1,6 @@
package net.Indyuce.mmocore.quest;
import net.Indyuce.mmocore.quest.compat.BeautyQuestsModule;
import net.Indyuce.mmocore.quest.compat.BeautyQuestModule;
import net.Indyuce.mmocore.quest.compat.BlackVeinQuestsModule;
import net.Indyuce.mmocore.quest.compat.QuestCreatorModule;
import net.Indyuce.mmocore.quest.compat.QuestModule;
@ -11,7 +11,7 @@ import javax.inject.Provider;
public enum QuestModuleType {
MMOCORE("MMOCore", MMOCoreQuestModule::new),
QUESTS("Quests", BlackVeinQuestsModule::new),
BEAUTY_QUEST("BeautyQuests", BeautyQuestsModule::new),
BEAUTY_QUEST("BeautyQuests", BeautyQuestModule::new),
QUEST_CREATOR("QuestCreator", QuestCreatorModule::new);
private final String pluginName;

View File

@ -8,21 +8,24 @@ import fr.skytasul.quests.structure.Quest;
import net.Indyuce.mmocore.quest.AbstractQuest;
import org.bukkit.entity.Player;
public class BeautyQuestsModule implements QuestModule<BeautyQuestsModule.BeautyQuestQuest> {
public class BeautyQuestModule implements QuestModule<BeautyQuestModule.BeautyQuestQuest> {
@Override
public BeautyQuestQuest getQuestOrThrow(String questId) {
Quest quest = QuestsAPI.getQuests().getQuest(Integer.parseInt(questId));
return quest == null ? null : new BeautyQuestQuest(quest);
Quest quest=QuestsAPI.getQuests().getQuest(Integer.parseInt(questId));
return quest==null?null:new BeautyQuestQuest(quest);
}
@Override
public boolean hasCompletedQuest(String questId, Player player) {
PlayerAccount account = PlayersManager.getPlayerAccount(player);
PlayerQuestDatas quest = account.getQuestDatas(QuestsAPI.getQuests().getQuest(Integer.parseInt(questId)));
PlayerAccount account=PlayersManager.getPlayerAccount(player);
PlayerQuestDatas quest=account.getQuestDatas(QuestsAPI.getQuests().getQuest(Integer.parseInt(questId)));
return quest.isFinished();
}
public class BeautyQuestQuest implements AbstractQuest {
Quest quest;

View File

@ -7,26 +7,32 @@ import net.Indyuce.mmocore.quest.AbstractQuest;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
public class BlackVeinQuestsModule implements QuestModule<BlackVeinQuestsModule.BlackVeinQuestQuest> {
private final Quests plugin = (Quests) Bukkit.getPluginManager().getPlugin("Quests");
@Override
public BlackVeinQuestQuest getQuestOrThrow(String id) {
Quests plugin = (Quests) Bukkit.getPluginManager().getPlugin("Quests");
return plugin.getQuestById(id) == null ? null : new BlackVeinQuestQuest(plugin.getQuestById(id));
return plugin.getQuestById(id)==null?null:new BlackVeinQuestQuest(plugin.getQuestById(id));
}
@Override
public boolean hasCompletedQuest(String questId, Player player) {
Quester quester = plugin.getQuester(player.getUniqueId());
for (Quest quest : quester.getCompletedQuests())
if (quest.getId().equals(questId))
if(quester==null)
return false;
for(Quest quest:quester.getCompletedQuests()) {
if(quest.getId().equals(questId))
return true;
}
return false;
}
public class BlackVeinQuestQuest implements AbstractQuest {
private final Quest quest;
@ -44,4 +50,5 @@ public class BlackVeinQuestsModule implements QuestModule<BlackVeinQuestsModule.
return quest.getId();
}
}
}

View File

@ -8,11 +8,10 @@ import com.guillaumevdn.questcreator.lib.quest.QuestEndType;
import net.Indyuce.mmocore.quest.AbstractQuest;
import org.apache.commons.lang.Validate;
import org.bukkit.entity.Player;
import java.util.Arrays;
import java.util.List;
public class QuestCreatorModule implements QuestModule<QuestCreatorModule.QuestCreatorQuest> {
public class QuestCreatorModule implements QuestModule<QuestCreatorModule.QuestCreatorQuest>{
@Override
public QuestCreatorQuest getQuestOrThrow(String id) {
@ -21,22 +20,24 @@ public class QuestCreatorModule implements QuestModule<QuestCreatorModule.QuestC
@Override
public boolean hasCompletedQuest(String questId, Player player) {
UserQC playerData = UserQC.cachedOrNull(player);
Validate.notNull(playerData, "QuestCreator User hasn't been loaded!");
// Gets all the quests the player has succeeded at
List<QuestHistoryElement> elements = playerData.getQuestHistory().getElements(questId, Arrays.asList(QuestEndType.SUCCESS), 0);
for (QuestHistoryElement el : elements)
if (el.getModelId().equals(questId))
UserQC playerData=UserQC.cachedOrNull(player);
if(playerData==null)
return false;
//Gets all the quests the player has succeeded at
List<QuestHistoryElement> elements=playerData.getQuestHistory().getElements(questId, Arrays.asList(QuestEndType.SUCCESS),0);
for(QuestHistoryElement el:elements) {
if(el.getModelId().equals(questId))
return true;
}
return false;
}
/**
* QC ElementModel corresponds to our quest and their
* quests correspond to our Quest progress class
*/
public class QuestCreatorQuest implements AbstractQuest {
ElementModel questModel;

View File

@ -3,11 +3,14 @@ package net.Indyuce.mmocore.quest.compat;
import net.Indyuce.mmocore.quest.AbstractQuest;
import org.bukkit.entity.Player;
import javax.annotation.Nullable;
public interface QuestModule<T extends AbstractQuest> {
/**
* @return Quest with given identifier
*/
@Nullable
public T getQuestOrThrow(String id);
/**

View File

@ -1,4 +1,4 @@
package net.Indyuce.mmocore.skill.custom.mechanic;
package net.Indyuce.mmocore.script.mechanic;
import io.lumine.mythic.lib.script.mechanic.type.TargetMechanic;
import io.lumine.mythic.lib.skill.SkillMetadata;

View File

@ -1,4 +1,4 @@
package net.Indyuce.mmocore.skill.custom.mechanic;
package net.Indyuce.mmocore.script.mechanic;
import io.lumine.mythic.lib.UtilityMethods;
import io.lumine.mythic.lib.skill.SkillMetadata;

View File

@ -1,4 +1,4 @@
package net.Indyuce.mmocore.skill.custom.mechanic;
package net.Indyuce.mmocore.script.mechanic;
public enum Operation {
GIVE,

View File

@ -1,4 +1,4 @@
package net.Indyuce.mmocore.skill.custom.mechanic;
package net.Indyuce.mmocore.script.mechanic;
import io.lumine.mythic.lib.UtilityMethods;
import io.lumine.mythic.lib.skill.SkillMetadata;

View File

@ -1,4 +1,4 @@
package net.Indyuce.mmocore.skill.custom.mechanic;
package net.Indyuce.mmocore.script.mechanic;
import io.lumine.mythic.lib.UtilityMethods;
import io.lumine.mythic.lib.script.mechanic.type.TargetMechanic;

View File

@ -0,0 +1,8 @@
package net.Indyuce.mmocore.script.trigger;
import io.lumine.mythic.lib.skill.trigger.TriggerType;
public class MMOCoreTriggerType {
public static final TriggerType LEVEL_UP = new TriggerType("LEVEL_UP"),
CLASS_CHOSEN = new TriggerType("CLASS_CHOSEN");
}

View File

@ -23,7 +23,6 @@ public class IntegerCoordinates {
public int getX() {
return x;
}
public int getY() {
return y;
}

View File

@ -0,0 +1,6 @@
package net.Indyuce.mmocore.tree;
public enum NodeState {
LOCKED,UNLOCKED,UNLOCKABLE,FULLY_LOCKED;
}

View File

@ -0,0 +1,5 @@
package net.Indyuce.mmocore.tree;
public enum ParentType {
SOFT,STRONG;
}

View File

@ -1,79 +0,0 @@
package net.Indyuce.mmocore.tree;
import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.manager.registry.RegisterObject;
import org.apache.commons.lang.Validate;
import org.bukkit.configuration.ConfigurationSection;
import org.jetbrains.annotations.NotNull;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.logging.Level;
/**
* A passive skill tree that features nodes, or passive skills.
* <p>
* The player can explore the passive skill tree using the right GUI
* and unlock nodes by spending passive skill points. Unlocking nodes
* grant permanent player modifiers, including
* - stats
* - active or passive MythicLib skills
* - active or passive MMOCore skills
* - extra attribute pts
* - particle or potion effects
*
* @author jules
* @see {@link SkillTreeNode}
*/
public class SkillTree implements RegisterObject {
private final String id, name;
private final Map<IntegerCoordinates, SkillTreeNode> nodes = new HashMap<>();
public SkillTree(ConfigurationSection config) {
this.id = config.getName();
this.name = Objects.requireNonNull(config.getString("name"), "Could not find skill tree name");
Validate.isTrue(config.isConfigurationSection("nodes"), "Could not find tree passive skills");
for (String xKey : config.getConfigurationSection("nodes").getKeys(false))
for (String yKey : config.getConfigurationSection("nodes." + xKey).getKeys(false))
try {
int x = Integer.parseInt(xKey), y = Integer.parseInt(yKey);
SkillTreeNode node = new SkillTreeNode(this, x, y, config.getConfigurationSection("nodes." + xKey + "." + yKey));
nodes.put(node.getCoordinates(), node);
} catch (RuntimeException exception) {
MMOCore.plugin.getLogger().log(Level.WARNING, "Could not load tree node '" + xKey + "." + yKey + "' for skill tree '" + id + "': " + exception.getMessage());
}
}
@Override
public String getId() {
return id;
}
public String getName() {
return name;
}
public Collection<SkillTreeNode> getNodes() {
return nodes.values();
}
@NotNull
public SkillTreeNode getNode(IntegerCoordinates coords) {
return Objects.requireNonNull(nodes.get(coords), "Could not find node in tree '" + id + "' with coordinates '" + coords.toString() + "'");
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SkillTree skillTree = (SkillTree) o;
return id.equals(skillTree.id);
}
@Override
public int hashCode() {
return Objects.hash(id);
}
}

View File

@ -1,55 +1,219 @@
package net.Indyuce.mmocore.tree;
import com.gmail.nossr50.mcmmo.acf.annotation.HelpSearchTags;
import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.UtilityMethods;
import io.lumine.mythic.lib.api.MMOLineConfig;
import io.lumine.mythic.lib.player.modifier.PlayerModifier;
import io.lumine.mythic.lib.util.configobject.ConfigSectionObject;
import io.lumine.mythic.lib.util.configobject.ConfigObject;
import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.api.player.PlayerData;
import net.Indyuce.mmocore.api.quest.trigger.Trigger;
import net.Indyuce.mmocore.api.util.MMOCoreUtils;
import net.Indyuce.mmocore.gui.api.item.Placeholders;
import net.Indyuce.mmocore.player.Unlockable;
import net.Indyuce.mmocore.tree.skilltree.AutomaticSkillTree;
import net.Indyuce.mmocore.tree.skilltree.SkillTree;
import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit;
import org.bukkit.configuration.ConfigurationSection;
import org.jetbrains.annotations.NotNull;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import java.util.*;
import java.util.logging.Level;
//We must use generics to get the type of the corresponding tree
public class SkillTreeNode implements Unlockable {
private final SkillTree tree;
private final String name;
private final IntegerCoordinates coordinates;
private final List<String> lore;
private final Set<PlayerModifier> modifiers = new HashSet<>();
private final String name, id;
private IntegerCoordinates coordinates;
private boolean isRoot;
public SkillTreeNode(SkillTree tree, int x, int y, ConfigurationSection config) {
/**
* The lore corresponding to each level
*/
private final HashMap<NodeContext, List<String>> lores = new HashMap<>();
//TODO modifiers depending on level with drop tables
private final HashMap<Integer, List<PlayerModifier>> modifiers = new HashMap<>();
private final HashMap<Integer, List<Trigger>> triggers = new HashMap<>();
//The max level the skill tree node can have and the max amount of children it can have.
private final int maxLevel, maxChildren, size;
private final ArrayList<SkillTreeNode> children = new ArrayList<>();
/**
* Associates the required level to each parent.
* <p>
* You only need to have the requirement for one of your softParents
* but you need to fulfill the requirements of all of your strong parents.
**/
private final HashMap<SkillTreeNode, Integer> softParents = new HashMap<>();
private final HashMap<SkillTreeNode, Integer> strongParents = new HashMap<>();
public SkillTreeNode(SkillTree tree, ConfigurationSection config) {
Validate.notNull(config, "Config cannot be null");
this.id = config.getName();
this.tree = tree;
name = Objects.requireNonNull(config.getString("name"), "Could not find node name");
coordinates = new IntegerCoordinates(x, y);
lore = config.getStringList("lore");
size = Objects.requireNonNull(config.getInt("size"));
isRoot = config.getBoolean("is-root", false);
//We initialize the value of the lore for each skill tree node.
for (String state : Objects.requireNonNull(config.getConfigurationSection("lores")).getKeys(false)) {
NodeState nodeState = NodeState.valueOf(UtilityMethods.enumName(state));
if (nodeState == NodeState.UNLOCKED) {
//TODO: Message could'nt load ... instead of exce/*99+*-*99**9+-ption
ConfigurationSection section = config.getConfigurationSection("lores." + state);
for (String level : section.getKeys(false))
lores.put(new NodeContext(nodeState, Integer.parseInt(level)), section.getStringList(level));
} else {
lores.put(new NodeContext(nodeState, 0), config.getStringList("lores." + state));
}
}
//We load the triggers
if (config.contains("triggers")) {
try {
ConfigurationSection section = config.getConfigurationSection("triggers");
for (String levelFormat : section.getKeys(false)) {
final int level = Integer.parseInt(levelFormat);
final List<Trigger> triggers = new ArrayList<>();
for (String str : section.getStringList(levelFormat))
triggers.add(MMOCore.plugin.loadManager.loadTrigger(new MMOLineConfig(str)));
this.triggers.put(level, triggers);
}
} catch (NumberFormatException e) {
MMOCore.plugin.getLogger().log(Level.WARNING, "Couldn't load triggers for skill node " + tree.getId() + "." + id + " : Problem with the Number Format.");
}
}
//We load the player Modifiers
if (config.contains("modifiers")) {
try {
ConfigurationSection section = config.getConfigurationSection("modifiers");
for (String level : section.getKeys(false)) {
int value = Integer.parseInt(level);
for (String str : section.getStringList(level)) {
PlayerModifier modifier = MythicLib.plugin.getModifiers().loadPlayerModifier(new MMOLineConfig(str));
if (!modifiers.containsKey(value)) {
modifiers.put(value, new ArrayList<>());
}
modifiers.get(value).add(modifier);
}
}
} catch (NumberFormatException e) {
MMOCore.plugin.getLogger().log(Level.WARNING, "Couldn't load modifiers for the skill node " + tree.getId() + "." + id + " :Problem with the Number Format.");
}
}
maxLevel = config.contains("max-level") ? config.getInt("max-level") : 1;
maxChildren = config.contains("max-children") ? config.getInt("max-children") : 1;
//If coordinates are precised adn we are not wiht an automaticTree we set them up
if ((!(tree instanceof AutomaticSkillTree))) {
Validate.isTrue(config.contains("coordinates.x") && config.contains("coordinates.y"), "No coordinates specified");
coordinates = new IntegerCoordinates(config.getInt("coordinates.x"), config.getInt("coordinates.y"));
}
}
/*
if (config.contains("modifiers")) {
for (String key : config.getConfigurationSection("modifiers").getKeys(false)) {
PlayerModifier mod = MythicLib.plugin.getModifiers().loadPlayerModifier(new ConfigSectionObject(config.getConfigurationSection(key)));
modifiers.add(mod);
modifiers.put(1, mod);
}
}
*/
public SkillTree getTree() {
return tree;
}
public void setIsRoot() {
isRoot = true;
}
public boolean isRoot() {
return isRoot;
}
//Used when postLoaded
public void addParent(SkillTreeNode parent, int requiredLevel, ParentType parentType) {
if (parentType == ParentType.SOFT)
softParents.put(parent, requiredLevel);
else
strongParents.put(parent, requiredLevel);
}
public void addChild(SkillTreeNode child) {
children.add(child);
}
public void setCoordinates(IntegerCoordinates coordinates) {
this.coordinates = coordinates;
}
public int getParentNeededLevel(SkillTreeNode parent) {
return softParents.containsKey(parent) ? softParents.get(parent) : strongParents.containsKey(parent) ? strongParents.get(parent) : 0;
}
public boolean hasParent(SkillTreeNode parent) {
return softParents.containsKey(parent) || strongParents.containsKey(parent);
}
public int getMaxLevel() {
return maxLevel;
}
public int getMaxChildren() {
return maxChildren;
}
public Set<SkillTreeNode> getSoftParents() {
return softParents.keySet();
}
public Set<SkillTreeNode> getStrongParents() {
return strongParents.keySet();
}
public ArrayList<SkillTreeNode> getChildren() {
return children;
}
public int getSize() {
return size;
}
public String getId() {
return id;
}
public String getFullId() {
return tree.getId() + "." + id;
}
public String getName() {
return name;
return MythicLib.plugin.parseColors(name);
}
public IntegerCoordinates getCoordinates() {
return coordinates;
}
public Set<PlayerModifier> getModifiers() {
return modifiers;
public List<PlayerModifier> getModifiers(int level) {
return modifiers.get(level);
}
/**
* @return Uncolored lore with no placeholders
*/
public List<String> getLore() {
return lore;
public List<Trigger> getTriggers(int level) {
return triggers.get(level);
}
@Override
@ -62,12 +226,79 @@ public class SkillTreeNode implements Unlockable {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SkillTreeNode that = (SkillTreeNode) o;
return tree.equals(that.tree) && coordinates.equals(that.coordinates);
return tree.equals(that.tree) && (id.equals(that.id));
}
@Override
public int hashCode() {
return Objects.hash(tree, coordinates);
return Objects.hash(tree, id);
}
public Placeholders getPlaceholders(PlayerData playerData) {
Placeholders holders = new Placeholders();
holders.register("name", getName());
holders.register("node-state", playerData.getNodeState(this));
holders.register("size", getSize());
holders.register("level", playerData.getNodeLevel(this));
holders.register("max-level", getMaxLevel());
holders.register("max-children", getMaxChildren());
//List of all the children of the node
String str = "";
for (SkillTreeNode node : getChildren())
str += node.getName() + ",";
//We remove the last comma
if (str.length() != 0)
str = str.substring(0, str.length() - 1);
holders.register("children", str);
//list of parents with the level needed for each of them
str = "";
for (SkillTreeNode node : getSoftParents())
str += node.getName() + " " + MMOCoreUtils.toRomanNumerals(getParentNeededLevel(node)) + ",";
//We remove the last comma
if (str.length() != 0)
str = str.substring(0, str.length() - 1);
holders.register("soft-parents-level", str);
//list of parents
str = "";
for (SkillTreeNode node : getSoftParents())
str += node.getName() + ",";
//We remove the last comma
if (str.length() != 0)
str = str.substring(0, str.length() - 1);
holders.register("soft-parents", str);
//list of parents with the level needed for each of them
str = "";
for (SkillTreeNode node : getStrongParents())
str += node.getName() + " " + MMOCoreUtils.toRomanNumerals(getParentNeededLevel(node)) + ",";
//We remove the last comma
if (str.length() != 0)
str = str.substring(0, str.length() - 1);
holders.register("strong-parents-level", str);
//list of parents
str = "";
for (SkillTreeNode node : getStrongParents())
str += node.getName() + ",";
//We remove the last comma
if (str.length() != 0)
str = str.substring(0, str.length() - 1);
holders.register("strong-parents", str);
return holders;
}
public List<String> getLore(PlayerData playerData) {
Placeholders holders = getPlaceholders(playerData);
List<String> parsedLore = new ArrayList<>();
NodeContext context = new NodeContext(playerData.getNodeState(this), playerData.getNodeLevel(this));
lores.get(context).forEach(string -> parsedLore.add(
MythicLib.plugin.parseColors(holders.apply(playerData.getPlayer(), string))));
return parsedLore;
}
/**
@ -91,4 +322,43 @@ public class SkillTreeNode implements Unlockable {
String treeId = treeIdBuilder.toString();
return MMOCore.plugin.skillTreeManager.get(treeId).getNode(coords);
}
public class NodeContext {
private final NodeState nodeState;
private final int nodeLevel;
public NodeContext(NodeState nodeState, int nodeLevel) {
this.nodeState = nodeState;
this.nodeLevel = nodeLevel;
}
public NodeState getNodeState() {
return nodeState;
}
public int getNodeLevel() {
return nodeLevel;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
NodeContext that = (NodeContext) o;
return nodeLevel == that.nodeLevel && nodeState == that.nodeState;
}
@Override
public String toString() {
return "NodeContext{" +
"nodeState=" + nodeState +
", nodeLevel=" + nodeLevel +
'}';
}
@Override
public int hashCode() {
return Objects.hash(nodeState, nodeLevel);
}
}
}

View File

@ -0,0 +1,209 @@
package net.Indyuce.mmocore.tree.skilltree;
import com.guillaumevdn.questcreator.integration.mythicmobs.v4.element.ElementMythicMobsObjective;
import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.tree.IntegerCoordinates;
import net.Indyuce.mmocore.tree.ParentType;
import net.Indyuce.mmocore.tree.SkillTreeNode;
import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit;
import org.bukkit.configuration.ConfigurationSection;
import javax.swing.text.html.HTMLDocument;
import java.util.HashMap;
import java.util.Objects;
import java.util.logging.Level;
/**
* Skill Trees where you only need to fill the strong and soft
*/
public class AutomaticSkillTree extends SkillTree {
//Hash map to store the number of left and right branches of each node
private final HashMap<SkillTreeNode, Branches> nodeBranches = new HashMap<>();
public AutomaticSkillTree(ConfigurationSection config) {
super(config);
}
@Override
public void whenPostLoaded(ConfigurationSection config) {
//We setup the children and parents for each node.
for (SkillTreeNode node : nodes.values()) {
ConfigurationSection section = config.getConfigurationSection("nodes." + node.getId() + ".children.soft");
if (section != null) {
for (String child : section.getKeys(false)) {
node.addChild(getNode(child));
getNode(child).addParent(node, section.getInt(child), ParentType.SOFT);
}
}
section = config.getConfigurationSection("nodes." + node.getId() + ".children.strong");
if (section != null) {
for (String child : section.getKeys(false)) {
node.addChild(getNode(child));
getNode(child).addParent(node, section.getInt(child), ParentType.STRONG);
}
}
}
//We find the root of the tree wich is
for (SkillTreeNode node : nodes.values()) {
if (node.getSoftParents().size() == 0 && node.getStrongParents().size() == 0) {
Validate.isTrue(roots.size() == 0, "You can't have 2 roots on one automatic skill tree. You have " + (roots.size() != 0 ? roots.get(0).getName() : "") + " and " + node.getName() + ".");
//We mark the node as a root also
roots.add(node);
node.setIsRoot();
}
}
//We setup the width of all the nodes recursively
setupTreeWidth(roots.get(0));
//We recursively setup all the coordinates of the tree nodes
roots.get(0).setCoordinates(new IntegerCoordinates(0, 0));
setupCoordinates(roots.get(0));
//We get and cache the values of minX,minY,maxX and maxY
minX = nodeBranches.get(roots.get(0)).getLeftBranches();
minY = 0;
maxX = nodeBranches.get(roots.get(0)).getRightBranches();
for (SkillTreeNode node : nodes.values()) {
if (node.getCoordinates().getY() > maxY)
maxY = node.getCoordinates().getY();
}
//Eventually we setup the skill tree info related to coordinates
super.coordinatesSetup();
}
/**
* Recursive algorithm to automatically calculate the integercoordinates each node should have to have a good display.
* It also fills the list pathToParents representing all the coordinates corresponding to a path between 2 nodes (for the GUI)
*
* @param node the root
*/
private void setupCoordinates(SkillTreeNode node) {
if (node.isRoot()) {
node.setCoordinates(new IntegerCoordinates(0, 2));
}
int childrenSize = node.getChildren().size();
int x = node.getCoordinates().getX();
int y = node.getCoordinates().getY();
int leftOffset = 0;
int rightOffset = 0;
for (int i = 0; i < childrenSize; i++) {
SkillTreeNode child = node.getChildren().get(i);
if (childrenSize % 2 == 1 && i == 0) {
child.setCoordinates(new IntegerCoordinates(x, y - 2));
leftOffset += 2 + nodeBranches.get(child).getLeftBranches();
rightOffset += 2 + nodeBranches.get(child).getRightBranches();
} else if (i % 2 == 0) {
child.setCoordinates(new IntegerCoordinates(x - leftOffset - 2 - nodeBranches.get(child).getWidth(), y - 2));
for (SkillTreeNode skillTree : nodeBranches.keySet())
leftOffset += 2 + nodeBranches.get(child).getWidth();
} else {
child.setCoordinates(new IntegerCoordinates(x + rightOffset + 2 + nodeBranches.get(child).getWidth(), y - 2));
rightOffset += 2 + nodeBranches.get(child).getWidth();
}
//We setup the path to parent variable (Used for the GUI)
int childX = child.getCoordinates().getX();
int childY = child.getCoordinates().getY();
int parentX=node.getCoordinates().getX();
paths.add(new IntegerCoordinates(childX, childY + 1));
int offset = childX > parentX ? -1 : 1;
while (childX != parentX) {
paths.add(new IntegerCoordinates(childX, childY + 2));
childX += offset;
}
//We setup the coordinates for the associated child
setupCoordinates(child);
}
}
public Branches getBranches(SkillTreeNode node) {
return nodeBranches.get(node);
}
/**
* Recursively sed to setup all the right and left branches of the node to later determine its coordinates for GUI display
*/
public void setupTreeWidth(SkillTreeNode node) {
int childrenSize = node.getChildren().size();
int leftBranches = 0;
int rightBranches = 0;
for (int i = 0; i < childrenSize; i++) {
SkillTreeNode child = node.getChildren().get(i);
setupTreeWidth(child);
//If there is an odd number ob branches the first one will be at the center so we add to the left and to the right
if (childrenSize % 2 == 1 && i == 0) {
leftBranches += nodeBranches.get(child).getLeftBranches();
rightBranches += nodeBranches.get(child).getRightBranches();
} else if (i % 2 == 0) {
leftBranches += nodeBranches.get(child).getWidth() + 2;
} else {
rightBranches += nodeBranches.get(child).getWidth() + 2;
}
}
nodeBranches.put(node, new Branches(leftBranches, rightBranches));
}
private class Branches {
private final int leftBranches, rightBranches;
public Branches(int leftBranches, int rightBranches) {
this.leftBranches = leftBranches;
this.rightBranches = rightBranches;
}
public int getLeftBranches() {
return leftBranches;
}
public int getRightBranches() {
return rightBranches;
}
public int getWidth() {
return leftBranches + rightBranches;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Branches branches = (Branches) o;
return leftBranches == branches.leftBranches && rightBranches == branches.rightBranches;
}
@Override
public String toString() {
return "Branches{" +
"leftBranches=" + leftBranches +
", rightBranches=" + rightBranches +
'}';
}
@Override
public int hashCode() {
return Objects.hash(leftBranches, rightBranches);
}
}
}

View File

@ -0,0 +1,41 @@
package net.Indyuce.mmocore.tree.skilltree;
import net.Indyuce.mmocore.tree.ParentType;
import net.Indyuce.mmocore.tree.SkillTreeNode;
import org.bukkit.configuration.ConfigurationSection;
import org.jetbrains.annotations.NotNull;
public class CustomSkillTree extends SkillTree{
public CustomSkillTree(ConfigurationSection config) {
super(config);
//We setup the coordinate map because coordinates are given in the yml for linked skill tree
super.coordinatesSetup();
}
@Override
protected void whenPostLoaded(@NotNull ConfigurationSection config) {
//We setup the children and parents for each node.
for (SkillTreeNode node : nodes.values()) {
ConfigurationSection section = config.getConfigurationSection(node.getId() + ".children.soft");
if(section!=null) {
for (String child : section.getKeys(false)) {
node.addChild(getNode(child));
getNode(child).addParent(node, section.getInt(child), ParentType.SOFT);
}
}
section = config.getConfigurationSection(node.getId() + ".children.strong");
if(section!=null) {
for (String child : section.getKeys(false)) {
node.addChild(getNode(child));
getNode(child).addParent(node, section.getInt(child), ParentType.STRONG);
}
}
}
}
}

View File

@ -0,0 +1,154 @@
package net.Indyuce.mmocore.tree.skilltree;
import net.Indyuce.mmocore.api.player.PlayerData;
import net.Indyuce.mmocore.tree.IntegerCoordinates;
import net.Indyuce.mmocore.tree.NodeState;
import net.Indyuce.mmocore.tree.ParentType;
import net.Indyuce.mmocore.tree.SkillTreeNode;
import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.scheduler.BukkitTask;
import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
* For linked skillTrees there is no notion of children and parents you must have some neighbours unlocked in order to
* be unlockable. All the relationships in the tree are defined by the coordinates you nodes have.
*/
public class LinkedSkillTree extends SkillTree {
public LinkedSkillTree(ConfigurationSection config) {
super(config);
//We setup the coordinate map because coordinates are given in the yml for linked skill tree
coordinatesSetup();
}
@Override
protected void whenPostLoaded(@NotNull ConfigurationSection config) {
//We setup the children and parents if a node precise a required level for upgrade.
//If it is not filled the algorithm will put the required level to 1
for (SkillTreeNode node : nodes.values()) {
if (config.contains(node.getId() + ".children")) {
ConfigurationSection section = config.getConfigurationSection(node.getId() + ".children.soft");
if (section != null) {
for (String child : section.getKeys(false)) {
node.addChild(getNode(child));
getNode(child).addParent(node, section.getInt(child), ParentType.SOFT);
}
}
section = config.getConfigurationSection(node.getId() + ".children.strong");
if (section != null) {
for (String child : section.getKeys(false)) {
node.addChild(getNode(child));
getNode(child).addParent(node, section.getInt(child), ParentType.STRONG);
}
}
}
}
SkillTreeNode root = getNode(new IntegerCoordinates(0, 0));
Validate.notNull(root, "Their must be a node(the root of the tree) at the coordinates (0,0) ");
}
@Override
public void setupNodeStateFrom(SkillTreeNode node, PlayerData playerData) {
int x = node.getCoordinates().getX();
int y = node.getCoordinates().getY();
List<IntegerCoordinates> checkCoordinates = Arrays.asList(new IntegerCoordinates(x + 1, y),
new IntegerCoordinates(x - 1, y), new IntegerCoordinates(x, y + 1), new IntegerCoordinates(x, y - 1));
if (playerData.getNodeLevel(node) > 0) {
playerData.setNodeState(node, NodeState.UNLOCKED);
} else if (playerData.getNodeLevel(node) == 0 && node.isRoot()) {
playerData.setNodeState(node, NodeState.UNLOCKABLE);
} else {
boolean isUnlockable = false;
for (IntegerCoordinates coordinates : checkCoordinates) {
if (isNode(coordinates))
if (isNode(coordinates) && playerData.getNodeState(getNode(coordinates)) == NodeState.UNLOCKED && numberNeighbours(coordinates, playerData) <= getNode(coordinates).getMaxChildren())
isUnlockable = true;
}
if (isUnlockable)
playerData.setNodeState(node, NodeState.UNLOCKABLE);
else {
List<SkillTreeNode> parents = new ArrayList<>();
parents.add(node);
boolean isFullyLocked = isFullyLockedFrom(node, parents, playerData);
if (isFullyLocked)
playerData.setNodeState(node, NodeState.FULLY_LOCKED);
else
playerData.setNodeState(node, NodeState.LOCKED);
}
}
//We call the recursive algorithm on the rest of the points. Doesn't call the algorithm if already loaded.
for (IntegerCoordinates coordinates : checkCoordinates) {
if (isNode(coordinates) && !playerData.hasNodeState(getNode(coordinates)))
setupNodeStateFrom(getNode(coordinates), playerData);
}
}
//Counts the number of Unlocked Nieghbourgs of a node for a certain playerData
private int numberNeighbours(IntegerCoordinates coor, PlayerData playerData) {
int number = 0;
int x = coor.getX();
int y = coor.getY();
List<IntegerCoordinates> checkCoordinates = Arrays.asList(new IntegerCoordinates(x + 1, y),
new IntegerCoordinates(x - 1, y), new IntegerCoordinates(x, y + 1), new IntegerCoordinates(x, y - 1));
for (IntegerCoordinates coordinates : checkCoordinates) {
if (isNode(coordinates) && playerData.getNodeLevel(getNode(coordinates)) > 0)
number++;
}
return number;
}
/**
* A recursive algorithm to see if a node is fully locked or not in a linked skill tree
*/
public boolean isFullyLockedFrom(SkillTreeNode current, List<SkillTreeNode> parents, PlayerData playerData) {
if (!parents.contains(current) && (playerData.getNodeState(current) == NodeState.UNLOCKABLE || playerData.getNodeState(current) == NodeState.UNLOCKED)) {
//If the node is unlocked either we say it is not fully locked if a path can be found either wer return true is not path can be found down this way
if (numberNeighbours(current.getCoordinates(), playerData) <= getNode(current.getCoordinates()).getMaxChildren()) {
return false;
} else
return true;
}
//We verify that the node is unlocked or unlockable and can have links the first node
int x = current.getCoordinates().getX();
int y = current.getCoordinates().getY();
List<IntegerCoordinates> checkCoordinates = Arrays.asList(new IntegerCoordinates(x + 1, y),
new IntegerCoordinates(x - 1, y), new IntegerCoordinates(x, y + 1), new IntegerCoordinates(x, y - 1));
//We filter coordinates with only nodes that are not parents and not fully locked
//We also need to have the number of neighbour <=max-child(max-child=1 -> can have 1 neighbour but if it has 2 it will make the other branches fully blocked
checkCoordinates = checkCoordinates.stream().filter(coor -> isNode(coor)
&& playerData.getNodeState(getNode(coor)) != NodeState.FULLY_LOCKED
&& !parents.contains(getNode(coor))
).collect(Collectors.toList());
boolean isFullyLocked = true;
parents.add(current);
for (IntegerCoordinates coordinates : checkCoordinates) {
if (!isFullyLockedFrom(getNode(coordinates), parents, playerData)) {
isFullyLocked = false;
//Very important to break to stop the recursion algorithm once one unlockable point has been found
break;
}
}
return isFullyLocked;
}
}

View File

@ -0,0 +1,308 @@
package net.Indyuce.mmocore.tree.skilltree;
import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.UtilityMethods;
import io.lumine.mythic.lib.api.util.PostLoadObject;
import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.api.player.PlayerData;
import net.Indyuce.mmocore.api.util.MMOCoreUtils;
import net.Indyuce.mmocore.manager.registry.RegisteredObject;
import net.Indyuce.mmocore.tree.NodeState;
import net.Indyuce.mmocore.tree.skilltree.display.DisplayInfo;
import net.Indyuce.mmocore.tree.skilltree.display.Icon;
import net.Indyuce.mmocore.tree.IntegerCoordinates;
import net.Indyuce.mmocore.tree.SkillTreeNode;
import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.configuration.ConfigurationSection;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.*;
import java.util.logging.Level;
/**
* A passive skill tree that features nodes, or passive skills.
* <p>
* The player can explore the passive skill tree using the right GUI
* and unlock nodes by spending passive skill points. Unlocking nodes
* grant permanent player modifiers, including
* - stats
* - active or passive MythicLib skills
* - active or passive MMOCore skills
* - extra attribute pts
* - particle or potion effects
*
* @author jules
* @author Ka0rX
* @see {@link SkillTreeNode}
*/
public abstract class SkillTree extends PostLoadObject implements RegisteredObject {
private final String id, name;
private final List<String> lore = new ArrayList<>();
private final Material item;
//2 different maps to get the nodes
//Represents all the coordinates that will be displayed as a path (between 2 nodes of the tree)
protected final ArrayList<IntegerCoordinates> paths = new ArrayList<>();
//Represents all the nodes
protected final Map<IntegerCoordinates, SkillTreeNode> coordinatesNodes = new HashMap<>();
protected final Map<String, SkillTreeNode> nodes = new HashMap<>();
//Caches the height of the skill tree
protected int minX, minY, maxX, maxY;
protected final HashMap<DisplayInfo, Icon> icons = new HashMap<>();
protected final List<SkillTreeNode> roots = new ArrayList<>();
public SkillTree(ConfigurationSection config) {
super(config);
this.id = Objects.requireNonNull(config.getString("id"), "Could not find skill tree id");
this.name = MythicLib.plugin.parseColors(Objects.requireNonNull(config.getString("name"), "Could not find skill tree name"));
Objects.requireNonNull(config.getStringList("lore"), "Could not find skill tree lore").forEach(str -> lore.add(MythicLib.plugin.parseColors(str)));
this.item = Material.valueOf(UtilityMethods.enumName(Objects.requireNonNull(config.getString("item"))));
Validate.isTrue(config.isConfigurationSection("nodes"), "Could not find any nodes in the tree");
for (String key : config.getConfigurationSection("nodes").getKeys(false)) {
try {
SkillTreeNode node = new SkillTreeNode(this, config.getConfigurationSection("nodes." + key));
nodes.put(node.getId(), node);
} catch (Exception e) {
MMOCore.plugin.getLogger().log(Level.SEVERE, "Couldn't load skill tree node " + id + "." + key + ": " + e.getMessage());
}
}
try {
if (config.contains("paths")) {
ConfigurationSection section = config.getConfigurationSection("paths");
for (String key : section.getKeys(false)) {
if (section.contains(key + ".x") && section.contains(key + ".y")) {
paths.add(new IntegerCoordinates(section.getInt(key + ".x"), section.getInt(key + ".y")));
}
}
}
} catch (Exception e) {
Bukkit.getLogger().log(Level.WARNING, "Couldn't load paths for skill tree: " + id);
}
try {
//Load the icons of the skill tree.
for (String key : config.getConfigurationSection("icons").getKeys(false)) {
if (key.equalsIgnoreCase("path")) {
icons.put(DisplayInfo.pathInfo, new Icon(config.getConfigurationSection("icons." + key)));
continue;
}
for (String size : config.getConfigurationSection("icons." + key).getKeys(false)) {
DisplayInfo displayInfo = new DisplayInfo(NodeState.valueOf(UtilityMethods.enumName(key)), Integer.parseInt(size));
Icon icon = new Icon(config.getConfigurationSection("icons." + key + "." + size));
icons.put(displayInfo, icon);
}
}
} catch (Exception e) {
Bukkit.getLogger().log(Level.WARNING, "Couldn't load icons for the skill tree " + id);
e.printStackTrace();
}
}
/**
* Used to setup everything related to coordinates when each node has its coordinates loaded.
*/
public void coordinatesSetup() {
for (SkillTreeNode node : nodes.values()) {
coordinatesNodes.put(node.getCoordinates(), node);
if (node.isRoot())
roots.add(node);
}
}
@Override
protected abstract void whenPostLoaded(@NotNull ConfigurationSection configurationSection);
public Icon getIcon(DisplayInfo info) {
Validate.isTrue(icons.containsKey(info), "The icon corresponding to " + info + " doesn't exist for the skill tree " + id + ".");
return icons.get(info);
}
public int getMaxX() {
return maxX;
}
public int getMinX() {
return minX;
}
public int getMinY() {
return minY;
}
public int getMaxY() {
return maxY;
}
public List<String> getLore() {
return lore;
}
public static SkillTree loadSkillTree(ConfigurationSection config) {
SkillTree skillTree = null;
try {
String string = config.getString("type");
Validate.isTrue(string.equals("automatic") || string.equals("linked") || string.equals("custom"), "You must precise the type of the skill tree in the yml!" +
"\nAllowed values: 'automatic','linked','custom'");
if (string.equals("automatic")) {
skillTree = new AutomaticSkillTree(config);
skillTree.postLoad();
}
if (string.equals("linked")) {
skillTree = new LinkedSkillTree(config);
skillTree.postLoad();
}
if (string.equals("custom")) {
skillTree = new CustomSkillTree(config);
skillTree.postLoad();
}
} catch (Exception e) {
MMOCore.plugin.getLogger().log(Level.SEVERE, "Couldn't load skill tree " + config.getName() + ": " + e.getMessage());
}
return skillTree;
}
public void addRoot(SkillTreeNode node) {
roots.add(node);
}
/**
* Recursively go through the skill trees to update the the node states
*/
public void setupNodeState(PlayerData playerData) {
for (SkillTreeNode root : roots)
root.getTree().setupNodeStateFrom(root, playerData);
}
public List<SkillTreeNode> getRoots() {
return roots;
}
/**
* Update recursively the state of all the nodes that are children of this node (Used when we change the state of a node)
*/
public void setupNodeStateFrom(SkillTreeNode node, PlayerData playerData) {
if (playerData.getNodeLevel(node) > 0) {
playerData.setNodeState(node, NodeState.UNLOCKED);
} else if (playerData.getNodeLevel(node) == 0 && node.isRoot()) {
playerData.setNodeState(node, NodeState.UNLOCKABLE);
} else {
boolean isUnlockableFromStrongParent = node.getStrongParents().size() == 0 ? true : true;
boolean isUnlockableFromSoftParent = node.getSoftParents().size() == 0 ? true : false;
boolean isFullyLockedFromStrongParent = node.getStrongParents().size() == 0 ? false : false;
boolean isFullyLockedFromSoftParent = node.getSoftParents().size() == 0 ? false : true;
for (SkillTreeNode strongParent : node.getStrongParents()) {
if (playerData.getNodeLevel(strongParent) < node.getParentNeededLevel(strongParent)) {
isUnlockableFromStrongParent = false;
}
//We count the number of children the parent
int numberChildren = 0;
for (SkillTreeNode child : strongParent.getChildren())
if (playerData.getNodeLevel(child) > 0)
numberChildren++;
//We must check if the parent is Fully Locked or not and if it can unlock a new node(with its max children constraint)
if (numberChildren >= strongParent.getMaxChildren() || playerData.getNodeState(strongParent) == NodeState.FULLY_LOCKED)
isFullyLockedFromStrongParent = true;
}
for (SkillTreeNode softParent : node.getSoftParents()) {
if (playerData.getNodeLevel(softParent) > node.getParentNeededLevel(softParent)) {
isUnlockableFromSoftParent = true;
}
//We count the number of children the parent
int numberChildren = 0;
for (SkillTreeNode child : softParent.getChildren())
if (playerData.getNodeLevel(child) > 0)
numberChildren++;
if (numberChildren < softParent.getMaxChildren() && playerData.getNodeState(softParent) != NodeState.FULLY_LOCKED)
isFullyLockedFromSoftParent = false;
}
boolean isFullyLocked = isFullyLockedFromSoftParent || isFullyLockedFromStrongParent;
boolean isUnlockable = isUnlockableFromSoftParent && isUnlockableFromStrongParent;
if (isFullyLocked)
playerData.setNodeState(node, NodeState.FULLY_LOCKED);
else if (isUnlockable)
playerData.setNodeState(node, NodeState.UNLOCKABLE);
else
playerData.setNodeState(node, NodeState.LOCKED);
}
//We recursively call the algorithm for all the children of the current node
for (SkillTreeNode child : node.getChildren())
setupNodeStateFrom(child, playerData);
}
/**
* Returns null if it is not a node and returns the node type if it a node
*/
@Nullable
public boolean isNode(IntegerCoordinates coordinates) {
for (SkillTreeNode node : nodes.values()) {
if (node.getCoordinates().equals(coordinates))
return true;
}
return false;
}
public boolean isPath(IntegerCoordinates coordinates) {
return paths.contains(coordinates);
}
public Material getItem() {
return item;
}
@Override
public String getId() {
return id;
}
public String getName() {
return name;
}
public Collection<SkillTreeNode> getNodes() {
return nodes.values();
}
@NotNull
public SkillTreeNode getNode(IntegerCoordinates coords) {
return Objects.requireNonNull(coordinatesNodes.get(coords), "Could not find node in tree '" + id + "' with coordinates '" + coords.toString() + "'");
}
@NotNull
public SkillTreeNode getNode(String name) {
return Objects.requireNonNull(nodes.get(name), "Could not find node in tree '" + id + "' with name '" + name + "'");
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SkillTree skillTree = (SkillTree) o;
return id.equals(skillTree.id);
}
@Override
public int hashCode() {
return Objects.hash(id);
}
}

View File

@ -0,0 +1,7 @@
package net.Indyuce.mmocore.tree.skilltree;
public enum SkillTreeType {
AUTOMATIC_SKILL_TREE(),
LINKED_SKILL_TREE,
CUSTOM_SKILL_TREE;
}

View File

@ -0,0 +1,57 @@
package net.Indyuce.mmocore.tree.skilltree.display;
import net.Indyuce.mmocore.tree.NodeState;
import java.util.Objects;
/**
* The information needed to determine the display type of a node
*/
public class DisplayInfo {
private NodeState nodeState;
private int size;
//this NodeDisplayInfo represent a path
public static DisplayInfo pathInfo= new DisplayInfo();
public DisplayInfo() {
}
public DisplayInfo(NodeState nodeState, int size) {
this.nodeState = nodeState;
this.size = size;
}
public NodeState getNodeState() {
return nodeState;
}
public int getSize() {
return size;
}
@Override
public int hashCode() {
return Objects.hash(nodeState, size);
}
@Override
public boolean equals(Object obj) {
if(!(obj instanceof DisplayInfo))
return false;
DisplayInfo displayInfo= (DisplayInfo) obj;
if(nodeState==null)
return displayInfo.getNodeState()==null;
return nodeState==displayInfo.getNodeState()&&size==displayInfo.getSize();
}
@Override
public String toString() {
return "DisplayInfo{" +
"nodeState=" + nodeState +
", size=" + size +
'}';
}
}

View File

@ -0,0 +1,55 @@
package net.Indyuce.mmocore.tree.skilltree.display;
import io.lumine.mythic.lib.UtilityMethods;
import net.Indyuce.mmocore.api.util.MMOCoreUtils;
import org.bukkit.Material;
import org.bukkit.configuration.ConfigurationSection;
import java.util.Objects;
/**
* The material and custom model-data of a node
*/
public class Icon {
private final Material material;
private final int customModelData;
public Material getMaterial() {
return material;
}
public int getCustomModelData() {
return customModelData;
}
public Icon(ConfigurationSection config) {
this(Material.valueOf(Objects.requireNonNull(UtilityMethods.enumName(
config.getString("item")))),config.contains("model-data")?config.getInt("model-data"):0);
}
public Icon(Material material, int customModelData) {
this.material = material;
this.customModelData = customModelData;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Icon icon = (Icon) o;
return customModelData == icon.customModelData && material == icon.material;
}
@Override
public int hashCode() {
return Objects.hash(material, customModelData);
}
@Override
public String toString() {
return "Icon{" +
"material=" + material +
", customModelData=" + customModelData +
'}';
}
}

View File

@ -234,11 +234,6 @@ resource-bar-colors:
stamina-half: 'DARK_GREEN'
stamina-empty: 'WHITE'
# When set to true, attributes are saved and
# reset when a player changes their class.
# Not implemented yet.
# attributes-as-class-info: true
# Whether or not the admin commands should display
# the result of the command when ran.
# For Example: "Players Level is now 10."
@ -254,6 +249,7 @@ command-verbose:
experience: true
level: true
nocd: true
skill-tree-points: true
points: true
reset: true
resource: true

View File

@ -28,6 +28,9 @@ guild:
withdraw:
main: "withdraw"
aliases: ["w"]
skill-tree:
main: "skilltree"
aliase: ["st"]
deposit:
main: "deposit"
aliases: ["d"]

View File

@ -0,0 +1,25 @@
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

View File

@ -0,0 +1,33 @@
# GUI display name
name: '&eCurrent Skill Tree: &6{skill-tree-name}'
# Number of slots in your inventory. Must be
# between 9 and 54 and must be a multiple of 9.
slots: 54
items:
skill-tree:
name: '{skill-tree-node}'
function: skill-tree
slots: [9,18,27,36]
lore: 'Description: {skill-tree-description}'
next-tree-list-page:
function: 'next-tree-list-page'
item: ARROW
slots: [ 45 ]
previous-tree-list-page:
function: 'previous-tree-list-page'
item: 'ARROW'
slots: [ 0 ]
skill-tree-node:
function: 'skill-tree-node'
slots: [2,3,4,5,6,7,8,11,12,13,14,15,16,17,20,21,22,23,24,25,26,29,30,31,32,33,34,35,38,39,40,41,42,43,44]
#The lore that will be displayed after the lore of the node
lore:
- '&eCurrent {skill-tree} &epoints: &6{skill-tree-points}'
- '&eCurrent global points: &6{global-points}'

View File

@ -1,29 +1,30 @@
# Level & Experience
level-up:
- ''
- '&eCongratulations, you reached level &6{level}&e!'
- '&eUse &6/p &eto see your new statistics!'
- ''
- ''
- '&eCongratulations, you reached level &6{level}&e!'
- '&eUse &6/p &eto see your new statistics!'
- ''
profession-level-up:
- '&eYou are now level &6{level}&e in &6{profession}&e!'
- '&eYou are now level &6{level}&e in &6{profession}&e!'
exp-notification: '%&f{profession} &e{progress} &e{ratio}%'
exp-hologram: '&e+{exp} EXP!'
class-select: '&eYou are now a &6{class}&e!'
already-on-class: '&cYou are already a {class}.'
death-exp-loss:
- ''
- '&4You died and lost {loss} experience.'
- ''
- ''
- '&4You died and lost {loss} experience.'
- ''
# General
booster-main:
- '&e'
- '&eA &6{multiplier}x&e EXP multiplier is now active!'
- '&e'
- '&e'
- '&eA &6{multiplier}x&e EXP multiplier is now active!'
- '&e'
booster-skill:
- '&e'
- '&eA &6{multiplier}x&e &6{profession} &eEXP multiplier is now active!'
- '&e'
- '&e'
- '&eA &6{multiplier}x&e &6{profession} &eEXP multiplier is now active!'
- '&e'
booster-expired: '&cExpired!'
# Fishing Profession
@ -97,20 +98,20 @@ friend-request-cooldown: '&cPlease wait {cooldown}.'
cant-request-to-yourself: '&cYou can''t send a request to yourself.'
already-friends: '&cYou are already friends with {player}.'
friend-request:
- '{"text":""}'
- '{"text":"&6{player} &ejust sent you a friend request!"}'
- '[{"text":" ","hoverEvent":{}},{"text":"&8[&a&lACCEPT&8]","clickEvent":{"action":"run_command","value":"/friends accept {uuid}"},"hoverEvent":{"action":"show_text","value":"&eClick to accept!"}},{"text":"&r ","hoverEvent":{}},{"text":"&8[&c&lDENY&8]","clickEvent":{"action":"run_command","value":"/friends deny {uuid}"},"hoverEvent":{"action":"show_text","value":"&eClick to deny."}}]'
- '{"text":""}'
- '{"text":""}'
- '{"text":"&6{player} &ejust sent you a friend request!"}'
- '[{"text":" ","hoverEvent":{}},{"text":"&8[&a&lACCEPT&8]","clickEvent":{"action":"run_command","value":"/friends accept {uuid}"},"hoverEvent":{"action":"show_text","value":"&eClick to accept!"}},{"text":"&r ","hoverEvent":{}},{"text":"&8[&c&lDENY&8]","clickEvent":{"action":"run_command","value":"/friends deny {uuid}"},"hoverEvent":{"action":"show_text","value":"&eClick to deny."}}]'
- '{"text":""}'
# Parties
party-chat: '&5[Party] {player}: {message}'
sent-party-invite: '&eYou sent a party invite to &6{player}&e.'
already-in-party: '&c{player} is already in your party.'
party-invite:
- '{"text":""}'
- '{"text":"&6{player} &ehas invited you to their party!"}'
- '[{"text":" "},{"text":"&8[&a&lACCEPT&8]","clickEvent":{"action":"run_command","value":"/party accept {uuid}"},"hoverEvent":{"action":"show_text","value":"&eClick to accept!"}},{"text":"&r "},{"text":"&8[&c&lDENY&8]","clickEvent":{"action":"run_command","value":"/party deny {uuid}"},"hoverEvent":{"action":"show_text","value":"&eClick to deny."}}]'
- '{"text":""}'
- '{"text":""}'
- '{"text":"&6{player} &ehas invited you to their party!"}'
- '[{"text":" "},{"text":"&8[&a&lACCEPT&8]","clickEvent":{"action":"run_command","value":"/party accept {uuid}"},"hoverEvent":{"action":"show_text","value":"&eClick to accept!"}},{"text":"&r "},{"text":"&8[&c&lDENY&8]","clickEvent":{"action":"run_command","value":"/party deny {uuid}"},"hoverEvent":{"action":"show_text","value":"&eClick to deny."}}]'
- '{"text":""}'
party-is-full: '&cSorry, your party is full.'
party-joined: '&eYou successfully joined &6{owner}&e''s party.'
party-joined-other: '&6{player}&e joined your party!'
@ -124,10 +125,10 @@ guild-chat: '&a[{tag}] {player}: {message}'
sent-guild-invite: '&eYou sent a guild invite to &6{player}&e.'
already-in-guild: '&c{player} is already in your guild.'
guild-invite:
- '{"text":""}'
- '{"text":"&6{player} &ehas invited you to their guild!"}'
- '[{"text":" "},{"text":"&8[&a&lACCEPT&8]","clickEvent":{"action":"run_command","value":"/guild accept {uuid}"},"hoverEvent":{"action":"show_text","value":"&eClick to accept!"}},{"text":"&r "},{"text":"&8[&c&lDENY&8]","clickEvent":{"action":"run_command","value":"/guild deny {uuid}"},"hoverEvent":{"action":"show_text","value":"&eClick to deny."}}]'
- '{"text":""}'
- '{"text":""}'
- '{"text":"&6{player} &ehas invited you to their guild!"}'
- '[{"text":" "},{"text":"&8[&a&lACCEPT&8]","clickEvent":{"action":"run_command","value":"/guild accept {uuid}"},"hoverEvent":{"action":"show_text","value":"&eClick to accept!"}},{"text":"&r "},{"text":"&8[&c&lDENY&8]","clickEvent":{"action":"run_command","value":"/guild deny {uuid}"},"hoverEvent":{"action":"show_text","value":"&eClick to deny."}}]'
- '{"text":""}'
#guild-is-full: '&cSorry, your guild is full.' -Unused right now
guild-joined: '&eYou successfully joined &6{owner}&e''s guild.'
guild-joined-other: '&6{player}&e joined your guild!'
@ -150,9 +151,9 @@ quest-cooldown: '&cYou need to wait {delay}.'
start-quest: '&eYou successfully started &6{quest}&e.'
cant-choose-new-class:
- '&cYou need one class point to perform this action.'
- '&cYou need one class point to perform this action.'
no-permission-for-class:
- "&cYou don't have the permission to choose this class."
- "&cYou don't have the permission to choose this class."
# Attributes
no-attribute-points-spent: '&cYou have not spent any attribute points.'
not-attribute-reallocation-point: '&cYou do not have 1 reallocation point.'
@ -175,3 +176,12 @@ no-skill-placeholder: 'No Skill Bound'
not-skill-reallocation-point: '&cYou do not have 1 skill reallocation point.'
no-skill-points-spent: '&cYou have not spent any skill points.'
skill-points-reallocated: '&eYou successfully reset your attributes. You now have &6{points} &eskill points.'
# Skill Trees
no-skill-tree-points-spent: '&cYou have not spent any skill tree points.'
locked-node: '&cThis skill is locked!'
upgrade-skill-node: '&eYour skill node &6{skill-node} &eis now Level &6{level}&e!'
skill-node-max-level-hit: '&cYou already hit the max level for that skill node.'
not-enough-skill-tree-points: '&cYou need one skill tree point.'
reallocated-points: '&eYou successfully reset the skill tree {skill-tree}. &eYou now have &6{points} &eskill tree points.'
not-skill-tree-reallocation-point: '&cYou do not have 1 skill tree reallocation point.'

View File

@ -0,0 +1,143 @@
id: autocombat
name: AutoCombat
type: automatic
item: GOLDEN_AXE
lore:
- '&6This autoskill tree is used for combat abilities!'
nodes:
strength:
name: 'Combat strength'
children:
strong:
force: 2
max-level: 2
size: 1
lores:
unlocked:
1 :
- "&eYou are level 1"
2:
- "&eYou are level 2"
locked:
- "&4This skill is locked"
unlockable:
- "&aThis skill is unlockable"
fully-locked:
- '&aThis is skill is fully locked'
#modifers
force:
name: 'Force'
size: 1
max-children: 1
children:
strong:
weaponry: 1
archery: 1
lores:
unlocked:
1 :
- "&eYou are level 1"
2:
- "&eYou are level 2"
locked:
- "&4This skill is locked"
unlockable:
- "&aThis skill is unlockable"
fully-locked:
- '&aThis is skill is fully locked'
weaponry:
name: 'Weaponry'
max-level: 2
size: 1
lores:
unlocked:
1 :
- "&eYou are level 1"
2:
- "&eYou are level 2"
locked:
- "&4This skill is locked"
unlockable:
- "&aThis skill is unlockable"
fully-locked:
- '&aThis is skill is fully locked'
archery:
name: 'Archery'
max-level: 2
size: 1
children:
strong:
archery2: 2
lores:
unlocked:
1 :
- "&eYou are level 1"
2:
- "&eYou are level 2"
locked:
- "&4This skill is locked"
unlockable:
- "&aThis skill is unlockable"
fully-locked:
- '&aThis is skill is fully locked'
archery2:
name: 'Archery2'
max-level: 2
size: 1
children:
strong:
archery3: 1
lores:
unlocked:
1 :
- "&eYou are level 1"
2:
- "&eYou are level 2"
locked:
- "&4This skill is locked"
unlockable:
- "&aThis skill is unlockable"
fully-locked:
- '&aThis is skill is fully locked'
archery3:
name: 'Archery3'
max-level: 2
size: 1
lores:
unlocked:
1 :
- "&eYou are level 1"
2:
- "&eYou are level 2"
locked:
- "&4This skill is locked"
unlockable:
- "&aThis skill is unlockable"
fully-locked:
- '&aThis is skill is fully locked'
icons:
unlocked:
1:
item: 'GREEN_DYE'
locked:
1:
item: "BROWN_DYE"
unlockable:
1:
item: "BLUE_DYE"
fully-locked:
1:
item: "BLACK_DYE"
path:
item: "WHITE_DYE"

View File

@ -0,0 +1,152 @@
id: 'combat'
name: '&4Combat'
lore:
- '&6This skill tree is used for combat abilities!'
type: 'linked'
item: 'DIAMOND_AXE'
nodes:
strength:
name: 'Combat strength'
coordinates:
x: 0
y: 0
max-level: 2
is-root: true
size: 1
lores:
unlocked:
1 :
- "&eYou are level 1"
2:
- "&eYou are level 2"
locked:
- "&4This skill is locked"
unlockable:
- "&aThis skill is unlockable"
fully-locked:
- '&aThis is skill is fully locked'
#modifers
force:
name: 'Force'
size: 1
max-children: 1
coordinates:
x: 1
y: 0
lores:
unlocked:
1 :
- "&eYou are level 1"
2:
- "&eYou are level 2"
locked:
- "&4This skill is locked"
unlockable:
- "&aThis skill is unlockable"
fully-locked:
- '&aThis is skill is fully locked'
weaponry:
name: 'Weaponry'
coordinates:
x: 2
y: 0
max-level: 2
size: 1
lores:
unlocked:
1 :
- "&eYou are level 1"
2:
- "&eYou are level 2"
locked:
- "&4This skill is locked"
unlockable:
- "&aThis skill is unlockable"
fully-locked:
- '&aThis is skill is fully locked'
archery:
name: 'Archery'
coordinates:
x: 1
y: 1
max-level: 2
size: 1
lores:
unlocked:
1 :
- "&eYou are level 1"
2:
- "&eYou are level 2"
locked:
- "&4This skill is locked"
unlockable:
- "&aThis skill is unlockable"
fully-locked:
- '&aThis is skill is fully locked'
archery2:
name: 'Archery2'
coordinates:
x: 1
y: 2
max-level: 2
size: 1
lores:
unlocked:
1 :
- "&eYou are level 1"
2:
- "&eYou are level 2"
locked:
- "&4This skill is locked"
unlockable:
- "&aThis skill is unlockable"
fully-locked:
- '&aThis is skill is fully locked'
archery3:
name: 'Archery3'
coordinates:
x: 1
y: 3
max-level: 2
size: 1
lores:
unlocked:
1 :
- "&eYou are level 1"
2:
- "&eYou are level 2"
locked:
- "&4This skill is locked"
unlockable:
- "&aThis skill is unlockable"
fully-locked:
- '&aThis is skill is fully locked'
paths:
coordinates:
x: 2
y: 2
icons:
unlocked:
1:
item: 'GREEN_DYE'
locked:
1:
item: "BROWN_DYE"
unlockable:
1:
item: "BLUE_DYE"
fully-locked:
1:
item: "BLACK_DYE"
path:
item: "WHITE_DYE"

View File

@ -20,6 +20,11 @@ select-class: UI_TOAST_CHALLENGE_COMPLETE
level-attribute: ENTITY_PLAYER_LEVELUP
reset-attributes: ENTITY_PLAYER_LEVELUP
reset-skills: ENTITY_PLAYER_LEVELUP
level-skill-tree-node: ENTITY_PLAYER_LEVELUP
reset-skill-tree: ENTITY_PLAYER_LEVELUP
change-skill-tree: ITEM_ARMOR_EQUIP_LEATHER
not-enough-points: ENTITY_VILLAGER_NO
cancel-quest: ENTITY_VILLAGER_NO