Initial commit

This commit is contained in:
LBuddyBoy 2023-10-13 22:00:56 -05:00
commit 2713c781c0
8268 changed files with 436755 additions and 0 deletions

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto

422
.idea/$CACHE_FILE$ Normal file
View File

@ -0,0 +1,422 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
<profile-state>
<expanded-state>
<State />
<State>
<id>AOP</id>
</State>
<State>
<id>Abstraction issuesJava</id>
</State>
<State>
<id>ActionScript specificJavaScript and TypeScript</id>
</State>
<State>
<id>Android</id>
</State>
<State>
<id>Angular</id>
</State>
<State>
<id>Ant</id>
</State>
<State>
<id>ArquillianJava</id>
</State>
<State>
<id>Assignment issuesGroovy</id>
</State>
<State>
<id>Assignment issuesJava</id>
</State>
<State>
<id>Assignment issuesJavaScript and TypeScript</id>
</State>
<State>
<id>Async code and promisesJavaScript and TypeScript</id>
</State>
<State>
<id>Batch Applications</id>
</State>
<State>
<id>Bidirectional TextInternationalizationLintAndroid</id>
</State>
<State>
<id>Bitwise operation issuesJavaScript and TypeScript</id>
</State>
<State>
<id>CDI (Contexts and Dependency Injection)</id>
</State>
<State>
<id>Class structureJava</id>
</State>
<State>
<id>Cloning issuesJava</id>
</State>
<State>
<id>Code maturityJava</id>
</State>
<State>
<id>Code quality toolsJavaScript and TypeScript</id>
</State>
<State>
<id>Code style issuesJava</id>
</State>
<State>
<id>Code style issuesJavaScript and TypeScript</id>
</State>
<State>
<id>CodePlugin DevKit</id>
</State>
<State>
<id>CodeSpring CoreSpring</id>
</State>
<State>
<id>Control flow issuesJava</id>
</State>
<State>
<id>Control flow issuesJavaScript and TypeScript</id>
</State>
<State>
<id>CorrectnessLintAndroid</id>
</State>
<State>
<id>DOM issuesJavaScript and TypeScript</id>
</State>
<State>
<id>Data flowGroovy</id>
</State>
<State>
<id>Data flowJava</id>
</State>
<State>
<id>Data flowJavaScript and TypeScript</id>
</State>
<State>
<id>Declaration redundancyJava</id>
</State>
<State>
<id>ECMAScript 6 migration aidsJavaScript and TypeScript</id>
</State>
<State>
<id>EditorConfig</id>
</State>
<State>
<id>EmbeddedPerformanceJava</id>
</State>
<State>
<id>EncapsulationJava</id>
</State>
<State>
<id>Error handlingJava</id>
</State>
<State>
<id>Flow type checkerJavaScript and TypeScript</id>
</State>
<State>
<id>FreeMarker</id>
</State>
<State>
<id>Function metricsJavaScript and TypeScript</id>
</State>
<State>
<id>GeneralJavaScript and TypeScript</id>
</State>
<State>
<id>Google Web Toolkit</id>
</State>
<State>
<id>Groovy</id>
</State>
<State>
<id>Guice</id>
</State>
<State>
<id>HTML</id>
</State>
<State>
<id>IconsUsabilityLintAndroid</id>
</State>
<State>
<id>Imports and dependenciesJavaScript and TypeScript</id>
</State>
<State>
<id>Inheritance issuesJava</id>
</State>
<State>
<id>Internationalization</id>
</State>
<State>
<id>InternationalizationLintAndroid</id>
</State>
<State>
<id>InteroperabilityLintAndroid</id>
</State>
<State>
<id>JBoss Seam</id>
</State>
<State>
<id>JPA</id>
</State>
<State>
<id>JSP</id>
</State>
<State>
<id>JUnitJava</id>
</State>
<State>
<id>JVM languages</id>
</State>
<State>
<id>Java</id>
</State>
<State>
<id>Java 10Java language level migration aidsJava</id>
</State>
<State>
<id>Java 5Java language level migration aidsJava</id>
</State>
<State>
<id>Java 7Java language level migration aidsJava</id>
</State>
<State>
<id>Java 8Java language level migration aidsJava</id>
</State>
<State>
<id>Java EE</id>
</State>
<State>
<id>Java interop issuesKotlin</id>
</State>
<State>
<id>Java language level issuesJava</id>
</State>
<State>
<id>Java language level migration aidsJava</id>
</State>
<State>
<id>JavaFX</id>
</State>
<State>
<id>JavaScript and TypeScript</id>
</State>
<State>
<id>Kotlin</id>
</State>
<State>
<id>Kotlin Android</id>
</State>
<State>
<id>Kotlin InteroperabilityInteroperabilityLintAndroid</id>
</State>
<State>
<id>Language injection</id>
</State>
<State>
<id>LintAndroid</id>
</State>
<State>
<id>LintLintAndroid</id>
</State>
<State>
<id>LoggingJava</id>
</State>
<State>
<id>MemoryJava</id>
</State>
<State>
<id>MessagesCorrectnessLintAndroid</id>
</State>
<State>
<id>Method metricsJava</id>
</State>
<State>
<id>Micronaut</id>
</State>
<State>
<id>Naming conventionsGroovy</id>
</State>
<State>
<id>Naming conventionsJava</id>
</State>
<State>
<id>Naming conventionsJavaScript and TypeScript</id>
</State>
<State>
<id>Node.jsJavaScript and TypeScript</id>
</State>
<State>
<id>Nullability problemsProbable bugsJava</id>
</State>
<State>
<id>Numeric issuesJava</id>
</State>
<State>
<id>Other problemsKotlin</id>
</State>
<State>
<id>OtherGroovy</id>
</State>
<State>
<id>Pattern validation</id>
</State>
<State>
<id>PerformanceJava</id>
</State>
<State>
<id>PerformanceLintAndroid</id>
</State>
<State>
<id>Plugin DevKit</id>
</State>
<State>
<id>PortabilityJava</id>
</State>
<State>
<id>Potentially confusing code constructsGroovy</id>
</State>
<State>
<id>Potentially confusing code constructsJavaScript and TypeScript</id>
</State>
<State>
<id>Potentially undesirable code constructsJavaScript and TypeScript</id>
</State>
<State>
<id>Probable bugsGroovy</id>
</State>
<State>
<id>Probable bugsJava</id>
</State>
<State>
<id>Probable bugsJavaScript and TypeScript</id>
</State>
<State>
<id>Probable bugsKotlin</id>
</State>
<State>
<id>Proofreading</id>
</State>
<State>
<id>Quarkus</id>
</State>
<State>
<id>RESTful Web Service (JAX-RS)</id>
</State>
<State>
<id>Reactive Streams</id>
</State>
<State>
<id>ReactorReactive Streams</id>
</State>
<State>
<id>Redundant constructsKotlin</id>
</State>
<State>
<id>Reflective accessJava</id>
</State>
<State>
<id>SQL</id>
</State>
<State>
<id>Serialization issuesJava</id>
</State>
<State>
<id>Sponge</id>
</State>
<State>
<id>Spring</id>
</State>
<State>
<id>Spring AOPSpring</id>
</State>
<State>
<id>Spring CoreSpring</id>
</State>
<State>
<id>Spring DataSpring</id>
</State>
<State>
<id>Spring MVCSpring</id>
</State>
<State>
<id>Spring Web FlowSpring</id>
</State>
<State>
<id>Style issuesKotlin</id>
</State>
<State>
<id>StyleGroovy</id>
</State>
<State>
<id>Switch statement issuesJavaScript and TypeScript</id>
</State>
<State>
<id>TestNGJava</id>
</State>
<State>
<id>Threading issuesGroovy</id>
</State>
<State>
<id>Threading issuesJava</id>
</State>
<State>
<id>Try statement issuesJavaScript and TypeScript</id>
</State>
<State>
<id>TypeScriptJavaScript and TypeScript</id>
</State>
<State>
<id>TypographyUsabilityLintAndroid</id>
</State>
<State>
<id>UI form</id>
</State>
<State>
<id>Unit testingJavaScript and TypeScript</id>
</State>
<State>
<id>Unused symbolsJavaScript and TypeScript</id>
</State>
<State>
<id>UsabilityLintAndroid</id>
</State>
<State>
<id>Validity issuesJavaScript and TypeScript</id>
</State>
<State>
<id>Velocity</id>
</State>
<State>
<id>Verbose or redundant code constructsJava</id>
</State>
<State>
<id>VisibilityJava</id>
</State>
<State>
<id>Web Services</id>
</State>
<State>
<id>WebSocket</id>
</State>
<State>
<id>XML</id>
</State>
<State>
<id>XMLSpring CoreSpring</id>
</State>
<State>
<id>XPath</id>
</State>
</expanded-state>
<selected-state>
<State>
<id>FormSpellChecking</id>
</State>
</selected-state>
</profile-state>
</entry>
</component>
</project>

8
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

102
.idea/compiler.xml Normal file
View File

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="BUILD_PROCESS_HEAP_SIZE" value="1500" />
<annotationProcessing>
<profile default="true" name="Default" enabled="true" />
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="lQueue (1)" />
<module name="lStaff" />
<module name="lSpoof" />
<module name="Flash-Bukkit" />
<module name="lGKits" />
<module name="lQueue-Bukkit" />
<module name="lQueue-Distributed" />
<module name="lLib-Bukkit" />
<module name="lSyncBot" />
<module name="lHub" />
<module name="lMOTD-Velocity" />
<module name="Flash-Bungee" />
<module name="lQueue-API" />
</profile>
<profile name="Annotation profile for lCrates" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<processorPath useClasspath="false">
<entry name="$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.22/lombok-1.18.22.jar" />
</processorPath>
<module name="lCrates" />
</profile>
<profile name="Annotation profile for lVouchers" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<processorPath useClasspath="false">
<entry name="$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.22/lombok-1.18.22.jar" />
</processorPath>
<module name="lVouchers" />
</profile>
<profile name="Annotation profile for LBuddyBoy-Development" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<processorPath useClasspath="false">
<entry name="$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.20/lombok-1.18.20.jar" />
</processorPath>
<module name="lSpoof-Velocity" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
<module name="AuraKnockback" target="1.5" />
<module name="BuddyLibs" target="1.8" />
<module name="Flash" target="1.8" />
<module name="Flash (1)" target="1.8" />
<module name="Flash (1) (dev.lbuddyboy)" target="1.8" />
<module name="Flash (2)" target="1.8" />
<module name="Flash (2) (dev.lbuddyboy.flash)" target="1.5" />
<module name="Flash-API" target="1.8" />
<module name="Flash-Bukkit (1)" target="1.8" />
<module name="KitPvP" target="1.8" />
<module name="Knockback" target="1.5" />
<module name="lAvatar" target="8" />
<module name="lAvatar (1)" target="8" />
<module name="lAvatar (2)" target="8" />
<module name="LBuddyBoy Development" target="1.5" />
<module name="lCore" target="1.8" />
<module name="lCore-Premium" target="1.8" />
<module name="lCoreAPI" target="8" />
<module name="lLib-API (1)" target="1.8" />
<module name="lLib-Bukkit (1)" target="1.8" />
<module name="lMOTD-Velocity (1)" target="11" />
<module name="lPearls" target="1.8" />
<module name="lQueue" target="1.8" />
<module name="lQueue (1)" target="1.5" />
<module name="lVouchers (1)" target="16" />
<module name="oStaff" target="1.8" />
<module name="potpvp-si" target="1.8" />
<module name="xPearls-NMS" target="8" />
</bytecodeTargetLevel>
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="BuddyLibs" options="-parameters" />
<module name="Flash" options="-parameters" />
<module name="Flash (1)" options="-parameters" />
<module name="Flash (1) (dev.lbuddyboy)" options="-parameters" />
<module name="Flash (2)" options="-parameters" />
<module name="Flash-API" options="-parameters" />
<module name="Flash-Bukkit" options="-parameters" />
<module name="Flash-Bukkit (1)" options="-parameters" />
<module name="Flash-Bungee" options="" />
<module name="lCore" options="-parameters" />
<module name="lCore-Premium" options="-parameters" />
<module name="lHub" options="" />
<module name="lQueue-API" options="-parameters" />
<module name="lQueue-Distributed" options="" />
</option>
</component>
</project>

12
.idea/dataSources.xml Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="@localhost" uuid="44d3697f-b3af-4501-9c3f-c53a9660ff7b">
<driver-ref>mongo</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>com.dbschema.MongoJdbcDriver</jdbc-driver>
<jdbc-url>mongodb://localhost:27017</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>
</project>

7
.idea/discord.xml Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="ASK" />
<option name="description" value="" />
</component>
</project>

42
.idea/encodings.xml Normal file
View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/Flash/Flash-API/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/Flash/Flash-API/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/Flash/Flash-Bukkit/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/Flash/Flash-Bukkit/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/Flash/Flash-Bungee/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/Flash/Flash-Bungee/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/Flash/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/Flash/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lCrates/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lCrates/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lGKits/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lGKits/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lKitPvP/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lKitPvP/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lLib-Development/lLib-API/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lLib-Development/lLib-API/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lLib-Development/lLib-Bukkit/lLib-Bukkit/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lLib-Development/lLib-Bukkit/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lLib-Development/lLib-Bukkit/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lMOTD-Development/lMOTD-Velocity/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lMOTD-Development/lMOTD-Velocity/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lQueue-Development/lQueue-API/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lQueue-Development/lQueue-API/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lQueue-Development/lQueue-Bukkit/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lQueue-Development/lQueue-Bukkit/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lQueue-Development/lQueue-Distributed/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lQueue-Development/lQueue-Distributed/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lQueue-Development/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lQueue-Development/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lSpoof-Velocity/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lSpoof-Velocity/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lStaff/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lStaff/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lSyncBot/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lSyncBot/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lVouchers/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/lVouchers/src/main/resources" charset="UTF-8" />
</component>
</project>

View File

@ -0,0 +1,8 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="AutoCloseableResource" enabled="true" level="WARNING" enabled_by_default="true">
<option name="METHOD_MATCHER_CONFIG" value="java.util.Formatter,format,java.io.Writer,append,com.google.common.base.Preconditions,checkNotNull,org.hibernate.Session,close,java.io.PrintWriter,printf,java.io.PrintStream,printf,dev.lbuddyboy.queue.util.redis.Redis,requestJedis,java.lang.ClassLoader,getResourceAsStream,net.dv8tion.jda.api.utils.FileUpload,fromData" />
</inspection_tool>
</profile>
</component>

75
.idea/jarRepositories.xml Normal file
View File

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="vault-repo" />
<option name="name" value="vault-repo" />
<option name="url" value="http://nexus.hc.to/content/repositories/pub_releases" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jitpack.io" />
<option name="name" value="jitpack.io" />
<option name="url" value="https://jitpack.io" />
</remote-repository>
<remote-repository>
<option name="id" value="sonatype" />
<option name="name" value="sonatype" />
<option name="url" value="https://oss.sonatype.org/content/groups/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="codemc-repo" />
<option name="name" value="codemc-repo" />
<option name="url" value="https://repo.codemc.io/repository/maven-public/" />
</remote-repository>
<remote-repository>
<option name="id" value="papermc-repo" />
<option name="name" value="papermc-repo" />
<option name="url" value="https://repo.papermc.io/repository/maven-public/" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jcenter" />
<option name="name" value="jcenter-bintray" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="sk89q-repo" />
<option name="name" value="sk89q-repo" />
<option name="url" value="https://maven.sk89q.com/repo" />
</remote-repository>
<remote-repository>
<option name="id" value="viaversion-repo" />
<option name="name" value="viaversion-repo" />
<option name="url" value="https://repo.viaversion.com" />
</remote-repository>
<remote-repository>
<option name="id" value="spigot-repo" />
<option name="name" value="spigot-repo" />
<option name="url" value="https://hub.spigotmc.org/nexus/content/repositories/snapshots/" />
</remote-repository>
<remote-repository>
<option name="id" value="spigotmc-repo" />
<option name="name" value="spigotmc-repo" />
<option name="url" value="https://hub.spigotmc.org/nexus/content/repositories/snapshots/" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="velocity" />
<option name="name" value="velocity" />
<option name="url" value="https://nexus.velocitypowered.com/repository/maven-public/" />
</remote-repository>
</component>
</project>

36
.idea/misc.xml Normal file
View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.bukkit.event.EventHandler" />
<item index="1" class="java.lang.String" itemvalue="com.velocitypowered.api.event.Subscribe" />
<item index="2" class="java.lang.String" itemvalue="com.velocitypowered.api.plugin.Plugin" />
<item index="3" class="java.lang.String" itemvalue="net.md_5.bungee.event.EventHandler" />
</list>
</component>
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/Daniele-potpvp/pom.xml" />
<option value="$PROJECT_DIR$/lQueue/lQueue-Bukkit/pom.xml" />
<option value="$PROJECT_DIR$/lMOTD/pom.xml" />
<option value="$PROJECT_DIR$/lMOTD-Development/pom.xml" />
<option value="$PROJECT_DIR$/lMOTD-Development/lMOTD-Velocity/pom.xml" />
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
<option name="ignoredFiles">
<set>
<option value="$PROJECT_DIR$/Flash/Flash-API/pom.xml" />
<option value="$PROJECT_DIR$/lAvatar/pom.xml" />
<option value="$PROJECT_DIR$/lCoreAPI/pom.xml" />
<option value="$PROJECT_DIR$/lLib-Development/lLib-API/pom.xml" />
</set>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
</project>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SaveActionSettings">
<option name="actions">
<set>
<option value="activate" />
<option value="organizeImports" />
<option value="reload" />
<option value="missingOverrideAnnotation" />
<option value="finalPrivateMethod" />
<option value="explicitTypeCanBeDiamond" />
<option value="suppressAnnotation" />
<option value="unnecessarySemicolon" />
</set>
</option>
<option name="configurationPath" value="" />
</component>
</project>

124
.idea/uiDesigner.xml Normal file
View File

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/Flash" vcs="Git" />
</component>
</project>

3
Bunkers/.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="BunkersHub" />
<module name="BunkersCommunicator" />
</profile>
<profile name="Annotation profile for Bunkers" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<processorPath useClasspath="false">
<entry name="$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.20/lombok-1.18.20.jar" />
</processorPath>
<module name="SteelBunkers" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
<module name="lHub" target="1.8" />
<module name="XenlanHub" target="1.8" />
</bytecodeTargetLevel>
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="BunkersCommunicator" options="-parameters" />
</option>
</component>
</project>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/BunkersCommunicator/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/BunkersCommunicator/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/BunkersHub/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/BunkersHub/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/SteelBunkers/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/SteelBunkers/src/main/resources" charset="UTF-8" />
</component>
</project>

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="viaversion-repo" />
<option name="name" value="viaversion-repo" />
<option name="url" value="https://repo.viaversion.com" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="aikar" />
<option name="name" value="aikar" />
<option name="url" value="https://repo.aikar.co/content/groups/aikar/" />
</remote-repository>
<remote-repository>
<option name="id" value="ajRepo" />
<option name="name" value="ajRepo" />
<option name="url" value="https://repo.ajg0702.us/releases" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>

22
Bunkers/.idea/misc.xml Normal file
View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<list size="1">
<item index="0" class="java.lang.String" itemvalue="org.bukkit.event.EventHandler" />
</list>
</component>
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
<option name="ignoredFiles">
<set>
<option value="$PROJECT_DIR$/Bunkers-Hub/pom.xml" />
</set>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK" />
</project>

View File

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

18
Bunkers/Bunkers.iml Normal file
View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.18.10" level="project" />
<orderEntry type="library" name="Maven: redis.clients:jedis:3.3.0" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.6.2" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-simple:1.7.30" level="project" />
</component>
</module>

View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="BUILD_PROCESS_HEAP_SIZE" value="1500" />
<annotationProcessing>
<profile default="true" name="Default" enabled="true" />
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="BunkersCommunicator" />
</profile>
</annotationProcessing>
</component>
</project>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="ASK" />
<option name="description" value="" />
</component>
</project>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CodeInsightWorkspaceSettings">
<option name="optimizeImportsOnTheFly" value="true" />
</component>
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_14" default="true" project-jdk-name="14 (2)" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
</set>
</option>
</component>
</project>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SaveActionSettings">
<option name="actions">
<set>
<option value="activate" />
<option value="organizeImports" />
<option value="reload" />
<option value="missingOverrideAnnotation" />
<option value="finalPrivateMethod" />
<option value="explicitTypeCanBeDiamond" />
<option value="suppressAnnotation" />
<option value="unnecessarySemicolon" />
</set>
</option>
<option name="configurationPath" value="" />
</component>
</project>

View File

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="FacetManager">
<facet type="minecraft" name="Minecraft">
<configuration>
<autoDetectTypes>
<platformType>SPIGOT</platformType>
</autoDetectTypes>
</configuration>
</facet>
</component>
<component name="McpModuleSettings">
<option name="srgType" value="SRG" />
</component>
</module>

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>Bunkers</artifactId>
<groupId>dev.lbuddyboy</groupId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.steelpvp</groupId>
<artifactId>BunkersCommunicator</artifactId>
<version>1.0</version>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
<compilerArgument>-parameters</compilerArgument>
</configuration>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
</project>

View File

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>Bunkers</artifactId>
<groupId>dev.lbuddyboy</groupId>
<version>1.0</version>
</parent>
<groupId>com.steelpvp</groupId>
<artifactId>BunkersCommunicator</artifactId>
<version>1.0</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
<compilerArgument>-parameters</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19.4-R0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>3.12.10</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.26</version>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>23.0.0</version>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.9.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,40 @@
package dev.lbuddyboy.communicate;
import dev.lbuddyboy.communicate.database.mongo.MongoHandler;
import dev.lbuddyboy.communicate.database.redis.RedisHandler;
import dev.lbuddyboy.communicate.profile.ProfileHandler;
import lombok.Getter;
import lombok.Setter;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.ArrayList;
import java.util.List;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 14/04/2022 / 4:16 PM
* BunkersCommunicator / PACKAGE_NAME
*/
@Getter
public class BunkersCom extends JavaPlugin {
@Getter private static BunkersCom instance;
@Setter private List<BunkersGame> bunkersGames;
private MongoHandler mongoHandler;
private RedisHandler redisHandler;
private ProfileHandler profileHandler;
@Override
public void onEnable() {
instance = this;
this.saveDefaultConfig();
this.bunkersGames = new ArrayList<>();
this.mongoHandler = new MongoHandler();
this.redisHandler = new RedisHandler(this);
this.profileHandler = new ProfileHandler();
}
}

View File

@ -0,0 +1,27 @@
package dev.lbuddyboy.communicate;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.util.List;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 14/04/2022 / 4:21 PM
* BunkersCommunicator / dev.lbuddyboy.communicate.database
*/
@AllArgsConstructor
@Data
public class BunkersGame {
private String name;
private int playersLeft;
private long startedAt;
private List<Team> teams;
private boolean ended;
private boolean kothActivated;
private int kothTime;
private GameState gameState;
}

View File

@ -0,0 +1,49 @@
package dev.lbuddyboy.communicate;
import com.google.gson.JsonObject;
import lombok.Data;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 14/04/2022 / 9:20 PM
* BunkersCommunicator / dev.lbuddyboy.communicate
*/
@Data
public class FinalGame {
private String server;
private String winner;
private String team;
private int kills, deaths;
private long startedAt, endedAt;
public JsonObject serialize() {
JsonObject object = new JsonObject();
object.addProperty("server", this.server);
object.addProperty("winner", this.winner);
object.addProperty("team", this.team);
object.addProperty("kills", this.kills);
object.addProperty("deaths", this.deaths);
object.addProperty("startedAt", this.startedAt);
object.addProperty("endedAt", this.endedAt);
return object;
}
public static FinalGame deserialize(JsonObject object) {
FinalGame finalGame = new FinalGame();
finalGame.setServer(object.get("server").getAsString());
finalGame.setWinner(object.get("winner").getAsString());
finalGame.setTeam(object.get("team").getAsString());
finalGame.setKills(object.get("kills").getAsInt());
finalGame.setDeaths(object.get("deaths").getAsInt());
finalGame.setStartedAt(object.get("startedAt").getAsLong());
finalGame.setEndedAt(object.get("endedAt").getAsLong());
return finalGame;
}
}

View File

@ -0,0 +1,7 @@
package dev.lbuddyboy.communicate;
public enum GameState {
WAITING, COUNTING, STARTING, ACTIVE, ENDING, ENDED
}

View File

@ -0,0 +1,52 @@
package dev.lbuddyboy.communicate;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.bukkit.ChatColor;
import java.text.DecimalFormat;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 19/03/2022 / 7:09 PM
* SteelBunkers / com.steelpvp.bunkers.team
*/
@Data
@AllArgsConstructor
public class Team {
private final ChatColor color;
private final int maxDTR;
private double dtr;
public String getDisplay() {
return this.color + ChatColor.BOLD.toString() + getName();
}
public String getName() {
if (color == ChatColor.RED) {
return "ʀᴇᴅ";
}
if (color == ChatColor.YELLOW) {
return "ʏᴇʟʟᴏᴡ";
}
if (color == ChatColor.GREEN) {
return "ɢʀᴇᴇɴ";
}
if (color == ChatColor.BLUE) {
return "ʙʟᴜᴇ";
}
return "ᴄᴇɴᴛʀᴀʟ";
}
public String getDTRFormatted() {
return new DecimalFormat("0.0").format(this.dtr);
}
public boolean isRaidable() {
return this.dtr < 0;
}
}

View File

@ -0,0 +1,77 @@
package dev.lbuddyboy.communicate.database.mongo;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.mongodb.*;
import com.mongodb.client.MongoClients;
import com.mongodb.client.MongoDatabase;
import dev.lbuddyboy.communicate.BunkersCom;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration;
import java.lang.reflect.Type;
import java.util.List;
import java.util.UUID;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 07/09/2021 / 4:39 PM
* lCore / me.lbuddyboy.core.dev.lbuddyboy.communicate.database
*/
@Getter
public class MongoHandler {
private MongoClient mongoClient;
private com.mongodb.client.MongoClient mongoClientURI;
private MongoDatabase mongoDatabase;
private final Gson GSON = new Gson();
private final Type LIST_STRING_TYPE = new TypeToken<List<String>>() {}.getType();
private final Type LIST_UUID_TYPE = new TypeToken<List<UUID>>() {}.getType();
public MongoHandler() {
// if (!InventoryCache.init()) return;
FileConfiguration config = BunkersCom.getInstance().getConfig();
if (config.getBoolean("mongo.use-uri")) {
String username = config.getString("mongo.auth.username");
String password = config.getString("mongo.auth.password");
String database = config.getString("mongo.database");
String host = config.getString("mongo.host");
int port = config.getInt("mongo.port");
ConnectionString connectionString = new ConnectionString("mongodb://" + username + ":" + password + "@" + host + ":" + port + "/" + database + "?authSource=admin");
MongoClientSettings settings = MongoClientSettings.builder()
.applyConnectionString(connectionString)
.build();
this.mongoClientURI = MongoClients.create(settings);
this.mongoDatabase = mongoClientURI.getDatabase(database);
return;
}
boolean auth = config.getBoolean("mongo.auth.enabled");
String username = config.getString("mongo.auth.username");
String password = config.getString("mongo.auth.password");
String database = config.getString("mongo.database");
String host = config.getString("mongo.host");
int port = config.getInt("mongo.port");
if (!auth) {
mongoClient = new MongoClient(host, port);
} else {
mongoClient = new MongoClient(new ServerAddress(host, port), MongoCredential.createCredential(username, database, password.toCharArray()),
MongoClientOptions.builder().build());
}
mongoDatabase = this.mongoClient.getDatabase(database);
Bukkit.getConsoleSender().sendMessage("Successfully connected the Mongo Database");
}
}

View File

@ -0,0 +1,19 @@
package dev.lbuddyboy.communicate.database.redis;
import dev.lbuddyboy.communicate.BunkersCom;
public interface JedisPacket {
default BunkersCom getPlugin() {
return BunkersCom.getInstance();
}
void onReceive();
String getID();
default void send() {
getPlugin().getRedisHandler().sendToAll(this);
}
}

View File

@ -0,0 +1,8 @@
package dev.lbuddyboy.communicate.database.redis;
import redis.clients.jedis.Jedis;
public interface RedisCommand<T> {
T execute(Jedis var1);
}

View File

@ -0,0 +1,108 @@
package dev.lbuddyboy.communicate.database.redis;
import com.google.gson.Gson;
import dev.lbuddyboy.communicate.BunkersCom;
import dev.lbuddyboy.communicate.database.redis.sub.JedisSubscriber;
import lombok.Getter;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 07/09/2021 / 2:44 PM
* BuddyLibs / me.lbuddyboy.core.dev.lbuddyboy.communicate.database.redis
*/
@Getter
public class RedisHandler {
@Getter private static final Gson GSON = new Gson();
private static BunkersCom instance;
public RedisHandler(BunkersCom instance) {
RedisHandler.instance = instance;
connect();
}
private static final String GLOBAL_MESSAGE_CHANNEL = "JedisPacket:All";
static final String PACKET_MESSAGE_DIVIDER = "||";
public static void connect() {
JedisPool connectTo = new JedisPool(new JedisPoolConfig(),
instance.getConfig().getString("redis.host"), instance.getConfig().getInt("redis.port"), 20000,
(instance.getConfig().getString("redis.auth.password").isEmpty() ? null : instance.getConfig().getString("redis.auth.password")),
instance.getConfig().getInt("redis.channel-id", 0));
Thread subscribeThread = new Thread(() -> {
while (true) {
try {
Jedis jedis = connectTo.getResource();
Throwable throwable = null;
try {
JedisSubscriber pubSub = new JedisSubscriber();
jedis.subscribe(pubSub, GLOBAL_MESSAGE_CHANNEL);
} catch (Throwable pubSub) {
throwable = pubSub;
throw pubSub;
} finally {
if (jedis == null) continue;
if (throwable != null) {
try {
jedis.close();
} catch (Throwable pubSub) {
throwable.addSuppressed(pubSub);
}
continue;
}
jedis.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
}, "lCore - Packet Subscribe Thread");
subscribeThread.setDaemon(true);
subscribeThread.start();
}
public void sendToAll(JedisPacket packet) {
JedisPool jedisPool = new JedisPool(new JedisPoolConfig(),
instance.getConfig().getString("redis.host"), instance.getConfig().getInt("redis.port"), 20000,
(instance.getConfig().getString("redis.auth.password").isEmpty() ? null : instance.getConfig().getString("redis.auth.password")),
instance.getConfig().getInt("redis.channel-id", 0));
new Thread(() -> {
try (Jedis jedis = jedisPool.getResource()) {
String encodedPacket = packet.getClass().getName() + "||" + GSON.toJson(packet);
jedis.publish(GLOBAL_MESSAGE_CHANNEL, encodedPacket);
}
}).start();
}
public static <T> T runRedisCommand(RedisCommand<T> redisCommand) {
JedisPool jedisPool = new JedisPool(new JedisPoolConfig(),
instance.getConfig().getString("redis.host"), instance.getConfig().getInt("redis.port"), 20000,
(instance.getConfig().getString("redis.auth.password").isEmpty() ? null : instance.getConfig().getString("redis.auth.password")),
instance.getConfig().getInt("redis.channel-id", 0));
Jedis jedis = jedisPool.getResource();
T result = null;
try {
result = redisCommand.execute(jedis);
} catch (Exception e) {
e.printStackTrace();
if (jedis != null) {
jedisPool.getResource();
jedis = null;
}
} finally {
if (jedis != null) {
jedisPool.getResource();
}
}
return result;
}
}

View File

@ -0,0 +1,30 @@
package dev.lbuddyboy.communicate.database.redis.packets;
import dev.lbuddyboy.communicate.BunkersCom;
import dev.lbuddyboy.communicate.BunkersGame;
import dev.lbuddyboy.communicate.database.redis.JedisPacket;
import lombok.AllArgsConstructor;
import java.util.List;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 14/04/2022 / 4:25 PM
* BunkersCommunicator / dev.lbuddyboy.communicate.database.redis.packets
*/
@AllArgsConstructor
public class BunkersUpdatePacket implements JedisPacket {
private List<BunkersGame> games;
@Override
public void onReceive() {
BunkersCom.getInstance().setBunkersGames(this.games);
}
@Override
public String getID() {
return "Bunkers Game Update";
}
}

View File

@ -0,0 +1,33 @@
package dev.lbuddyboy.communicate.database.redis.packets;
import dev.lbuddyboy.communicate.BunkersCom;
import dev.lbuddyboy.communicate.database.redis.JedisPacket;
import dev.lbuddyboy.communicate.profile.Profile;
import lombok.AllArgsConstructor;
import org.bukkit.Bukkit;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 20/12/2021 / 1:20 AM
* lCore-Premium / me.lbuddyboy.core.database.redis.packets
*/
@AllArgsConstructor
public class UserUpdatePacket implements JedisPacket {
private Profile newProfile;
@Override
public void onReceive() {
if (Bukkit.getPlayer(newProfile.getUniqueId()) != null) return;
Bukkit.getScheduler().runTaskAsynchronously(BunkersCom.getInstance(), () -> {
BunkersCom.getInstance().getProfileHandler().getProfiles().put(newProfile.getUniqueId(), newProfile);
});
}
@Override
public String getID() {
return "User Update";
}
}

View File

@ -0,0 +1,29 @@
package dev.lbuddyboy.communicate.database.redis.sub;
import com.google.gson.Gson;
import dev.lbuddyboy.communicate.database.redis.JedisPacket;
import lombok.NoArgsConstructor;
import lombok.SneakyThrows;
@NoArgsConstructor
public class JedisSubscriber extends redis.clients.jedis.JedisPubSub {
@SneakyThrows
@Override
public void onMessage(String channel, String message) {
Class<?> packetClass;
int packetMessageSplit = message.indexOf("||");
String packetClassStr = message.substring(0, packetMessageSplit);
String messageJson = message.substring(packetMessageSplit + "||".length());
try {
packetClass = Class.forName(packetClassStr);
} catch (ClassNotFoundException ignored) {
return;
}
JedisPacket packet = (JedisPacket) new Gson().fromJson(messageJson, packetClass);
if (packet != null) {
packet.onReceive();
}
}
}

View File

@ -0,0 +1,110 @@
package dev.lbuddyboy.communicate.profile;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import com.mongodb.client.model.Filters;
import com.mongodb.client.model.ReplaceOptions;
import dev.lbuddyboy.communicate.BunkersCom;
import dev.lbuddyboy.communicate.FinalGame;
import lombok.Data;
import lombok.Getter;
import org.bson.Document;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 23/09/2021 / 2:24 AM
* LBuddyBoy Development / me.lbuddyboy.core.profile
*/
@Data
public class Profile {
@Getter
private static final JsonParser jsonParser = new JsonParser();
private final UUID uniqueId;
private String name;
private List<FinalGame> gameHistory;
private int oresMined, kills, deaths, wins, kothCaptures;
private boolean loaded;
public Profile(UUID uniqueId) {
this.uniqueId = uniqueId;
this.name = Bukkit.getOfflinePlayer(uniqueId).getName();
this.gameHistory = new ArrayList<>();
load();
}
public void load() {
Document document = BunkersCom.getInstance().getMongoHandler().getMongoDatabase().getCollection("profiles").find(Filters.eq("uniqueId", this.uniqueId.toString())).first();
if (document == null) {
System.out.println("Detected a null profile.");
Player player = Bukkit.getPlayer(this.uniqueId);
if (player != null) {
Bukkit.getScheduler().runTaskLater(BunkersCom.getInstance(), () -> player.kickPlayer("Failed to load your profile"), 10);
}
return;
}
if (document.containsKey("oresMined")) {
this.oresMined = document.getInteger("oresMined");
}
if (document.containsKey("kills")) {
this.kills = document.getInteger("kills");
}
if (document.containsKey("deaths")) {
this.deaths = document.getInteger("deaths");
}
if (document.containsKey("wins")) {
this.wins = document.getInteger("wins");
}
if (document.containsKey("kothCaptures")) {
this.kothCaptures = document.getInteger("kothCaptures");
}
if (document.containsKey("gameHistory")) {
for (JsonElement jsonElement : jsonParser.parse(document.getString("gameHistory")).getAsJsonArray()) {
this.gameHistory.add(FinalGame.deserialize(jsonElement.getAsJsonObject()));
}
}
loaded = true;
}
public void save() {
Bukkit.getScheduler().runTaskAsynchronously(BunkersCom.getInstance(), () -> {
Document document = new Document();
document.put("uniqueId", this.uniqueId.toString());
document.put("name", this.name);
document.put("oresMined", this.oresMined);
document.put("kills", this.kills);
document.put("deaths", this.deaths);
document.put("wins", this.wins);
document.put("kothCaptures", this.kothCaptures);
JsonArray gameHistory = new JsonArray();
this.gameHistory.forEach(game -> gameHistory.add(game.serialize()));
document.put("gameHistory", gameHistory.toString());
BunkersCom.getInstance().getMongoHandler().getMongoDatabase().getCollection("profiles").replaceOne(Filters.eq("uniqueId", this.uniqueId.toString()), document, new ReplaceOptions().upsert(true));
});
}
}

View File

@ -0,0 +1,46 @@
package dev.lbuddyboy.communicate.profile;
import com.mongodb.client.MongoCollection;
import dev.lbuddyboy.communicate.BunkersCom;
import lombok.Getter;
import org.bson.Document;
import org.bukkit.Bukkit;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 23/09/2021 / 2:31 AM
* LBuddyBoy Development / me.lbuddyboy.core.profile
*/
@Getter
public class ProfileHandler {
private Map<UUID, Profile> profiles;
private MongoCollection<Document> collection;
public ProfileHandler() {
this.profiles = new ConcurrentHashMap<>();
this.collection = BunkersCom.getInstance().getMongoHandler().getMongoDatabase().getCollection("profiles");
Bukkit.getPluginManager().registerEvents(new ProfileListener(), BunkersCom.getInstance());
}
public Profile getByUUID(UUID toLook) {
if (profiles.get(toLook) != null) {
return profiles.get(toLook);
}
Profile profile = new Profile(toLook);
if (!profile.isLoaded()) {
return null;
}
return profile;
}
}

View File

@ -0,0 +1,54 @@
package dev.lbuddyboy.communicate.profile;
import dev.lbuddyboy.communicate.BunkersCom;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 23/09/2021 / 2:28 AM
* LBuddyBoy Development / me.lbuddyboy.core.profile
*/
public class ProfileListener implements Listener {
@EventHandler
public void onAsyncPreLogin(AsyncPlayerPreLoginEvent event) {
Profile profile = new Profile(event.getUniqueId());
profile.setName(event.getName());
BunkersCom.getInstance().getProfileHandler().getProfiles().put(event.getUniqueId(), profile);
}
@EventHandler
public void onJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
Bukkit.getScheduler().runTaskAsynchronously(BunkersCom.getInstance(), () -> {
Profile profile = BunkersCom.getInstance().getProfileHandler().getProfiles().get(player.getUniqueId());
profile.save();
});
}
@EventHandler
public void onQuit(PlayerQuitEvent event) {
Player player = event.getPlayer();
Bukkit.getScheduler().runTaskAsynchronously(BunkersCom.getInstance(), () -> {
Profile profile = BunkersCom.getInstance().getProfileHandler().getByUUID(player.getUniqueId());
profile.save();
BunkersCom.getInstance().getProfileHandler().getProfiles().remove(profile.getUniqueId());
});
}
}

View File

@ -0,0 +1,22 @@
redis:
enabled: false
host: "localhost"
port: 6379
auth:
enabled: false
password: ""
channel-id: 0
mongo:
enabled: false
use-uri: false
uri: ""
host: "localhost" # dont use this if you have the uri
port: 27017 # dont use this if you have the uri
database: "lCore" # use this to determine the db name
auth: # dont use this if you have the uri
enabled: false # dont use this if you have the uri
username: "" # dont use this if you have the uri
password: "" # dont use this if you have the uri
auth-db: "" # dont use this if you have the uri

View File

@ -0,0 +1,5 @@
name: BunkersCommunicator
main: dev.lbuddyboy.communicate.BunkersCom
version: 0.1
author: LBuddyBoy
api-version: 1.19

View File

@ -0,0 +1,22 @@
redis:
enabled: false
host: "localhost"
port: 6379
auth:
enabled: false
password: ""
channel-id: 0
mongo:
enabled: false
use-uri: false
uri: ""
host: "localhost" # dont use this if you have the uri
port: 27017 # dont use this if you have the uri
database: "lCore" # use this to determine the db name
auth: # dont use this if you have the uri
enabled: false # dont use this if you have the uri
username: "" # dont use this if you have the uri
password: "" # dont use this if you have the uri
auth-db: "" # dont use this if you have the uri

View File

@ -0,0 +1,5 @@
name: BunkersCommunicator
main: dev.lbuddyboy.communicate.BunkersCom
version: 0.1
author: LBuddyBoy
api-version: 1.19

View File

@ -0,0 +1,5 @@
#Generated by Maven
#Fri Jun 09 22:53:19 CDT 2023
groupId=com.steelpvp
artifactId=BunkersCommunicator
version=1.0

View File

@ -0,0 +1,17 @@
dev\lbuddyboy\communicate\BunkersGame.class
dev\lbuddyboy\communicate\database\redis\JedisPacket.class
dev\lbuddyboy\communicate\database\mongo\MongoHandler.class
dev\lbuddyboy\communicate\database\redis\packets\UserUpdatePacket.class
dev\lbuddyboy\communicate\GameState.class
dev\lbuddyboy\communicate\database\redis\sub\JedisSubscriber.class
dev\lbuddyboy\communicate\FinalGame.class
dev\lbuddyboy\communicate\database\mongo\MongoHandler$2.class
dev\lbuddyboy\communicate\database\mongo\MongoHandler$1.class
dev\lbuddyboy\communicate\database\redis\packets\BunkersUpdatePacket.class
dev\lbuddyboy\communicate\database\redis\RedisCommand.class
dev\lbuddyboy\communicate\profile\ProfileListener.class
dev\lbuddyboy\communicate\profile\ProfileHandler.class
dev\lbuddyboy\communicate\database\redis\RedisHandler.class
dev\lbuddyboy\communicate\BunkersCom.class
dev\lbuddyboy\communicate\profile\Profile.class
dev\lbuddyboy\communicate\Team.class

View File

@ -0,0 +1,15 @@
D:\ServerFiles\MineSurge\Bunkers\BunkersCommunicator\src\main\java\dev\lbuddyboy\communicate\BunkersGame.java
D:\ServerFiles\MineSurge\Bunkers\BunkersCommunicator\src\main\java\dev\lbuddyboy\communicate\database\redis\packets\BunkersUpdatePacket.java
D:\ServerFiles\MineSurge\Bunkers\BunkersCommunicator\src\main\java\dev\lbuddyboy\communicate\profile\ProfileHandler.java
D:\ServerFiles\MineSurge\Bunkers\BunkersCommunicator\src\main\java\dev\lbuddyboy\communicate\profile\Profile.java
D:\ServerFiles\MineSurge\Bunkers\BunkersCommunicator\src\main\java\dev\lbuddyboy\communicate\database\mongo\MongoHandler.java
D:\ServerFiles\MineSurge\Bunkers\BunkersCommunicator\src\main\java\dev\lbuddyboy\communicate\database\redis\RedisCommand.java
D:\ServerFiles\MineSurge\Bunkers\BunkersCommunicator\src\main\java\dev\lbuddyboy\communicate\database\redis\sub\JedisSubscriber.java
D:\ServerFiles\MineSurge\Bunkers\BunkersCommunicator\src\main\java\dev\lbuddyboy\communicate\GameState.java
D:\ServerFiles\MineSurge\Bunkers\BunkersCommunicator\src\main\java\dev\lbuddyboy\communicate\FinalGame.java
D:\ServerFiles\MineSurge\Bunkers\BunkersCommunicator\src\main\java\dev\lbuddyboy\communicate\database\redis\JedisPacket.java
D:\ServerFiles\MineSurge\Bunkers\BunkersCommunicator\src\main\java\dev\lbuddyboy\communicate\BunkersCom.java
D:\ServerFiles\MineSurge\Bunkers\BunkersCommunicator\src\main\java\dev\lbuddyboy\communicate\database\redis\RedisHandler.java
D:\ServerFiles\MineSurge\Bunkers\BunkersCommunicator\src\main\java\dev\lbuddyboy\communicate\database\redis\packets\UserUpdatePacket.java
D:\ServerFiles\MineSurge\Bunkers\BunkersCommunicator\src\main\java\dev\lbuddyboy\communicate\profile\ProfileListener.java
D:\ServerFiles\MineSurge\Bunkers\BunkersCommunicator\src\main\java\dev\lbuddyboy\communicate\Team.java

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="FacetManager">
<facet type="minecraft" name="Minecraft">
<configuration>
<autoDetectTypes>
<platformType>SPIGOT</platformType>
</autoDetectTypes>
</configuration>
</facet>
</component>
</module>

View File

@ -0,0 +1,154 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>Bunkers</artifactId>
<groupId>dev.lbuddyboy</groupId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>BunkersHub</artifactId>
<version>1.0</version>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>co.aikar:acf-paper</include>
</includes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>viaversion-repo</id>
<url>https://repo.viaversion.com</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19.4-R0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.viaversion</groupId>
<artifactId>viaversion-api</artifactId>
<version>LATEST</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>23.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>dev.lbuddyboy</groupId>
<artifactId>lSpoof</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>dev.lbuddyboy.lqueue</groupId>
<artifactId>lQueue-API</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>me.clip</groupId>
<artifactId>PlaceholderAPI</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/PlaceholderAPI-2.10.10-DEV-108.jar</systemPath>
</dependency>
<dependency>
<groupId>me.signatured</groupId>
<artifactId>EzQueue</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/queue/EzQueueSpigot.jar</systemPath>
</dependency>
<dependency>
<groupId>me.joeloi</groupId>
<artifactId>Portal</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/queue/portal-bukkit.jar</systemPath>
</dependency>
<dependency>
<groupId>net.milkbowl</groupId>
<artifactId>Vault</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/rank/Vault.jar</systemPath>
</dependency>
<dependency>
<groupId>me.quartz.hestia</groupId>
<artifactId>HestiaAPI</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/rank/HestiaAPI.jar</systemPath>
</dependency>
<dependency>
<groupId>dev.brou</groupId>
<artifactId>MizuAPI</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/rank/MizuAPI.jar</systemPath>
</dependency>
<dependency>
<groupId>me.activad</groupId>
<artifactId>AquaCoreAPI</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/rank/AquaCoreAPI.jar</systemPath>
</dependency>
<dependency>
<groupId>me.lbuddyboy</groupId>
<artifactId>lCore</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/rank/lCore-1.0.jar</systemPath>
</dependency>
<dependency>
<groupId>dev.lbuddyboy</groupId>
<artifactId>Flash</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/rank/Flash-Bukkit-1.0.jar</systemPath>
</dependency>
<dependency>
<groupId>com.steelpvp</groupId>
<artifactId>BunkersCommunicator</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/BunkersCommunicator-1.0.jar</systemPath>
</dependency>
</dependencies>
<properties>
<maven.compiler.target>8</maven.compiler.target>
<maven.compiler.source>8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
</project>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

175
Bunkers/BunkersHub/pom.xml Normal file
View File

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>Bunkers</artifactId>
<groupId>dev.lbuddyboy</groupId>
<version>1.0</version>
</parent>
<artifactId>BunkersHub</artifactId>
<version>1.0</version>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<repositories>
<repository>
<id>viaversion-repo</id>
<url>https://repo.viaversion.com</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19.4-R0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.viaversion</groupId>
<artifactId>viaversion-api</artifactId>
<version>LATEST</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
</dependency>
<dependency>
<groupId>co.aikar</groupId>
<artifactId>acf-paper</artifactId>
<version>0.5.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>23.0.0</version>
</dependency>
<dependency>
<groupId>me.clip</groupId>
<artifactId>PlaceholderAPI</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/PlaceholderAPI-2.10.10-DEV-108.jar</systemPath>
</dependency>
<!--
Queue
-->
<dependency>
<groupId>me.signatured</groupId>
<artifactId>EzQueue</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/queue/EzQueueSpigot.jar</systemPath>
</dependency>
<dependency>
<groupId>me.joeloi</groupId>
<artifactId>Portal</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/queue/portal-bukkit.jar</systemPath>
</dependency>
<!--
Rank Cores
-->
<dependency>
<groupId>net.milkbowl</groupId>
<artifactId>Vault</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/rank/Vault.jar</systemPath>
</dependency>
<dependency>
<groupId>me.quartz.hestia</groupId>
<artifactId>HestiaAPI</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/rank/HestiaAPI.jar</systemPath>
</dependency>
<dependency>
<groupId>dev.brou</groupId>
<artifactId>MizuAPI</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/rank/MizuAPI.jar</systemPath>
</dependency>
<dependency>
<groupId>me.activad</groupId>
<artifactId>AquaCoreAPI</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/rank/AquaCoreAPI.jar</systemPath>
</dependency>
<dependency>
<groupId>me.lbuddyboy</groupId>
<artifactId>lCore</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/rank/lCore-1.0.jar</systemPath>
</dependency>
<dependency>
<groupId>dev.lbuddyboy</groupId>
<artifactId>lSpoof</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>dev.lbuddyboy.lqueue</groupId>
<artifactId>lQueue-API</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>dev.lbuddyboy</groupId>
<artifactId>Flash</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/rank/Flash-Bukkit-1.0.jar</systemPath>
</dependency>
<dependency>
<groupId>com.steelpvp</groupId>
<artifactId>BunkersCommunicator</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/BunkersCommunicator-1.0.jar</systemPath>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>co.aikar:acf-paper</include>
</includes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,24 @@
package dev.lbuddyboy.hub.command;
import co.aikar.commands.BaseCommand;
import co.aikar.commands.annotation.CommandAlias;
import co.aikar.commands.annotation.Default;
import dev.lbuddyboy.hub.games.GameHistoryMenu;
import dev.lbuddyboy.hub.games.GameProfileMenu;
import org.bukkit.entity.Player;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 22/09/2021 / 1:46 AM
* LBuddyBoy-Development / me.lbuddyboy.hub.command
*/
@CommandAlias("gamehistory")
public class HistoryCommand extends BaseCommand {
@Default
public static void enable(Player sender) {
new GameHistoryMenu().openMenu(sender);
}
}

View File

@ -0,0 +1,68 @@
package dev.lbuddyboy.hub.command;
import co.aikar.commands.BaseCommand;
import co.aikar.commands.annotation.CommandAlias;
import co.aikar.commands.annotation.Default;
import dev.lbuddyboy.hub.lHub;
import dev.lbuddyboy.hub.util.CC;
import dev.lbuddyboy.hub.util.CompMaterial;
import dev.lbuddyboy.hub.util.ItemBuilder;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.metadata.FixedMetadataValue;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 22/09/2021 / 1:46 AM
* LBuddyBoy-Development / me.lbuddyboy.hub.command
*/
@CommandAlias("pvpmode")
public class PvPModeCommand extends BaseCommand {
@Default
public static void enable(Player sender) {
if (sender.hasMetadata("pvpmode")) {
sender.removeMetadata("pvpmode", lHub.getInstance());
sender.sendMessage(CC.translate("&cPvP Mode is now disabled."));
lHub.getInstance().getItemHandler().setItems(sender);
sender.teleport(lHub.getInstance().getSettingsHandler().getSpawnLocation());
for (Player online : Bukkit.getOnlinePlayers()) {
if (!online.hasMetadata("pvpmode")) continue;
online.hidePlayer(sender);
sender.hidePlayer(online);
}
return;
}
sender.getInventory().clear();
sender.setMetadata("pvpmode", new FixedMetadataValue(lHub.getInstance(), true));
sender.sendMessage(CC.translate("&aPvP Mode is now enabled."));
ItemStack[] armor = new ItemStack[4];
armor[3] = new ItemStack(Material.DIAMOND_HELMET);
armor[2] = new ItemStack(Material.LEATHER_CHESTPLATE);
armor[1] = new ItemStack(Material.LEATHER_LEGGINGS);
armor[0] = new ItemStack(Material.DIAMOND_BOOTS);
sender.getInventory().setItem(0, new ItemStack(Material.DIAMOND_SWORD));
sender.getInventory().setItem(8, new ItemBuilder(CompMaterial.RED_DYE.getMaterial()).setAmount(1).setData(CompMaterial.RED_DYE.getData()).setDisplayName("&c&lLeave PvP").create());
sender.getInventory().setArmorContents(armor);
sender.getInventory().setHeldItemSlot(0);
sender.updateInventory();
sender.teleport(lHub.getInstance().getSettingsHandler().getSpawnLocation());
for (Player online : Bukkit.getOnlinePlayers()) {
if (!online.hasMetadata("pvpmode")) continue;
online.showPlayer(sender);
sender.showPlayer(online);
}
}
}

View File

@ -0,0 +1,31 @@
package dev.lbuddyboy.hub.command;
import co.aikar.commands.BaseCommand;
import co.aikar.commands.annotation.CommandAlias;
import co.aikar.commands.annotation.Default;
import dev.lbuddyboy.hub.games.GameProfileMenu;
import dev.lbuddyboy.hub.lHub;
import dev.lbuddyboy.hub.util.CC;
import dev.lbuddyboy.hub.util.CompMaterial;
import dev.lbuddyboy.hub.util.ItemBuilder;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.metadata.FixedMetadataValue;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 22/09/2021 / 1:46 AM
* LBuddyBoy-Development / me.lbuddyboy.hub.command
*/
@CommandAlias("stats")
public class StatsCommand extends BaseCommand {
@Default
public static void enable(Player sender) {
new GameProfileMenu().openMenu(sender);
}
}

View File

@ -0,0 +1,56 @@
package dev.lbuddyboy.hub.command;
import co.aikar.commands.BaseCommand;
import co.aikar.commands.annotation.CommandAlias;
import co.aikar.commands.annotation.CommandPermission;
import co.aikar.commands.annotation.Subcommand;
import dev.lbuddyboy.hub.lHub;
import dev.lbuddyboy.hub.lModule;
import dev.lbuddyboy.hub.util.CC;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.io.IOException;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 22/09/2021 / 1:46 AM
* LBuddyBoy-Development / me.lbuddyboy.hub.command
*/
@CommandAlias("lhub|hubcore|lhubcore")
@CommandPermission("lhub.admin")
public class lHubCommand extends BaseCommand {
@Subcommand("setspawn")
public void setspawn(Player sender) {
lHub.getInstance().getSettingsHandler().setSpawnLocation(sender.getLocation());
Bukkit.getOnlinePlayers().forEach(player -> player.teleport(lHub.getInstance().getSettingsHandler().getSpawnLocation()));
sender.sendMessage(CC.translate("&aSuccessfully set the new world spawn."));
}
@Subcommand("reload|rl")
@CommandPermission("lhub.admin")
public void reload(CommandSender sender) throws IOException {
lHub.getInstance().getModules().forEach(lModule::save);
lHub.getInstance().getModules().forEach(lModule::reload);
sender.sendMessage(CC.translate("&aSuccessfully reloaded all the configs."));
}
@Subcommand("build|buildmode")
@CommandPermission("lhub.admin")
public void buildmode(Player sender) {
if (lHub.getInstance().getSettingsHandler().getBuildModes().contains(sender)) {
sender.sendMessage(CC.translate("&cYou have just %status% your build mode.".replaceAll("%status%", "disabled")));
lHub.getInstance().getSettingsHandler().getBuildModes().remove(sender);
return;
}
sender.sendMessage(CC.translate("&aYou have just %status% your build mode.".replaceAll("%status%", "enabled")));
lHub.getInstance().getSettingsHandler().getBuildModes().add(sender);
}
}

View File

@ -0,0 +1,30 @@
package dev.lbuddyboy.hub.config;
import dev.lbuddyboy.hub.util.ConfigFile;
import org.bukkit.configuration.file.YamlConfiguration;
import java.util.Collections;
import java.util.List;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 22/09/2021 / 1:39 AM
* LBuddyBoy-Development / me.lbuddyboy.hub.config
*/
public class Doc extends ConfigFile {
public Doc(String configName) {
super(configName);
}
@Override
public YamlConfiguration getConfig() {
return getDoc().gc();
}
@Override
public List<Object> values() {
return Collections.emptyList();
}
}

View File

@ -0,0 +1,43 @@
package dev.lbuddyboy.hub.config;
import dev.lbuddyboy.hub.lHub;
import dev.lbuddyboy.hub.lModule;
import lombok.Getter;
import lombok.SneakyThrows;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 22/09/2021 / 1:40 AM
* LBuddyBoy-Development / me.lbuddyboy.hub.config
*/
@Getter
public class DocHandler implements lModule {
private Doc itemDoc;
private Doc settingsDoc;
private Doc scoreBoardDoc;
private Doc queueDoc;
@Override
public void load(lHub plugin) {
this.itemDoc = new Doc("items");
this.settingsDoc = new Doc("settings");
this.scoreBoardDoc = new Doc("scoreboard");
this.queueDoc = new Doc("queue");
}
@Override
public void unload(lHub plugin) {
}
@SneakyThrows
@Override
public void reload() {
this.itemDoc.getDoc().reloadConfig();
this.settingsDoc.getDoc().reloadConfig();
this.scoreBoardDoc.getDoc().reloadConfig();
this.queueDoc.getDoc().reloadConfig();
}
}

View File

@ -0,0 +1,70 @@
package dev.lbuddyboy.hub.games;
import dev.lbuddyboy.communicate.BunkersCom;
import dev.lbuddyboy.communicate.FinalGame;
import dev.lbuddyboy.communicate.profile.Profile;
import dev.lbuddyboy.hub.util.CC;
import dev.lbuddyboy.hub.util.ItemBuilder;
import dev.lbuddyboy.hub.util.TimeUtils;
import dev.lbuddyboy.hub.util.menu.Button;
import dev.lbuddyboy.hub.util.menu.paged.PagedMenu;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 15/04/2022 / 7:24 AM
* Bunkers-Hub / services.xenlan.hub.games
*/
public class GameHistoryMenu extends PagedMenu {
@Override
public String getPageTitle(Player player) {
return "Game History";
}
@Override
public List<Button> getPageButtons(Player player) {
List<Button> buttons = new ArrayList<>();
Profile profile = BunkersCom.getInstance().getProfileHandler().getByUUID(player.getUniqueId());
for (FinalGame game : profile.getGameHistory()) {
SimpleDateFormat sdf = new SimpleDateFormat();
sdf.setTimeZone(TimeZone.getTimeZone("EST"));
buttons.add(Button.fromItem(new ItemBuilder(Material.END_CRYSTAL)
.setLore(Arrays.asList(
" ",
" &fYour Team: &g" + game.getTeam(),
" &fWinner: &c" + game.getWinner(),
" ",
" &fKills: &g" + game.getKills(),
" &fDeaths: &g" + game.getDeaths(),
" ",
" &fStarted At: &g" + sdf.format(new Date(game.getStartedAt())),
" &fEnded At: &g" + TimeUtils.formatLongIntoMMSS((game.getEndedAt() - game.getStartedAt()) / 1000),
" "
))
.create(), 0));
}
return buttons;
}
@Override
public List<Button> getGlobalButtons(Player player) {
List<Button> buttons = new ArrayList<>();
Profile profile = BunkersCom.getInstance().getProfileHandler().getByUUID(player.getUniqueId());
if (profile.getGameHistory().isEmpty()) {
buttons.add(Button.fromItem(new ItemBuilder(Material.BARRIER).setDisplayName("&cNo games found...").create(), 5));
}
return buttons;
}
}

View File

@ -0,0 +1,67 @@
package dev.lbuddyboy.hub.games;
import dev.lbuddyboy.communicate.BunkersCom;
import dev.lbuddyboy.communicate.FinalGame;
import dev.lbuddyboy.communicate.profile.Profile;
import dev.lbuddyboy.hub.util.CC;
import dev.lbuddyboy.hub.util.ItemBuilder;
import dev.lbuddyboy.hub.util.TimeUtils;
import dev.lbuddyboy.hub.util.menu.Button;
import dev.lbuddyboy.hub.util.menu.Menu;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 15/04/2022 / 7:24 AM
* Bunkers-Hub / services.xenlan.hub.games
*/
public class GameProfileMenu extends Menu {
@Override
public String getTitle(Player var1) {
return "Game Profile";
}
@Override
public List<Button> getButtons(Player player) {
List<Button> buttons = new ArrayList<>();
Profile profile = BunkersCom.getInstance().getProfileHandler().getByUUID(player.getUniqueId());
SimpleDateFormat sdf = new SimpleDateFormat();
sdf.setTimeZone(TimeZone.getTimeZone("EST"));
buttons.add(Button.fromItem(new ItemBuilder(Material.NETHERITE_CHESTPLATE)
.setDisplayName("&g&lYour Bunkers Statistics")
.setLore(Arrays.asList(
" ",
" &fKills: &g" + profile.getKills(),
" &fDeaths: &g" + profile.getDeaths(),
" ",
" &fWins: &g" + profile.getWins(),
" &fLosses: &g" + (profile.getGameHistory().size() - profile.getWins()),
" &fOres Mined: &g" + profile.getOresMined(),
" &fKoTH Captures: &g" + profile.getKothCaptures(),
" &fGames Played: &g" + profile.getGameHistory().size(),
" "
))
.create(), 5));
return buttons;
}
public int getLoses(Profile profile) {
int i = 0;
for (FinalGame game : profile.getGameHistory()) {
if (!game.getWinner().contains(game.getTeam())) {
++i;
}
}
return i;
}
}

View File

@ -0,0 +1,163 @@
package dev.lbuddyboy.hub.games;
import dev.lbuddyboy.communicate.BunkersCom;
import dev.lbuddyboy.communicate.BunkersGame;
import dev.lbuddyboy.communicate.GameState;
import dev.lbuddyboy.communicate.Team;
import dev.lbuddyboy.hub.util.CC;
import dev.lbuddyboy.hub.util.ItemBuilder;
import dev.lbuddyboy.hub.util.TimeUtils;
import dev.lbuddyboy.hub.util.menu.Button;
import dev.lbuddyboy.hub.util.menu.paged.PagedMenu;
import lombok.AllArgsConstructor;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.inventory.ItemStack;
import java.util.*;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 14/04/2022 / 4:53 PM
* Bunkers-Hub / services.xenlan.hub.games
*/
public class GamesMenu extends PagedMenu {
public String getFancyState(GameState state) {
if (state == GameState.ENDING) {
return CC.translate("&cEnding...");
}
if (state == GameState.COUNTING) {
return CC.translate("&eStarting...");
}
if (state == GameState.WAITING) {
return CC.translate("&bWaiting...");
}
if (state == GameState.ACTIVE) {
return CC.translate("&aRunning...");
}
if (state == GameState.ENDED) {
return CC.translate("&4Ended");
}
return state.name();
}
@Override
public String getPageTitle(Player player) {
return "Bunkers Games";
}
@Override
public List<Button> getPageButtons(Player player) {
List<Button> buttons = new ArrayList<>();
for (BunkersGame game : BunkersCom.getInstance().getBunkersGames()) {
buttons.add(new LiveBunkersButton(game));
}
return buttons;
}
@Override
public List<Button> getGlobalButtons(Player player) {
List<Button> buttons = new ArrayList<>();
if (BunkersCom.getInstance().getBunkersGames().isEmpty()) {
buttons.add(Button.fromItem(new ItemBuilder(Material.BARRIER)
.setDisplayName("&cNo games found...")
.create(), 5));
}
return buttons;
}
@Override
public boolean autoUpdate() {
return true;
}
@AllArgsConstructor
public class LiveBunkersButton extends Button {
private BunkersGame game;
@Override
public int getSlot() {
return 0;
}
@Override
public ItemStack getItem() {
List<String> lore = new ArrayList<>();
if (game.getGameState() == GameState.ACTIVE || game.getGameState() == GameState.ENDED || game.getGameState() == GameState.ENDING) {
long diff = (game.getStartedAt() + 300_000L) - System.currentTimeMillis();
if (diff <= 0) {
lore = new ArrayList<>(Arrays.asList(
" ",
" &fᴛᴀᴛᴇ: &g" + getFancyState(game.getGameState()),
" &fɢᴀᴍᴇ ᴛɪᴍᴇ: &g" + TimeUtils.formatLongIntoMMSS(((System.currentTimeMillis() - game.getStartedAt()) / 1000)),
" &fᴘʟᴀʏᴇʀ: &g" + game.getPlayersLeft(),
" &fᴋᴛʜ: &g" + TimeUtils.formatIntoMMSS(game.getKothTime()),
" "
));
lore.add(" &g&lᴛᴇᴀᴍ");
for (Team team : game.getTeams()) {
if (team.getColor() == ChatColor.LIGHT_PURPLE) continue;
lore.add(" " + team.getDisplay() + "&f: " + team.getColor() + team.getDTRFormatted());
}
} else {
String form = TimeUtils.formatLongIntoMMSS(diff / 1000);
lore = new ArrayList<>(Arrays.asList(
" ",
" &fᴛᴀᴛᴇ: &g" + getFancyState(game.getGameState()),
" &fɢᴀᴍᴇ ᴛɪᴍᴇ: &g" + TimeUtils.formatLongIntoMMSS(((System.currentTimeMillis() - game.getStartedAt()) / 1000)),
" &fᴘʟᴀʏᴇʀ: &g" + game.getPlayersLeft(),
" &fᴋᴛʜ ɪɴ: &g" + form,
" "
));
lore.add(" &g&lᴛᴇᴀᴍ");
for (Team team : game.getTeams()) {
if (team.getColor() == ChatColor.LIGHT_PURPLE) continue;
lore.add(" " + team.getDisplay() + "&f: " + team.getColor() + team.getDTRFormatted());
}
}
lore.add(" ");
lore.add(" &7Click to spectate this game!");
lore.add(" ");
} else {
lore = Arrays.asList(
" ",
" &fᴛᴀᴛᴇ: &g" + getFancyState(game.getGameState()),
" &fᴘʟᴀʏᴇʀ: &g" + game.getPlayersLeft(),
" ",
" &7Click to play this game!",
" "
);
}
return new ItemBuilder(Material.END_CRYSTAL)
.setDisplayName("&g&l" + game.getName())
.setLore(lore)
.create();
}
@Override
public void action(InventoryClickEvent event) {
if (!(event.getWhoClicked() instanceof Player)) return;
Player player = (Player) event.getWhoClicked();
player.chat("/joinq " + game.getName());
}
}
}

View File

@ -0,0 +1,131 @@
package dev.lbuddyboy.hub.general;
import dev.lbuddyboy.hub.lHub;
import dev.lbuddyboy.hub.lModule;
import dev.lbuddyboy.hub.placeholder.Placeholder;
import dev.lbuddyboy.hub.queue.QueueImpl;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Sound;
import org.bukkit.entity.Player;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 23/09/2021 / 1:37 AM
* LBuddyBoy-Development / me.lbuddyboy.hub.settings
*/
@Getter
public class GeneralSettingsHandler implements lModule {
private final List<Player> buildModes;
private final List<Placeholder> placeholders;
private Location spawnLocation;
private boolean placeholderAPI;
private boolean antiVoid;
private int antiVoidHeight;
private boolean doubleJump;
private double doubleJumpMultiplier;
private Sound doubleJumpSound;
private boolean enderButtRide;
private double enderButtMultiplier;
private Sound enderButtSound;
private String online, offline, whitelisted;
public GeneralSettingsHandler() {
this.buildModes = new ArrayList<>();
this.placeholders = new ArrayList<>();
}
@Override
public void load(lHub plugin) {
reload();
Bukkit.getScheduler().runTaskTimerAsynchronously(lHub.getInstance(), () -> {
QueueImpl queueImpl = lHub.getInstance().getQueueHandler().getQueueImpl();
for (Placeholder placeholder : this.placeholders) {
queueImpl.update(placeholder);
}
}, 10, 20 * 5);
}
@Override
public void unload(lHub plugin) {
}
@Override
public void reload() {
this.buildModes.clear();
this.placeholders.clear();
this.placeholderAPI = lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().getBoolean("papi-integration");
this.loadSpawn();
this.loadAntiVoid();
this.loadDoubleJump();
this.loadEnderButt();
this.loadServer();
}
public void setSpawnLocation(Location location) {
this.spawnLocation = location;
lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().set("spawn.world", this.spawnLocation.getWorld().getName());
lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().set("spawn.x", this.spawnLocation.getX());
lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().set("spawn.y", this.spawnLocation.getY());
lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().set("spawn.z", this.spawnLocation.getZ());
lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().set("spawn.yaw", this.spawnLocation.getYaw());
lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().set("spawn.pitch", this.spawnLocation.getPitch());
try {
lHub.getInstance().getDocHandler().getSettingsDoc().getDoc().save();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
private void loadSpawn() {
this.spawnLocation = new Location(
Bukkit.getWorld(lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().getString("spawn.world")),
lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().getDouble("spawn.x"),
lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().getDouble("spawn.y"),
lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().getDouble("spawn.z"),
(float) lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().getDouble("spawn.yaw"),
(float) lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().getDouble("spawn.pitch")
);
}
private void loadAntiVoid() {
this.antiVoid = lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().getBoolean("anti-void.enabled");
this.antiVoidHeight = lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().getInt("anti-void.level");
}
private void loadDoubleJump() {
this.doubleJump = lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().getBoolean("double-jump.enabled");
this.doubleJumpMultiplier = lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().getDouble("double-jump.multiplier");
try {
this.doubleJumpSound = Sound.valueOf(lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().getString("double-jump.sound"));
} catch (Exception ignored) {
}
}
private void loadEnderButt() {
this.enderButtRide = lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().getBoolean("ender-butt.ride");
this.enderButtMultiplier = lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().getDouble("ender-butt.multiplier");
try {
this.enderButtSound = Sound.valueOf(lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().getString("ender-butt.sound"));
} catch (Exception ignored) {
}
}
private void loadServer() {
this.online = lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().getString("server-status.online");
this.offline = lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().getString("server-status.offline");
this.whitelisted = lHub.getInstance().getDocHandler().getSettingsDoc().getConfig().getString("server-status.whitelisted");
}
}

View File

@ -0,0 +1,27 @@
package dev.lbuddyboy.hub.item;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.bukkit.event.block.Action;
import org.bukkit.inventory.ItemStack;
import java.util.List;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 22/09/2021 / 9:02 PM
* LBuddyBoy-Development / me.lbuddyboy.hub.item
*/
@AllArgsConstructor
@Data
public class Item {
private String sectionName;
private ItemStack stack;
private int slot;
private List<Action> clicks;
private String action;
private String val;
}

View File

@ -0,0 +1,130 @@
package dev.lbuddyboy.hub.item;
import dev.lbuddyboy.hub.lHub;
import dev.lbuddyboy.hub.lModule;
import dev.lbuddyboy.hub.util.ItemBuilder;
import lombok.Getter;
import lombok.SneakyThrows;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.event.block.Action;
import org.bukkit.inventory.ItemStack;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 22/09/2021 / 9:02 PM
* LBuddyBoy-Development / me.lbuddyboy.hub.item
*/
@Getter
public class ItemHandler implements lModule {
private final List<Item> items;
public ItemHandler() {
items = new ArrayList<>();
}
@SneakyThrows
public void save(String key, int slot, ItemStack stack) {
YamlConfiguration config = lHub.getInstance().getDocHandler().getItemDoc().getConfig();
String abs = "items." + key + ".";
config.set(abs + "material", stack.getType().name());
if (stack.hasItemMeta()) {
if (stack.getItemMeta().hasDisplayName() && stack.getItemMeta().getDisplayName() != null) {
config.set(abs + "name", stack.getItemMeta().getDisplayName());
}
if (stack.getItemMeta().hasCustomModelData() && stack.getItemMeta().getCustomModelData() != 0) {
config.set(abs + "model-data", stack.getItemMeta().getCustomModelData());
}
if (stack.getItemMeta().hasLore() && stack.getItemMeta().getLore() != null) {
config.set(abs + "lore", stack.getItemMeta().getLore());
}
}
if (!stack.getEnchantments().isEmpty()) {
int i = 0;
for (Map.Entry<Enchantment, Integer> entry : stack.getEnchantments().entrySet()) {
config.set(abs + "enchants." + i + ".type", entry.getKey().getName());
config.set(abs + "enchants." + i + ".power", entry.getValue());
++i;
}
}
config.set(abs + "slot", slot);
config.set(abs + "amount", stack.getAmount());
config.set(abs + "data", stack.getDurability());
config.set(abs + "clicks", Arrays.asList(
"RIGHT_CLICK_BLOCK",
"RIGHT_CLICK_AIR"
));
config.set(abs + "action.type", "NONE");
config.set(abs + "action.value", "");
lHub.getInstance().getDocHandler().getItemDoc().getDoc().save();
}
@Override
public void load(lHub plugin) {
reload();
}
@Override
public void unload(lHub plugin) {
}
@Override
public void reload() {
items.clear();
try {
lHub.getInstance().getDocHandler().getItemDoc().getDoc().reloadConfig();
} catch (IOException e) {
throw new RuntimeException(e);
}
load();
Bukkit.getOnlinePlayers().forEach(this::setItems);
}
public void load() {
YamlConfiguration config = lHub.getInstance().getDocHandler().getItemDoc().getConfig();
for (String key : config.getConfigurationSection("items").getKeys(false)) {
ItemBuilder builder = new ItemBuilder(Material.valueOf(config.getString("items." + key + ".material")));
builder.setDisplayName(config.getString("items." + key + ".name"));
builder.setLore(config.getStringList("items." + key + ".lore"));
builder.setAmount(config.getInt("items." + key + ".amount"));
builder.setData(config.getInt("items." + key + ".data"));
builder.setModelData(config.getInt("items." + key + ".model-data"));
if (config.contains("items." + key + ".enchants")) {
for (String eKey : config.getConfigurationSection("items." + key + ".enchants").getKeys(false)) {
builder.addEnchant(Enchantment.getByName(config.getString("items." + key + ".enchants." + eKey + ".type")), config.getInt("items." + key + ".enchants." + eKey + ".power"));
}
}
List<Action> clickTypes = config.getStringList("items." + key + ".clicks").stream().map(org.bukkit.event.block.Action::valueOf).collect(Collectors.toList());
Item item = new Item(key, builder.create(), config.getInt("items." + key + ".slot"), clickTypes, config.getString("items." + key + ".action.type"), config.getString("items." + key + ".action.value"));
items.add(item);
}
}
public void setItems(Player player) {
player.getInventory().clear();
player.setHealth(20);
player.setFoodLevel(20);
for (Item item : lHub.getInstance().getItemHandler().getItems()) {
player.getInventory().setItem(item.getSlot() - 1, item.getStack());
}
}
}

View File

@ -0,0 +1,39 @@
package dev.lbuddyboy.hub.item;
import dev.lbuddyboy.hub.lHub;
import dev.lbuddyboy.hub.util.CompMaterial;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractEvent;
/**
* @author LBuddyBoy (lbuddyboy.me)
* 22/09/2021 / 9:05 PM
* LBuddyBoy-Development / me.lbuddyboy.hub.item
*/
public class ItemListener implements Listener {
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
Player player = event.getPlayer();
if (event.getItem() == null) return;
if (event.getItem().getType() == CompMaterial.INK_SAC.getMaterial() && player.hasMetadata("pvpmode")) {
player.chat("/pvpmode");
return;
}
for (Item item : lHub.getInstance().getItemHandler().getItems()) {
if (!item.getStack().isSimilar(event.getItem())) continue;
if (!item.getClicks().contains(event.getAction())) continue;
lHub.getInstance().getCustomMenuHandler().performAction(item.getAction(), player, item.getVal());
event.setUseInteractedBlock(Event.Result.DENY);
event.setUseItemInHand(Event.Result.DENY);
}
}
}

Some files were not shown because too many files have changed in this diff Show More