По просьбе Димона + mini-update 0.1.2
This commit is contained in:
10
.gitignore
vendored
10
.gitignore
vendored
@@ -1,10 +0,0 @@
|
|||||||
## IDEA ##
|
|
||||||
.idea/
|
|
||||||
out/
|
|
||||||
*.iml
|
|
||||||
*.ipr
|
|
||||||
*.iws
|
|
||||||
*.ids
|
|
||||||
|
|
||||||
## MAVEN ##
|
|
||||||
target/
|
|
||||||
8
.idea/artifacts/PrisonAPI_jar.xml
generated
Normal file
8
.idea/artifacts/PrisonAPI_jar.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<component name="ArtifactManager">
|
||||||
|
<artifact type="jar" build-on-make="true" name="PrisonAPI:jar">
|
||||||
|
<output-path>D:/Devel_Minecraft/spi_server_1.12/plugins</output-path>
|
||||||
|
<root id="archive" name="PrisonAPI.jar">
|
||||||
|
<element id="module-output" name="PrisonAPI" />
|
||||||
|
</root>
|
||||||
|
</artifact>
|
||||||
|
</component>
|
||||||
15
.idea/dataSources.local.xml
generated
Normal file
15
.idea/dataSources.local.xml
generated
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="dataSourceStorageLocal">
|
||||||
|
<data-source name="prison4life@localhost" uuid="4defc9a2-e1ce-4207-91c9-549baaa59221">
|
||||||
|
<database-info product="MySQL" version="5.7.24-log" jdbc-version="4.0" driver-name="MySQL Connector Java" driver-version="mysql-connector-java-5.1.46 ( Revision: 9cc87a48e75c2d2e87c1a293b2862ce651cb256e )">
|
||||||
|
<extra-name-characters>#@</extra-name-characters>
|
||||||
|
<identifier-quote-string>`</identifier-quote-string>
|
||||||
|
</database-info>
|
||||||
|
<case-sensitivity plain-identifiers="lower" quoted-identifiers="lower" />
|
||||||
|
<secret-storage>master_key</secret-storage>
|
||||||
|
<user-name>root</user-name>
|
||||||
|
<introspection-schemas>*:prison4life</introspection-schemas>
|
||||||
|
</data-source>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
19
.idea/dataSources.xml
generated
Normal file
19
.idea/dataSources.xml
generated
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||||
|
<data-source source="LOCAL" name="prison4life@localhost" uuid="4defc9a2-e1ce-4207-91c9-549baaa59221">
|
||||||
|
<driver-ref>mysql</driver-ref>
|
||||||
|
<synchronize>true</synchronize>
|
||||||
|
<jdbc-driver>com.mysql.jdbc.Driver</jdbc-driver>
|
||||||
|
<jdbc-url>jdbc:mysql://localhost:3306/prison4life</jdbc-url>
|
||||||
|
<driver-properties>
|
||||||
|
<property name="autoReconnect" value="true" />
|
||||||
|
<property name="zeroDateTimeBehavior" value="convertToNull" />
|
||||||
|
<property name="tinyInt1isBit" value="false" />
|
||||||
|
<property name="characterEncoding" value="utf8" />
|
||||||
|
<property name="characterSetResults" value="utf8" />
|
||||||
|
<property name="yearIsDateType" value="false" />
|
||||||
|
</driver-properties>
|
||||||
|
</data-source>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
1027
.idea/dataSources/4defc9a2-e1ce-4207-91c9-549baaa59221.xml
generated
Normal file
1027
.idea/dataSources/4defc9a2-e1ce-4207-91c9-549baaa59221.xml
generated
Normal file
File diff suppressed because it is too large
Load Diff
11
.idea/libraries/spigot_1_12.xml
generated
Normal file
11
.idea/libraries/spigot_1_12.xml
generated
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<component name="libraryTable">
|
||||||
|
<library name="spigot-1.12">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://D:/Devel_Minecraft/spi_server_1.12/spigot-1.12.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES>
|
||||||
|
<root url="jar://D:/Devel_Minecraft/spi_server_1.12/spigot-1.12.jar!/" />
|
||||||
|
</SOURCES>
|
||||||
|
</library>
|
||||||
|
</component>
|
||||||
14
.idea/misc.xml
generated
Normal file
14
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<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_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
852
.idea/workspace.xml
generated
Normal file
852
.idea/workspace.xml
generated
Normal file
@@ -0,0 +1,852 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ArtifactsWorkspaceSettings">
|
||||||
|
<artifacts-to-build>
|
||||||
|
<artifact name="PrisonAPI:jar" />
|
||||||
|
</artifacts-to-build>
|
||||||
|
</component>
|
||||||
|
<component name="ChangeListManager">
|
||||||
|
<list default="true" id="5b30d845-a817-498e-8b4d-2a4df41a9b60" name="Default" comment="">
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/main/java/META-INF/MANIFEST.MF" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Policeman.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/SETUP.md" beforeDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/ru/prisonlife/PrisonAPI/PrisonAPI.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/ru/prisonlife/api/PrisonAPI.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/ru/prisonlife/PrisonAPI/template/Faction.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Faction.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/ru/prisonlife/PrisonAPI/template/Level.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Level.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/ru/prisonlife/PrisonAPI/template/Manager.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Manager.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/ru/prisonlife/PrisonAPI/template/Prisoner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Prisoner.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/ru/prisonlife/PrisonAPI/template/Score.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Score.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/ru/prisonlife/PrisonAPI/template/Stats.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Stats.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/ru/prisonlife/PrisonAPI/template/Wallet.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Wallet.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/resources/plugin.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/plugin.yml" afterDir="false" />
|
||||||
|
</list>
|
||||||
|
<ignored path="$PROJECT_DIR$/target/" />
|
||||||
|
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||||
|
<option name="TRACKING_ENABLED" value="true" />
|
||||||
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||||
|
</component>
|
||||||
|
<component name="DatabaseView">
|
||||||
|
<option name="SHOW_INTERMEDIATE" value="true" />
|
||||||
|
<option name="GROUP_DATA_SOURCES" value="true" />
|
||||||
|
<option name="GROUP_SCHEMA" value="true" />
|
||||||
|
<option name="GROUP_CONTENTS" value="false" />
|
||||||
|
<option name="SORT_POSITIONED" value="false" />
|
||||||
|
<option name="SHOW_EMPTY_GROUPS" value="false" />
|
||||||
|
<option name="AUTO_SCROLL_FROM_SOURCE" value="false" />
|
||||||
|
<option name="HIDDEN_KINDS">
|
||||||
|
<set />
|
||||||
|
</option>
|
||||||
|
<expand>
|
||||||
|
<path>
|
||||||
|
<item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
|
||||||
|
<item name="prison4life@localhost" type="feb32156:DbDataSourceImpl" />
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
|
||||||
|
<item name="prison4life@localhost" type="feb32156:DbDataSourceImpl" />
|
||||||
|
<item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
|
||||||
|
<item name="prison4life@localhost" type="feb32156:DbDataSourceImpl" />
|
||||||
|
<item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
|
||||||
|
<item name="prison4life: schema" type="c314c289:MysqlImplModel$Schema" />
|
||||||
|
</path>
|
||||||
|
</expand>
|
||||||
|
<select />
|
||||||
|
</component>
|
||||||
|
<component name="FileEditorManager">
|
||||||
|
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||||
|
<file leaf-file-name="Policeman.java" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Policeman.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="270">
|
||||||
|
<caret line="60" column="54" selection-start-line="60" selection-start-column="54" selection-end-line="60" selection-end-column="54" />
|
||||||
|
<folding>
|
||||||
|
<element signature="imports" expanded="true" />
|
||||||
|
<element signature="e#2351#2629#0" expanded="true" />
|
||||||
|
<element signature="e#2628#2629#0" expanded="true" />
|
||||||
|
<element signature="e#4512#4513#0" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="Prisoner.java" pinned="false" current-in-tab="true">
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Prisoner.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="460">
|
||||||
|
<caret line="202" column="148" selection-start-line="202" selection-start-column="148" selection-end-line="202" selection-end-column="148" />
|
||||||
|
<folding>
|
||||||
|
<element signature="imports" expanded="true" />
|
||||||
|
<element signature="e#8118#8119#0" expanded="true" />
|
||||||
|
<element signature="e#8148#8149#0" expanded="true" />
|
||||||
|
<element signature="e#8181#8182#0" expanded="true" />
|
||||||
|
<element signature="e#8210#8211#0" expanded="true" />
|
||||||
|
<element signature="e#8241#8242#0" expanded="true" />
|
||||||
|
<element signature="e#8269#8270#0" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="Manager.java" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Manager.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="115">
|
||||||
|
<caret line="122" column="33" lean-forward="true" selection-start-line="122" selection-start-column="33" selection-end-line="122" selection-end-column="33" />
|
||||||
|
<folding>
|
||||||
|
<element signature="imports" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="Faction.java" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Faction.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="-35">
|
||||||
|
<caret line="94" column="76" lean-forward="true" selection-start-line="94" selection-start-column="76" selection-end-line="94" selection-end-column="76" />
|
||||||
|
<folding>
|
||||||
|
<element signature="imports" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="PrisonAPI.java" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/PrisonAPI.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="265">
|
||||||
|
<caret line="21" column="40" selection-start-line="21" selection-start-column="40" selection-end-line="21" selection-end-column="40" />
|
||||||
|
<folding>
|
||||||
|
<element signature="imports" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="Level.java" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Level.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="255">
|
||||||
|
<caret line="21" selection-start-line="21" selection-end-line="21" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="Score.java" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Score.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="75">
|
||||||
|
<caret line="9" selection-start-line="9" selection-end-line="9" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="players_in_cages" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="das://4defc9a2-e1ce-4207-91c9-549baaa59221/schema/prison4life/table/players_in_cages">
|
||||||
|
<provider selected="true" editor-type-id="com.intellij.database.editor.DatabaseTableFileEditorProvider">
|
||||||
|
<state>
|
||||||
|
<filtering enabled="true" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="daily_respect_task" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="das://4defc9a2-e1ce-4207-91c9-549baaa59221/schema/prison4life/table/daily_respect_task">
|
||||||
|
<provider selected="true" editor-type-id="com.intellij.database.editor.DatabaseTableFileEditorProvider">
|
||||||
|
<state>
|
||||||
|
<filtering enabled="true" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="player_stats" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="das://4defc9a2-e1ce-4207-91c9-549baaa59221/schema/prison4life/table/player_stats">
|
||||||
|
<provider selected="true" editor-type-id="com.intellij.database.editor.DatabaseTableFileEditorProvider">
|
||||||
|
<state>
|
||||||
|
<filtering enabled="true" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
</leaf>
|
||||||
|
</component>
|
||||||
|
<component name="FileTemplateManagerImpl">
|
||||||
|
<option name="RECENT_TEMPLATES">
|
||||||
|
<list>
|
||||||
|
<option value="Class" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="Git.Settings">
|
||||||
|
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||||
|
</component>
|
||||||
|
<component name="IdeDocumentHistory">
|
||||||
|
<option name="CHANGED_PATHS">
|
||||||
|
<list>
|
||||||
|
<option value="$PROJECT_DIR$/src/main/java/ru/prisonlife/PrisonAPI/connect/DataBasePrison4Life.java" />
|
||||||
|
<option value="$PROJECT_DIR$/pom.xml" />
|
||||||
|
<option value="$PROJECT_DIR$/src/main/java/ru/prisonlife/PrisonAPI/template/Score.java" />
|
||||||
|
<option value="$PROJECT_DIR$/src/main/java/ru/prisonlife/PrisonAPI/template/Stats.java" />
|
||||||
|
<option value="$PROJECT_DIR$/src/main/java/ru/prisonlife/PrisonAPI/template/PrisonManager.java" />
|
||||||
|
<option value="$PROJECT_DIR$/src/main/java/ru/prisonlife/PrisonAPI/template/Faction.java" />
|
||||||
|
<option value="$PROJECT_DIR$/src/main/java/ru/prisonlife/PrisonAPI/PrisonAPI.java" />
|
||||||
|
<option value="$PROJECT_DIR$/src/main/java/ru/prisonlife/PrisonAPI/template/Wallet.java" />
|
||||||
|
<option value="$PROJECT_DIR$/src/main/java/ru/prisonlife/PrisonAPI/template/Level.java" />
|
||||||
|
<option value="$PROJECT_DIR$/src/main/java/ru/prisonlife/PrisonAPI/template/Manager.java" />
|
||||||
|
<option value="$PROJECT_DIR$/src/main/java/ru/prisonlife/PrisonAPI/template/Prisoner.java" />
|
||||||
|
<option value="$PROJECT_DIR$/SETUP.md" />
|
||||||
|
<option value="$PROJECT_DIR$/.gitignore" />
|
||||||
|
<option value="$PROJECT_DIR$/src/main/java/ru/prisonlife/PrisonAPI.java" />
|
||||||
|
<option value="$PROJECT_DIR$/src/main/resources/plugin.yml" />
|
||||||
|
<option value="$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Level.java" />
|
||||||
|
<option value="$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Policeman.java" />
|
||||||
|
<option value="$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Manager.java" />
|
||||||
|
<option value="$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Prisoner.java" />
|
||||||
|
<option value="$PROJECT_DIR$/src/main/java/ru/prisonlife/api/PrisonAPI.java" />
|
||||||
|
<option value="$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Faction.java" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
|
||||||
|
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
|
||||||
|
<component name="JsGulpfileManager">
|
||||||
|
<detection-done>true</detection-done>
|
||||||
|
<sorting>DEFINITION_ORDER</sorting>
|
||||||
|
</component>
|
||||||
|
<component name="NodePackageJsonFileManager">
|
||||||
|
<packageJsonPaths />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectFrameBounds" extendedState="6">
|
||||||
|
<option name="x" value="2552" />
|
||||||
|
<option name="y" value="-8" />
|
||||||
|
<option name="width" value="1936" />
|
||||||
|
<option name="height" value="1096" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
||||||
|
<component name="ProjectView">
|
||||||
|
<navigator proportions="" version="1">
|
||||||
|
<foldersAlwaysOnTop value="true" />
|
||||||
|
</navigator>
|
||||||
|
<panes>
|
||||||
|
<pane id="ProjectPane">
|
||||||
|
<subPane>
|
||||||
|
<expand>
|
||||||
|
<path>
|
||||||
|
<item name="PrisonAPI" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="PrisonAPI" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<item name="PrisonAPI" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="PrisonAPI" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<item name="PrisonAPI" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="PrisonAPI" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<item name="PrisonAPI" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="PrisonAPI" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<item name="PrisonAPI" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="PrisonAPI" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="api" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<item name="PrisonAPI" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="PrisonAPI" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="api" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="template" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<item name="PrisonAPI" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="PrisonAPI" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="resources" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
|
</expand>
|
||||||
|
<select />
|
||||||
|
</subPane>
|
||||||
|
</pane>
|
||||||
|
<pane id="AndroidView" />
|
||||||
|
<pane id="Scope" />
|
||||||
|
<pane id="PackagesPane" />
|
||||||
|
</panes>
|
||||||
|
</component>
|
||||||
|
<component name="PropertiesComponent">
|
||||||
|
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||||
|
<property name="aspect.path.notification.shown" value="true" />
|
||||||
|
<property name="com.intellij.database.dataSource.DataSourceTemplate" value="MySQL DDL Data Source" />
|
||||||
|
<property name="database.console.LAST_STATE" value="false" />
|
||||||
|
<property name="last_opened_file_path" value="D:/Devel_Minecraft/spi_server_1.12/spigot-1.12.jar!/" />
|
||||||
|
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
|
||||||
|
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
|
||||||
|
<property name="project.structure.last.edited" value="Artifacts" />
|
||||||
|
<property name="project.structure.proportion" value="0.15283613" />
|
||||||
|
<property name="project.structure.side.proportion" value="0.2" />
|
||||||
|
<property name="settings.editor.selected.configurable" value="reference.settingsdialog.IDE.editor.colors.Console Font" />
|
||||||
|
</component>
|
||||||
|
<component name="RecentsManager">
|
||||||
|
<key name="MoveFile.RECENT_KEYS">
|
||||||
|
<recent name="D:\Git Clones\PrisonAPI" />
|
||||||
|
</key>
|
||||||
|
<key name="CopyClassDialog.RECENTS_KEY">
|
||||||
|
<recent name="ru.prisonlife.PrisonAPI" />
|
||||||
|
<recent name="ru.prisonlife.PrisonAPI.connect" />
|
||||||
|
</key>
|
||||||
|
<key name="CopyFile.RECENT_KEYS">
|
||||||
|
<recent name="D:\Git Clones\PrisonAPI\src\main\java\ru\prisonlife\PrisonAPI\template" />
|
||||||
|
</key>
|
||||||
|
</component>
|
||||||
|
<component name="RunDashboard">
|
||||||
|
<option name="ruleStates">
|
||||||
|
<list>
|
||||||
|
<RuleState>
|
||||||
|
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
|
||||||
|
</RuleState>
|
||||||
|
<RuleState>
|
||||||
|
<option name="name" value="StatusDashboardGroupingRule" />
|
||||||
|
</RuleState>
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="RunManager">
|
||||||
|
<configuration default="true" type="Application" factoryName="Application">
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
</configuration>
|
||||||
|
<configuration default="true" type="JUnit" factoryName="JUnit">
|
||||||
|
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||||
|
<option name="ALTERNATIVE_JRE_PATH" />
|
||||||
|
<option name="PACKAGE_NAME" />
|
||||||
|
<option name="MAIN_CLASS_NAME" />
|
||||||
|
<option name="METHOD_NAME" />
|
||||||
|
<option name="TEST_OBJECT" value="class" />
|
||||||
|
<option name="VM_PARAMETERS" value="-ea" />
|
||||||
|
<option name="PARAMETERS" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
|
||||||
|
<option name="PASS_PARENT_ENVS" value="true" />
|
||||||
|
<option name="TEST_SEARCH_SCOPE">
|
||||||
|
<value defaultName="singleModule" />
|
||||||
|
</option>
|
||||||
|
<patterns />
|
||||||
|
</configuration>
|
||||||
|
<configuration default="true" type="JarApplication" factoryName="JAR Application">
|
||||||
|
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
|
||||||
|
<option name="ALTERNATIVE_JRE_PATH" value="C:\Program Files\Java\jdk1.8.0_171\jre" />
|
||||||
|
</configuration>
|
||||||
|
<configuration default="true" type="TestNG" factoryName="TestNG">
|
||||||
|
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||||
|
<option name="ALTERNATIVE_JRE_PATH" />
|
||||||
|
<option name="SUITE_NAME" />
|
||||||
|
<option name="PACKAGE_NAME" />
|
||||||
|
<option name="MAIN_CLASS_NAME" />
|
||||||
|
<option name="METHOD_NAME" />
|
||||||
|
<option name="GROUP_NAME" />
|
||||||
|
<option name="TEST_OBJECT" value="CLASS" />
|
||||||
|
<option name="VM_PARAMETERS" value="-ea" />
|
||||||
|
<option name="PARAMETERS" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
|
||||||
|
<option name="OUTPUT_DIRECTORY" />
|
||||||
|
<option name="PASS_PARENT_ENVS" value="true" />
|
||||||
|
<option name="TEST_SEARCH_SCOPE">
|
||||||
|
<value defaultName="singleModule" />
|
||||||
|
</option>
|
||||||
|
<option name="USE_DEFAULT_REPORTERS" value="false" />
|
||||||
|
<option name="PROPERTIES_FILE" />
|
||||||
|
<properties />
|
||||||
|
<listeners />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
|
<component name="SvnConfiguration">
|
||||||
|
<configuration />
|
||||||
|
</component>
|
||||||
|
<component name="TaskManager">
|
||||||
|
<task active="true" id="Default" summary="Default task">
|
||||||
|
<changelist id="5b30d845-a817-498e-8b4d-2a4df41a9b60" name="Default" comment="" />
|
||||||
|
<created>1548877621012</created>
|
||||||
|
<option name="number" value="Default" />
|
||||||
|
<option name="presentableId" value="Default" />
|
||||||
|
<updated>1548877621012</updated>
|
||||||
|
<workItem from="1548877625927" duration="18265000" />
|
||||||
|
<workItem from="1548899818883" duration="477000" />
|
||||||
|
<workItem from="1548998186396" duration="7784000" />
|
||||||
|
<workItem from="1549034758627" duration="16188000" />
|
||||||
|
<workItem from="1549109188101" duration="14390000" />
|
||||||
|
<workItem from="1549218097000" duration="5621000" />
|
||||||
|
<workItem from="1549363482679" duration="9757000" />
|
||||||
|
<workItem from="1549465369826" duration="6000" />
|
||||||
|
<workItem from="1549466026088" duration="604000" />
|
||||||
|
<workItem from="1549645588294" duration="2971000" />
|
||||||
|
<workItem from="1549722847483" duration="6549000" />
|
||||||
|
<workItem from="1549806878393" duration="1706000" />
|
||||||
|
<workItem from="1550105065590" duration="6000" />
|
||||||
|
<workItem from="1550107136105" duration="5972000" />
|
||||||
|
<workItem from="1550121359949" duration="682000" />
|
||||||
|
<workItem from="1550194944052" duration="2739000" />
|
||||||
|
<workItem from="1550314518402" duration="14586000" />
|
||||||
|
<workItem from="1550388835390" duration="10428000" />
|
||||||
|
<workItem from="1550499792736" duration="5717000" />
|
||||||
|
<workItem from="1550550937192" duration="3310000" />
|
||||||
|
<workItem from="1550591974492" duration="11585000" />
|
||||||
|
<workItem from="1550689007980" duration="1167000" />
|
||||||
|
<workItem from="1550760837075" duration="7581000" />
|
||||||
|
<workItem from="1550773505971" duration="6352000" />
|
||||||
|
<workItem from="1550821566765" duration="1055000" />
|
||||||
|
<workItem from="1550923683629" duration="9371000" />
|
||||||
|
<workItem from="1550939534358" duration="6928000" />
|
||||||
|
<workItem from="1551003100435" duration="12833000" />
|
||||||
|
</task>
|
||||||
|
<servers />
|
||||||
|
</component>
|
||||||
|
<component name="TimeTrackingManager">
|
||||||
|
<option name="totallyTimeSpent" value="184630000" />
|
||||||
|
</component>
|
||||||
|
<component name="TodoView">
|
||||||
|
<todo-panel id="selected-file">
|
||||||
|
<is-autoscroll-to-source value="true" />
|
||||||
|
</todo-panel>
|
||||||
|
<todo-panel id="all">
|
||||||
|
<are-packages-shown value="true" />
|
||||||
|
<is-autoscroll-to-source value="true" />
|
||||||
|
</todo-panel>
|
||||||
|
</component>
|
||||||
|
<component name="ToolWindowManager">
|
||||||
|
<frame x="2552" y="-8" width="1936" height="1096" extended-state="6" />
|
||||||
|
<editor active="true" />
|
||||||
|
<layout>
|
||||||
|
<window_info anchor="right" id="Palette" order="5" />
|
||||||
|
<window_info anchor="bottom" id="TODO" order="12" weight="0.32985386" />
|
||||||
|
<window_info anchor="bottom" id="Messages" order="5" weight="0.32985386" />
|
||||||
|
<window_info anchor="right" id="Palette	" order="1" />
|
||||||
|
<window_info id="Image Layers" order="5" />
|
||||||
|
<window_info anchor="right" id="Capture Analysis" order="0" />
|
||||||
|
<window_info anchor="bottom" id="Event Log" order="2" side_tool="true" weight="0.32985386" />
|
||||||
|
<window_info anchor="right" id="Maven Projects" order="4" />
|
||||||
|
<window_info anchor="bottom" id="Database Changes" order="1" show_stripe_button="false" />
|
||||||
|
<window_info anchor="bottom" id="Run" order="8" />
|
||||||
|
<window_info anchor="bottom" id="Version Control" order="4" weight="0.32985386" />
|
||||||
|
<window_info anchor="bottom" id="Terminal" order="3" weight="0.24321502" />
|
||||||
|
<window_info id="Capture Tool" order="1" />
|
||||||
|
<window_info anchor="bottom" id="Database Console" order="0" weight="0.32985386" />
|
||||||
|
<window_info id="Designer" order="0" />
|
||||||
|
<window_info active="true" content_ui="combo" id="Project" order="4" visible="true" weight="0.16257995" />
|
||||||
|
<window_info anchor="right" id="Database" order="3" visible="true" weight="0.1652452" />
|
||||||
|
<window_info id="Structure" order="6" side_tool="true" weight="0.25" />
|
||||||
|
<window_info anchor="right" id="Ant Build" order="7" weight="0.25" />
|
||||||
|
<window_info id="UI Designer" order="2" />
|
||||||
|
<window_info anchor="right" id="Theme Preview" order="2" />
|
||||||
|
<window_info anchor="bottom" id="Debug" order="9" weight="0.4" />
|
||||||
|
<window_info id="Favorites" order="3" side_tool="true" />
|
||||||
|
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="8" weight="0.25" />
|
||||||
|
<window_info anchor="bottom" id="Inspection" order="11" weight="0.4" />
|
||||||
|
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="6" type="SLIDING" weight="0.4" />
|
||||||
|
<window_info anchor="bottom" id="Message" order="6" />
|
||||||
|
<window_info anchor="bottom" id="Cvs" order="10" weight="0.25" />
|
||||||
|
<window_info anchor="bottom" id="Find" order="7" weight="0.32985386" />
|
||||||
|
</layout>
|
||||||
|
</component>
|
||||||
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
|
<option name="version" value="1" />
|
||||||
|
</component>
|
||||||
|
<component name="VcsContentAnnotationSettings">
|
||||||
|
<option name="myLimit" value="2678400000" />
|
||||||
|
</component>
|
||||||
|
<component name="antWorkspaceConfiguration">
|
||||||
|
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
|
||||||
|
<option name="FILTER_TARGETS" value="false" />
|
||||||
|
</component>
|
||||||
|
<component name="editorHistoryManager">
|
||||||
|
<entry file="file://$PROJECT_DIR$/pom.xml">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="60">
|
||||||
|
<caret line="4" column="38" lean-forward="true" selection-start-line="4" selection-start-column="38" selection-end-line="4" selection-end-column="38" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Prisoner.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="45">
|
||||||
|
<caret line="8" lean-forward="true" selection-start-line="8" selection-end-line="8" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Wallet.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="255">
|
||||||
|
<caret line="21" column="21" selection-start-line="21" selection-start-column="21" selection-end-line="21" selection-end-column="21" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Level.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="660">
|
||||||
|
<caret line="48" column="4" selection-start-line="48" selection-start-column="4" selection-end-line="57" selection-end-column="5" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Score.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="435">
|
||||||
|
<caret line="33" column="46" selection-start-line="33" selection-start-column="46" selection-end-line="33" selection-end-column="46" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Stats.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="105">
|
||||||
|
<caret line="11" column="24" selection-start-line="11" selection-start-column="24" selection-end-line="11" selection-end-column="24" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="das://1e5de0b7-db13-4bee-b34f-7794c33b5430/schema/prison4life/table/player_stats" />
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/resources/plugin.yml">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="45">
|
||||||
|
<caret line="3" column="37" lean-forward="true" selection-start-line="3" selection-start-column="37" selection-end-line="3" selection-end-column="37" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Faction.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="405">
|
||||||
|
<caret line="33" column="5" lean-forward="true" selection-start-line="33" selection-start-column="5" selection-end-line="33" selection-end-column="5" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/pom.xml">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="255">
|
||||||
|
<caret line="17" column="20" selection-start-line="17" selection-start-column="20" selection-end-line="17" selection-end-column="20" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Prisoner.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="135">
|
||||||
|
<caret line="14" column="28" selection-start-line="14" selection-start-column="28" selection-end-line="14" selection-end-column="28" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Wallet.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="45">
|
||||||
|
<caret line="3" selection-start-line="3" selection-end-line="3" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Level.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="375">
|
||||||
|
<caret line="29" column="9" selection-start-line="29" selection-start-column="9" selection-end-line="29" selection-end-column="9" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Score.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="45">
|
||||||
|
<caret line="3" selection-start-line="3" selection-end-line="3" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/PrisonAPI.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="75">
|
||||||
|
<caret line="5" selection-start-line="5" selection-end-line="5" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="das://4555cb3d-5297-48d8-a8a0-789511663af4/schema/prison/table/player_stats" />
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/resources/plugin.yml">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="15">
|
||||||
|
<caret line="1" column="14" selection-start-line="1" selection-start-column="14" selection-end-line="1" selection-end-column="14" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/pom.xml">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="255">
|
||||||
|
<caret line="17" column="20" lean-forward="true" selection-start-line="17" selection-start-column="20" selection-end-line="17" selection-end-column="20" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Prisoner.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="150">
|
||||||
|
<caret line="15" column="28" lean-forward="true" selection-start-line="15" selection-start-column="28" selection-end-line="15" selection-end-column="28" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Wallet.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="45">
|
||||||
|
<caret line="3" selection-start-line="3" selection-end-line="3" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Level.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="375">
|
||||||
|
<caret line="29" column="9" lean-forward="true" selection-start-line="29" selection-start-column="9" selection-end-line="29" selection-end-column="9" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Score.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="45">
|
||||||
|
<caret line="3" selection-start-line="3" selection-end-line="3" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/PrisonAPI.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="135">
|
||||||
|
<caret line="13" column="12" lean-forward="true" selection-start-line="13" selection-start-column="12" selection-end-line="13" selection-end-column="12" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="das://4555cb3d-5297-48d8-a8a0-789511663af4/schema/prison/table/player_stats" />
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Stats.java" />
|
||||||
|
<entry file="file://$APPLICATION_CONFIG_DIR$/consoles/db/034d1317-eab7-4582-92eb-1f1da11e8989/console.sql">
|
||||||
|
<provider selected="true" editor-type-id="text-editor" />
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$APPLICATION_CONFIG_DIR$/consoles/db/4555cb3d-5297-48d8-a8a0-789511663af4/console.sql">
|
||||||
|
<provider selected="true" editor-type-id="text-editor" />
|
||||||
|
</entry>
|
||||||
|
<entry file="das://034d1317-eab7-4582-92eb-1f1da11e8989/schema/prison4life/table/player_stats" />
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/PrisonAPI/connect/DataBasePrison4Life.java" />
|
||||||
|
<entry file="file://$APPLICATION_CONFIG_DIR$/consoles/db/1e5de0b7-db13-4bee-b34f-7794c33b5430/console.sql">
|
||||||
|
<provider selected="true" editor-type-id="text-editor" />
|
||||||
|
</entry>
|
||||||
|
<entry file="das://4555cb3d-5297-48d8-a8a0-789511663af4/schema/prison/table/player_stats" />
|
||||||
|
<entry file="das://1e5de0b7-db13-4bee-b34f-7794c33b5430/schema/prison4life/table/daily_respect_task" />
|
||||||
|
<entry file="das://1e5de0b7-db13-4bee-b34f-7794c33b5430/schema/prison4life/table/player_stats" />
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Wallet.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="180">
|
||||||
|
<caret line="18" column="32" lean-forward="true" selection-start-line="18" selection-start-column="32" selection-end-line="18" selection-end-column="32" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Stats.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="630">
|
||||||
|
<caret line="48" column="38" selection-start-line="48" selection-start-column="38" selection-end-line="48" selection-end-column="38" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/README.md" />
|
||||||
|
<entry file="file://$PROJECT_DIR$/SETUP.md" />
|
||||||
|
<entry file="file://$PROJECT_DIR$/.gitignore" />
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/resources/plugin.yml">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="45">
|
||||||
|
<caret line="3" column="33" selection-start-line="3" selection-start-column="33" selection-end-line="3" selection-end-column="33" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$APPLICATION_CONFIG_DIR$/consoles/db/4defc9a2-e1ce-4207-91c9-549baaa59221/console.sql">
|
||||||
|
<provider selected="true" editor-type-id="text-editor" />
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/pom.xml">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="75">
|
||||||
|
<caret line="5" lean-forward="true" selection-start-line="5" selection-end-line="5" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Score.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="75">
|
||||||
|
<caret line="9" selection-start-line="9" selection-end-line="9" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Policeman.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="270">
|
||||||
|
<caret line="60" column="54" selection-start-line="60" selection-start-column="54" selection-end-line="60" selection-end-column="54" />
|
||||||
|
<folding>
|
||||||
|
<element signature="imports" expanded="true" />
|
||||||
|
<element signature="e#2351#2629#0" expanded="true" />
|
||||||
|
<element signature="e#2628#2629#0" expanded="true" />
|
||||||
|
<element signature="e#4512#4513#0" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Level.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="255">
|
||||||
|
<caret line="21" selection-start-line="21" selection-end-line="21" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Manager.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="115">
|
||||||
|
<caret line="122" column="33" lean-forward="true" selection-start-line="122" selection-start-column="33" selection-end-line="122" selection-end-column="33" />
|
||||||
|
<folding>
|
||||||
|
<element signature="imports" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="das://4defc9a2-e1ce-4207-91c9-549baaa59221/schema/prison4life/table/daily_respect_task">
|
||||||
|
<provider selected="true" editor-type-id="com.intellij.database.editor.DatabaseTableFileEditorProvider">
|
||||||
|
<state>
|
||||||
|
<filtering enabled="true" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="das://4defc9a2-e1ce-4207-91c9-549baaa59221/schema/prison4life/table/players_in_cages">
|
||||||
|
<provider selected="true" editor-type-id="com.intellij.database.editor.DatabaseTableFileEditorProvider">
|
||||||
|
<state>
|
||||||
|
<filtering enabled="true" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="das://4defc9a2-e1ce-4207-91c9-549baaa59221/schema/prison4life/table/player_stats">
|
||||||
|
<provider selected="true" editor-type-id="com.intellij.database.editor.DatabaseTableFileEditorProvider">
|
||||||
|
<state>
|
||||||
|
<filtering enabled="true" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/PrisonAPI.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="265">
|
||||||
|
<caret line="21" column="40" selection-start-line="21" selection-start-column="40" selection-end-line="21" selection-end-column="40" />
|
||||||
|
<folding>
|
||||||
|
<element signature="imports" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Faction.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="-35">
|
||||||
|
<caret line="94" column="76" lean-forward="true" selection-start-line="94" selection-start-column="76" selection-end-line="94" selection-end-column="76" />
|
||||||
|
<folding>
|
||||||
|
<element signature="imports" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/main/java/ru/prisonlife/api/template/Prisoner.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="460">
|
||||||
|
<caret line="202" column="148" selection-start-line="202" selection-start-column="148" selection-end-line="202" selection-end-column="148" />
|
||||||
|
<folding>
|
||||||
|
<element signature="imports" expanded="true" />
|
||||||
|
<element signature="e#8118#8119#0" expanded="true" />
|
||||||
|
<element signature="e#8148#8149#0" expanded="true" />
|
||||||
|
<element signature="e#8181#8182#0" expanded="true" />
|
||||||
|
<element signature="e#8210#8211#0" expanded="true" />
|
||||||
|
<element signature="e#8241#8242#0" expanded="true" />
|
||||||
|
<element signature="e#8269#8270#0" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</component>
|
||||||
|
<component name="masterDetails">
|
||||||
|
<states>
|
||||||
|
<state key="ArtifactsStructureConfigurable.UI">
|
||||||
|
<settings>
|
||||||
|
<artifact-editor />
|
||||||
|
<last-edited>PrisonAPI:jar</last-edited>
|
||||||
|
<splitter-proportions>
|
||||||
|
<option name="proportions">
|
||||||
|
<list>
|
||||||
|
<option value="0.2" />
|
||||||
|
<option value="0.5" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</splitter-proportions>
|
||||||
|
</settings>
|
||||||
|
</state>
|
||||||
|
<state key="FacetStructureConfigurable.UI">
|
||||||
|
<settings>
|
||||||
|
<last-edited>No facets are configured</last-edited>
|
||||||
|
<splitter-proportions>
|
||||||
|
<option name="proportions">
|
||||||
|
<list>
|
||||||
|
<option value="0.2" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</splitter-proportions>
|
||||||
|
</settings>
|
||||||
|
</state>
|
||||||
|
<state key="GlobalLibrariesConfigurable.UI">
|
||||||
|
<settings>
|
||||||
|
<splitter-proportions>
|
||||||
|
<option name="proportions">
|
||||||
|
<list>
|
||||||
|
<option value="0.2" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</splitter-proportions>
|
||||||
|
</settings>
|
||||||
|
</state>
|
||||||
|
<state key="JdkListConfigurable.UI">
|
||||||
|
<settings>
|
||||||
|
<last-edited>1.8</last-edited>
|
||||||
|
<splitter-proportions>
|
||||||
|
<option name="proportions">
|
||||||
|
<list>
|
||||||
|
<option value="0.2" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</splitter-proportions>
|
||||||
|
</settings>
|
||||||
|
</state>
|
||||||
|
<state key="ModuleStructureConfigurable.UI">
|
||||||
|
<settings>
|
||||||
|
<last-edited>PrisonAPI</last-edited>
|
||||||
|
<splitter-proportions>
|
||||||
|
<option name="proportions">
|
||||||
|
<list>
|
||||||
|
<option value="0.2" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</splitter-proportions>
|
||||||
|
</settings>
|
||||||
|
</state>
|
||||||
|
<state key="ProjectLibrariesConfigurable.UI">
|
||||||
|
<settings>
|
||||||
|
<last-edited>spigot-1.12</last-edited>
|
||||||
|
<splitter-proportions>
|
||||||
|
<option name="proportions">
|
||||||
|
<list>
|
||||||
|
<option value="0.2" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</splitter-proportions>
|
||||||
|
</settings>
|
||||||
|
</state>
|
||||||
|
</states>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
11
README.md
11
README.md
@@ -1,11 +0,0 @@
|
|||||||
# Prison API
|
|
||||||
|
|
||||||
### Что это такое?
|
|
||||||
**PrisonAPI** - вспомогающий интерфейс для нашего режима Prison.
|
|
||||||
|
|
||||||
### Нужные ссылки
|
|
||||||
**ASANA** - [Сервис для заданий и мониторинга процесса разработки](https://app.asana.com/0/1106280250235949/list)
|
|
||||||
|
|
||||||
### Описание методов
|
|
||||||
** *
|
|
||||||
Здесь будут методы, как-нибудь
|
|
||||||
61
SETUP.md
61
SETUP.md
@@ -1,61 +0,0 @@
|
|||||||
# Настройка сброки плагина для IntellijIDEA
|
|
||||||
|
|
||||||
## Загрузка исходного кода
|
|
||||||
|
|
||||||
`git clone https://github.com/Wani4ka/PrisonAPI.git`
|
|
||||||
|
|
||||||
## Импорт в IntellijIDEA
|
|
||||||
|
|
||||||
1. New project from Existing Sources
|
|
||||||
2. В папке, которая была создана при написании команды `git clone`, выбрать pom.xml
|
|
||||||
4. Нажать Next
|
|
||||||
6. Finish
|
|
||||||
7. Если IDEA спросит про импортирование настроек, согласиться.
|
|
||||||
8. Открыть настройки IDEA - Build, Execution, Deployment - Build Tools -
|
|
||||||
Maven - Runner
|
|
||||||
9. Поставить галочку Delegate IDE build/run actions to gradle
|
|
||||||
10. Снять галочку Run in background
|
|
||||||
11. Закрыть настройки IDEA и открыть настройки проекта (Project Structure)
|
|
||||||
12. Во вкладке Project выбрать Project language level как 8
|
|
||||||
13. Закрыть настройки и собрать проект
|
|
||||||
14. jar файл плагина можно найти в папке /target.
|
|
||||||
|
|
||||||
## Отправка изменений
|
|
||||||
|
|
||||||
`git push`
|
|
||||||
|
|
||||||
Тут возможны несколько случаев:
|
|
||||||
|
|
||||||
* Во внешнем репозитории не было изменений, которые опережали бы текущие изменения.
|
|
||||||
В этом случае отправка произойдет успешно.
|
|
||||||
* Во внешнем репозитории были изменения, которых нет в локальном.
|
|
||||||
В этом случае нужно сначала получить изменения, которых нет в локальном репозитории (см. ниже).
|
|
||||||
|
|
||||||
## Получение изменений
|
|
||||||
|
|
||||||
### Проверяем текущий статус
|
|
||||||
|
|
||||||
`git status`
|
|
||||||
|
|
||||||
Если незафиксированных изменений нет, переходим к следующему шагу.
|
|
||||||
|
|
||||||
Если имеются изменения, нужно сначала их зафиксировать:
|
|
||||||
|
|
||||||
`git add .`
|
|
||||||
|
|
||||||
`git commit -m "%Сообщение%"`
|
|
||||||
|
|
||||||
### Получаем изменения
|
|
||||||
|
|
||||||
`git pull`
|
|
||||||
|
|
||||||
Тут возможны несколько случаев:
|
|
||||||
|
|
||||||
* В локальном репозитории не было изменений и в этом случае все изменения будут просто стянуты из внешнего репозитория.
|
|
||||||
* В локальном репозитории были зафиксированные изменения, которых не было во внешнем, и они не конфликтуют с
|
|
||||||
изменениями во внешнем. В этом случае Git автоматически сольет изменения и откроет редактор, где попросит ввести
|
|
||||||
название новой фиксации, которая будет результатом слияния изменений внешнего и локального репозитория.
|
|
||||||
* В локальном репозитории были зафиксированные изменения и эти изменения конфликтуют с изменениями во внешнем
|
|
||||||
репозитории. Такая ситуация возникает, когда в разных фиксациях были отредактированы одинаковые участки файлов. В этом
|
|
||||||
случае Git не может определить, какое редактирование приоритетнее и предоставляет пользователю сделать это вручную.
|
|
||||||
После исправления всех конфликтов, нужно сделать коммит, чтобы зафиксировать результат слияния.
|
|
||||||
4
pom.xml
4
pom.xml
@@ -44,8 +44,8 @@
|
|||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.0</version>
|
<version>3.8.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>${java.version}</source>
|
<source>8</source>
|
||||||
<target>${java.version}</target>
|
<target>8</target>
|
||||||
<encoding>${java.encoding}</encoding>
|
<encoding>${java.encoding}</encoding>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|||||||
3
src/main/java/META-INF/MANIFEST.MF
Normal file
3
src/main/java/META-INF/MANIFEST.MF
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
Main-Class: ru.prisonlife.api.PrisonAPI
|
||||||
|
|
||||||
@@ -1,154 +0,0 @@
|
|||||||
package ru.prisonlife.prisonapi.template;
|
|
||||||
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.sql.PreparedStatement;
|
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
import static ru.prisonlife.prisonapi.PrisonAPI.CONN;
|
|
||||||
import static ru.prisonlife.prisonapi.PrisonAPI.PLUGIN_PATH;
|
|
||||||
|
|
||||||
public class Prisoner {
|
|
||||||
|
|
||||||
private Player me;
|
|
||||||
private Level level;
|
|
||||||
private Faction faction;
|
|
||||||
private Wallet wallet;
|
|
||||||
private Stats stats;
|
|
||||||
|
|
||||||
public Prisoner(Player player) {
|
|
||||||
me = player;
|
|
||||||
level = new Level(this);
|
|
||||||
wallet = new Wallet(this);
|
|
||||||
faction = new Faction(this);
|
|
||||||
stats = new Stats(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Player getPlayer() {
|
|
||||||
return me;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Level getPrisonLevel() throws SQLException {
|
|
||||||
return this.level;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPrison() {
|
|
||||||
Location loc = me.getLocation();
|
|
||||||
for (File file : Objects.requireNonNull(new File(PLUGIN_PATH).listFiles())) {
|
|
||||||
FileConfiguration fileConfiguration = YamlConfiguration.loadConfiguration(file);
|
|
||||||
List<List<Integer>> data = new ArrayList<>();
|
|
||||||
List<Integer> fromConfig = fileConfiguration.getIntegerList("DIAGONAL_POINTS"),
|
|
||||||
min = new ArrayList<>(), max = new ArrayList<>();
|
|
||||||
int[] loc_n = {loc.getBlockX(), loc.getBlockY() - 1, loc.getBlockZ()};
|
|
||||||
data.add(fromConfig.subList(0, 3));
|
|
||||||
data.add(fromConfig.subList(3, 6));
|
|
||||||
for (int i = 0; i < 3; i++) {
|
|
||||||
min.add(Math.min(data.get(0).get(i), data.get(1).get(i)));
|
|
||||||
max.add(Math.max(data.get(0).get(i), data.get(1).get(i)));
|
|
||||||
}
|
|
||||||
int c = 0;
|
|
||||||
for (int k : loc_n) {
|
|
||||||
for (int n = 0; n < 3; n++) {
|
|
||||||
if (k >= min.get(n) && k <= max.get(n)) {
|
|
||||||
++c;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (c == 3) {
|
|
||||||
return file.getName().replace("PRISON_", "").replace(".yml", "");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return "Not Prison";
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTerritory(String type) {
|
|
||||||
String prison = getPrison();
|
|
||||||
if (!prison.equals("Not Prison") && (type.equals("name") || type.equals("owner"))) {
|
|
||||||
Location loc = me.getLocation();
|
|
||||||
FileConfiguration fileConfiguration = YamlConfiguration.loadConfiguration(new File(PLUGIN_PATH, "PRISON_" + prison + ".yml"));
|
|
||||||
try {
|
|
||||||
if (fileConfiguration.getConfigurationSection("TERRITORIES").getKeys(false).size() != 0) {
|
|
||||||
for (String terr : fileConfiguration.getConfigurationSection("TERRITORIES").getKeys(false)) {
|
|
||||||
List<List<Integer>> data = new ArrayList<>();
|
|
||||||
List<Integer> fromConfig = fileConfiguration.getIntegerList("TERRITORIES." + terr + ".DIAGONAL_POINTS"),
|
|
||||||
min = new ArrayList<>(), max = new ArrayList<>();
|
|
||||||
int[] loc_n = {loc.getBlockX(), loc.getBlockY() - 1, loc.getBlockZ()};
|
|
||||||
data.add(fromConfig.subList(0, 3));
|
|
||||||
data.add(fromConfig.subList(3, 6));
|
|
||||||
for (int i = 0; i < 3; i++) {
|
|
||||||
min.add(Math.min(data.get(0).get(i), data.get(1).get(i)));
|
|
||||||
max.add(Math.max(data.get(0).get(i), data.get(1).get(i)));
|
|
||||||
}
|
|
||||||
int c = 0;
|
|
||||||
for (int k : loc_n) {
|
|
||||||
for (int n = 0; n < 3; n++) {
|
|
||||||
if (k >= min.get(n) && k <= max.get(n)) {
|
|
||||||
++c;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (c == 3) {
|
|
||||||
return type.equals("name") ? fileConfiguration.getString("TERRITORIES." + terr + ".NAME") :
|
|
||||||
(type.equals("owner") ? fileConfiguration.getString("TERRITORIES." + terr + ".OWNER") : null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (NullPointerException z) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return "Not Territory";
|
|
||||||
}
|
|
||||||
|
|
||||||
public Faction getFaction() {
|
|
||||||
return faction;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Wallet getWallet() {
|
|
||||||
return wallet;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Stats getStats() {
|
|
||||||
return stats;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void register() throws SQLException {
|
|
||||||
PreparedStatement statement = CONN.prepareStatement("SELECT UUID FROM player_stats WHERE UUID = ?");
|
|
||||||
statement.setString(1, me.getUniqueId().toString());
|
|
||||||
|
|
||||||
try (ResultSet resultSet = statement.executeQuery()) {
|
|
||||||
if (!resultSet.next()) {
|
|
||||||
statement.close();
|
|
||||||
|
|
||||||
statement = CONN.prepareStatement(
|
|
||||||
"INSERT INTO player_stats(NAME, UUID, LEVEL, POINTS, FACTION, RESPECT, F_RANG, WALLET, " +
|
|
||||||
"G_TIME, D_BLOCKS, K_PLAYERS, K_MOBS, DEATHS) "
|
|
||||||
+ "VALUES (?, ?, 1, 0, 'NONE', 0, 0, 0, 0, 0, 0, 0, 0)");
|
|
||||||
statement.setString(1, getPlayer().getName());
|
|
||||||
statement.setString(2, me.getUniqueId().toString());
|
|
||||||
statement.executeUpdate();
|
|
||||||
statement.close();
|
|
||||||
|
|
||||||
statement = CONN.prepareStatement(
|
|
||||||
"INSERT INTO daily_respect_task(NAME, UUID, COOLDOWN) " +
|
|
||||||
"VALUES (?, ?, ?)");
|
|
||||||
statement.setString(1, getPlayer().getName());
|
|
||||||
statement.setString(2, me.getUniqueId().toString());
|
|
||||||
statement.setInt(3, (3600 * 24));
|
|
||||||
statement.executeUpdate();
|
|
||||||
|
|
||||||
level = new Level(this);
|
|
||||||
stats = new Stats(this);
|
|
||||||
wallet = new Wallet(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
statement.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
package ru.prisonlife.prisonapi;
|
package ru.prisonlife.api;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.plugin.Plugin;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
@@ -10,6 +12,8 @@ public class PrisonAPI extends JavaPlugin {
|
|||||||
|
|
||||||
public static final String PLUGIN_PATH = "plugins/PrisonManager";
|
public static final String PLUGIN_PATH = "plugins/PrisonManager";
|
||||||
|
|
||||||
|
public static final Plugin plugin = Bukkit.getPluginManager().getPlugin("PrisonAPI");
|
||||||
|
|
||||||
public enum Factions {
|
public enum Factions {
|
||||||
NONE(0), ASIANS(1), LATINOS(2), NIGGAZ(3), POLICE(4);
|
NONE(0), ASIANS(1), LATINOS(2), NIGGAZ(3), POLICE(4);
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package ru.prisonlife.prisonapi.template;
|
package ru.prisonlife.api.template;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import ru.prisonlife.prisonapi.PrisonAPI.Factions;
|
import ru.prisonlife.api.PrisonAPI;
|
||||||
|
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
@@ -9,8 +9,6 @@ import java.sql.SQLException;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static ru.prisonlife.prisonapi.PrisonAPI.CONN;
|
|
||||||
|
|
||||||
public class Faction {
|
public class Faction {
|
||||||
|
|
||||||
private Prisoner me;
|
private Prisoner me;
|
||||||
@@ -20,7 +18,7 @@ public class Faction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getType() throws SQLException {
|
public String getType() throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("SELECT FACTION FROM player_stats WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("SELECT FACTION FROM player_stats WHERE UUID = ?")) {
|
||||||
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
try (ResultSet resultSet = statement.executeQuery()) {
|
try (ResultSet resultSet = statement.executeQuery()) {
|
||||||
@@ -34,12 +32,12 @@ public class Faction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getId() throws SQLException {
|
public int getId() throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("SELECT FACTION FROM player_stats WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("SELECT FACTION FROM player_stats WHERE UUID = ?")) {
|
||||||
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
try (ResultSet resultSet = statement.executeQuery()) {
|
try (ResultSet resultSet = statement.executeQuery()) {
|
||||||
if (resultSet.next()) {
|
if (resultSet.next()) {
|
||||||
return Factions.valueOf(resultSet.getString(1)).getId();
|
return PrisonAPI.Factions.valueOf(resultSet.getString(1)).getId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -48,7 +46,7 @@ public class Faction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getRangId() throws SQLException {
|
public int getRangId() throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("SELECT F_RANG FROM player_stats WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("SELECT F_RANG FROM player_stats WHERE UUID = ?")) {
|
||||||
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
try (ResultSet resultSet = statement.executeQuery()) {
|
try (ResultSet resultSet = statement.executeQuery()) {
|
||||||
@@ -75,7 +73,7 @@ public class Faction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setRang(int value) throws SQLException {
|
public void setRang(int value) throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("UPDATE player_stats SET F_RANG = ? WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("UPDATE player_stats SET F_RANG = ? WHERE UUID = ?")) {
|
||||||
statement.setInt(1, value);
|
statement.setInt(1, value);
|
||||||
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
@@ -84,8 +82,8 @@ public class Faction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setFaction(int id) throws SQLException {
|
public void setFaction(int id) throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("UPDATE player_stats SET FACTION = ? WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("UPDATE player_stats SET FACTION = ? WHERE UUID = ?")) {
|
||||||
statement.setInt(1, Factions.valueOf(id).getId());
|
statement.setString(1, PrisonAPI.Factions.valueOf(id).name());
|
||||||
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
@@ -93,7 +91,7 @@ public class Faction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getRespect() throws SQLException {
|
public int getRespect() throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("SELECT RESPECT FROM prison4life.player_stats WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("SELECT RESPECT FROM prison4life.player_stats WHERE UUID = ?")) {
|
||||||
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
try (ResultSet resultSet = statement.executeQuery()) {
|
try (ResultSet resultSet = statement.executeQuery()) {
|
||||||
@@ -111,7 +109,7 @@ public class Faction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setRespect(int value) throws SQLException {
|
public void setRespect(int value) throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("UPDATE player_stats SET RESPECT = ? WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("UPDATE player_stats SET RESPECT = ? WHERE UUID = ?")) {
|
||||||
statement.setInt(1, value);
|
statement.setInt(1, value);
|
||||||
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
@@ -120,7 +118,7 @@ public class Faction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getRespectDailyCooldown() throws SQLException {
|
public int getRespectDailyCooldown() throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("SELECT COOLDOWN FROM daily_respect_task WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("SELECT COOLDOWN FROM daily_respect_task WHERE UUID = ?")) {
|
||||||
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
try (ResultSet resultSet = statement.executeQuery()) {
|
try (ResultSet resultSet = statement.executeQuery()) {
|
||||||
@@ -138,7 +136,7 @@ public class Faction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setRespectDailyCooldown(int value) throws SQLException {
|
public void setRespectDailyCooldown(int value) throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("UPDATE daily_respect_task SET COOLDOWN = ? WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("UPDATE daily_respect_task SET COOLDOWN = ? WHERE UUID = ?")) {
|
||||||
statement.setInt(1, value);
|
statement.setInt(1, value);
|
||||||
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package ru.prisonlife.prisonapi.template;
|
package ru.prisonlife.api.template;
|
||||||
|
|
||||||
|
import ru.prisonlife.api.PrisonAPI;
|
||||||
|
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
|
||||||
import static ru.prisonlife.prisonapi.PrisonAPI.CONN;
|
|
||||||
|
|
||||||
public class Level {
|
public class Level {
|
||||||
|
|
||||||
private Prisoner me;
|
private Prisoner me;
|
||||||
@@ -17,19 +17,11 @@ public class Level {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Score getScore() throws SQLException {
|
public Score getScore() throws SQLException {
|
||||||
//FIXME приведи в порядок метод
|
return score;
|
||||||
/*
|
|
||||||
connect();
|
|
||||||
if (resultSet.first()) {
|
|
||||||
return this.score;
|
|
||||||
}
|
|
||||||
disconnect();
|
|
||||||
*/
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getLevel() throws SQLException, NullPointerException {
|
public double getLevel() throws SQLException, NullPointerException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("SELECT LEVEL FROM player_stats WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("SELECT LEVEL FROM player_stats WHERE UUID = ?")) {
|
||||||
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
try (ResultSet resultSet = statement.executeQuery()) {
|
try (ResultSet resultSet = statement.executeQuery()) {
|
||||||
@@ -47,7 +39,7 @@ public class Level {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setLevel(double value) throws SQLException, NullPointerException {
|
public void setLevel(double value) throws SQLException, NullPointerException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("UPDATE player_stats SET LEVEL = ? WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("UPDATE player_stats SET LEVEL = ? WHERE UUID = ?")) {
|
||||||
statement.setDouble(1, getLevel() + value);
|
statement.setDouble(1, getLevel() + value);
|
||||||
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
package ru.prisonlife.prisonapi.template;
|
package ru.prisonlife.api.template;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.Location;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import ru.prisonlife.prisonapi.PrisonAPI;
|
import ru.prisonlife.api.PrisonAPI;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -10,15 +12,13 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static ru.prisonlife.prisonapi.PrisonAPI.PLUGIN_PATH;
|
|
||||||
|
|
||||||
public class Manager {
|
public class Manager {
|
||||||
|
|
||||||
private File file;
|
private File file;
|
||||||
private FileConfiguration fileConfiguration;
|
private FileConfiguration fileConfiguration;
|
||||||
|
|
||||||
public Manager(String id) {
|
public Manager(String id) {
|
||||||
file = new File(PLUGIN_PATH + "/", id);
|
file = new File(PrisonAPI.PLUGIN_PATH + "/", "PRISON_" + id + ".yml");
|
||||||
fileConfiguration = YamlConfiguration.loadConfiguration(file);
|
fileConfiguration = YamlConfiguration.loadConfiguration(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,7 +139,28 @@ public class Manager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getAllTerrs() {
|
public List<String> getAllTerrs() {
|
||||||
return new ArrayList<>(fileConfiguration.getConfigurationSection("TERRITORIES").getKeys(false));
|
List<String> terrs = new ArrayList<>();
|
||||||
|
for(String t : fileConfiguration.getConfigurationSection("TERRITORIES").getKeys(false))
|
||||||
|
terrs.add(t);
|
||||||
|
return terrs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getCages() {
|
||||||
|
List<String> cages = new ArrayList<>();
|
||||||
|
for(String c : fileConfiguration.getConfigurationSection("CAGES").getKeys(false))
|
||||||
|
cages.add(c);
|
||||||
|
return cages;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Integer> getPointCage(String cage) {
|
||||||
|
return new ArrayList<>(fileConfiguration.getIntegerList("CAGES." + cage));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void teleportInToCage(Prisoner prs, String cage) {
|
||||||
|
List<Integer> data =fileConfiguration.getIntegerList("CAGES." + cage);
|
||||||
|
Location loc = new Location(Bukkit.getWorld(fileConfiguration.getString("WORLD")),
|
||||||
|
data.get(0) + 0.5, data.get(1), data.get(2) + 0.5);
|
||||||
|
prs.getPlayer().teleport(loc);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String selectFactType(int id) {
|
public String selectFactType(int id) {
|
||||||
101
src/main/java/ru/prisonlife/api/template/Policeman.java
Normal file
101
src/main/java/ru/prisonlife/api/template/Policeman.java
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
package ru.prisonlife.api.template;
|
||||||
|
|
||||||
|
import net.md_5.bungee.api.ChatMessageType;
|
||||||
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
import ru.prisonlife.api.PrisonAPI;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
public class Policeman extends Prisoner {
|
||||||
|
|
||||||
|
private Map<Prisoner, BukkitRunnable> timeInCage = new HashMap<>();
|
||||||
|
|
||||||
|
public Policeman(Player player) {
|
||||||
|
super(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void arrestPrisoner(Prisoner prs) throws SQLException {
|
||||||
|
if(prs.getPlayer().isOnline()) {
|
||||||
|
Manager mng = new Manager(super.getPrison());
|
||||||
|
List<String> all_cages = mng.getCages();
|
||||||
|
PreparedStatement st = PrisonAPI.CONN.prepareStatement("SELECT UUID FROM player_stats WHERE UUID = ?");
|
||||||
|
st.setString(1, me.getUniqueId().toString());
|
||||||
|
try(ResultSet resultSet = st.executeQuery()) {
|
||||||
|
if(!resultSet.next()) {
|
||||||
|
int su = prs.getSuspect();
|
||||||
|
st.close();
|
||||||
|
st = PrisonAPI.CONN.prepareStatement(
|
||||||
|
"INSERT INTO players_in_cages(NAME, UUID, TIME_IN_CAGE, BLOCKS_LEFT) " +
|
||||||
|
"VALUES (?, ?, ?, ?)");
|
||||||
|
st.setString(1, getPlayer().getName());
|
||||||
|
st.setString(2, me.getUniqueId().toString());
|
||||||
|
st.setInt(3, (su * 6));
|
||||||
|
st.setInt(4, (su * 100));
|
||||||
|
st.executeUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
st.close();
|
||||||
|
prs.setSuspect(0);
|
||||||
|
mng.teleportInToCage(prs, all_cages.get(new Random().nextInt(all_cages.size())));
|
||||||
|
FileConfiguration configurationSuspect = YamlConfiguration.loadConfiguration(new File("plugins/PrisonSuspect/", "parameters.yml"));
|
||||||
|
String actionMessage = ChatColor.translateAlternateColorCodes('&',
|
||||||
|
configurationSuspect.getString("MESSAGES.ACTION_BAR_PROGRESS"));
|
||||||
|
BukkitRunnable actionBar = new BukkitRunnable() {//"MESSAGES.WHEN_PRISONER_CAN_EXIT_FROM_CAGE"
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
prs.getPlayer().spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(actionMessage));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
timeInCage.put(prs, new BukkitRunnable() {
|
||||||
|
@Override
|
||||||
|
public void run() { // Future = Пометить, что когда in Cage и вышел, то удалить поток, а если зашёл и in Cage - запустить ~ Optimize
|
||||||
|
try {
|
||||||
|
int time = 0;
|
||||||
|
String uuid = prs.getPlayer().getUniqueId().toString();
|
||||||
|
PreparedStatement st = PrisonAPI.CONN.prepareStatement(
|
||||||
|
"SELECT TIME_IN_CAGE FROM players_in_cages WHERE UUID = ?");
|
||||||
|
st.setString(1, uuid);
|
||||||
|
try(ResultSet resultSet = st.executeQuery()) {
|
||||||
|
if(resultSet.next())
|
||||||
|
time = resultSet.getInt(1);
|
||||||
|
}
|
||||||
|
if(time == 0) {
|
||||||
|
prs.getPlayer().sendMessage(ChatColor.translateAlternateColorCodes('&',
|
||||||
|
configurationSuspect.getString("MESSAGES.WHEN_PRISONER_CAN_EXIT_FROM_CAGE")));
|
||||||
|
actionBar.cancel();
|
||||||
|
cancel();
|
||||||
|
timeInCage.remove(prs);
|
||||||
|
st = PrisonAPI.CONN.prepareStatement("DELETE FROM players_in_cages WHERE UUID = ?");
|
||||||
|
st.setString(1, uuid);
|
||||||
|
st.execute();
|
||||||
|
} else {
|
||||||
|
if(prs.getPlayer().isOnline()) {
|
||||||
|
st = PrisonAPI.CONN.prepareStatement("UPDATE players_in_cages SET TIME_IN_CAGE = " + (time - 1) + " WHERE UUID = ?");
|
||||||
|
st.setString(1, uuid);
|
||||||
|
st.execute();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
st.close();
|
||||||
|
} catch(SQLException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
int m = 20 * 60;
|
||||||
|
actionBar.runTaskTimer(PrisonAPI.plugin, 5, 5);
|
||||||
|
timeInCage.get(prs).runTaskTimer(PrisonAPI.plugin, m, m);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
259
src/main/java/ru/prisonlife/api/template/Prisoner.java
Normal file
259
src/main/java/ru/prisonlife/api/template/Prisoner.java
Normal file
@@ -0,0 +1,259 @@
|
|||||||
|
package ru.prisonlife.api.template;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import ru.prisonlife.api.PrisonAPI;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public class Prisoner {
|
||||||
|
|
||||||
|
protected Player me;
|
||||||
|
protected Level level;
|
||||||
|
protected Faction faction;
|
||||||
|
protected Wallet wallet;
|
||||||
|
protected Stats stats;
|
||||||
|
|
||||||
|
public Prisoner(Player player) {
|
||||||
|
me = player;
|
||||||
|
level = new Level(this);
|
||||||
|
wallet = new Wallet(this);
|
||||||
|
faction = new Faction(this);
|
||||||
|
stats = new Stats(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Player getPlayer() {
|
||||||
|
return me;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Level getPrisonLevel() throws SQLException {
|
||||||
|
return this.level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPrison() {
|
||||||
|
Location loc = me.getLocation();
|
||||||
|
for (File file : Objects.requireNonNull(new File(PrisonAPI.PLUGIN_PATH).listFiles())) {
|
||||||
|
FileConfiguration fileConfiguration = YamlConfiguration.loadConfiguration(file);
|
||||||
|
List<List<Integer>> data = new ArrayList<>();
|
||||||
|
List<Integer> fromConfig = fileConfiguration.getIntegerList("DIAGONAL_POINTS"),
|
||||||
|
min = new ArrayList<>(), max = new ArrayList<>();
|
||||||
|
int[] loc_n = {loc.getBlockX(), loc.getBlockY() - 1, loc.getBlockZ()};
|
||||||
|
data.add(fromConfig.subList(0, 3));
|
||||||
|
data.add(fromConfig.subList(3, 6));
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
min.add(Math.min(data.get(0).get(i), data.get(1).get(i)));
|
||||||
|
max.add(Math.max(data.get(0).get(i), data.get(1).get(i)));
|
||||||
|
}
|
||||||
|
int c = 0;
|
||||||
|
for (int k : loc_n) {
|
||||||
|
for (int n = 0; n < 3; n++) {
|
||||||
|
if (k >= min.get(n) && k <= max.get(n)) {
|
||||||
|
++c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (c == 3) {
|
||||||
|
return file.getName().replace("PRISON_", "").replace(".yml", "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "Not Prison";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTerritory() {
|
||||||
|
String prison = getPrison();
|
||||||
|
if(!prison.equals("Not Prison")) {
|
||||||
|
Location loc = me.getLocation();
|
||||||
|
FileConfiguration fileConfiguration = YamlConfiguration.loadConfiguration(new File(PrisonAPI.PLUGIN_PATH, "PRISON_" + prison + ".yml"));
|
||||||
|
try {
|
||||||
|
if(fileConfiguration.getConfigurationSection("TERRITORIES").getKeys(false).size() != 0) {
|
||||||
|
for(String terr : fileConfiguration.getConfigurationSection("TERRITORIES").getKeys(false)) {
|
||||||
|
List<List<Integer>> data = new ArrayList<>();
|
||||||
|
List<Integer> fromConfig = fileConfiguration.getIntegerList("TERRITORIES." + terr + ".DIAGONAL_POINTS"),
|
||||||
|
min = new ArrayList<>(), max = new ArrayList<>();
|
||||||
|
int[] loc_n = {loc.getBlockX(), loc.getBlockY() - 1, loc.getBlockZ()};
|
||||||
|
data.add(fromConfig.subList(0, 3));
|
||||||
|
data.add(fromConfig.subList(3, 6));
|
||||||
|
for(int i = 0; i < 3; i++) {
|
||||||
|
min.add(Math.min(data.get(0).get(i), data.get(1).get(i)));
|
||||||
|
max.add(Math.max(data.get(0).get(i), data.get(1).get(i)));
|
||||||
|
}
|
||||||
|
int c = 0;
|
||||||
|
for(int k : loc_n) {
|
||||||
|
for(int n = 0; n < 3; n++) {
|
||||||
|
if(k >= min.get(n) && k <= max.get(n)) {
|
||||||
|
++c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(c == 3)
|
||||||
|
return fileConfiguration.getString("TERRITORIES." + terr + ".NAME");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (NullPointerException z) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "Not Territory";
|
||||||
|
}
|
||||||
|
|
||||||
|
public void teleportToFactionSpawn() {
|
||||||
|
try {
|
||||||
|
Prisoner ps = new Prisoner(me);
|
||||||
|
Manager mng = new Manager(getPrison());
|
||||||
|
String f = ps.getFaction().getType();
|
||||||
|
List<Integer> c = mng.getSpawnCords(ps.getFaction().getId());
|
||||||
|
if(!f.equals("NONE") && c.size() != 0)
|
||||||
|
me.teleport(new Location(Bukkit.getWorld(mng.getWorld()), c.get(0) + 0.5, c.get(1), c.get(2) + 0.5));
|
||||||
|
} catch(SQLException z) {
|
||||||
|
z.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSuspect() {
|
||||||
|
try {
|
||||||
|
try(PreparedStatement statement = PrisonAPI.CONN.prepareStatement("SELECT SUSPECT FROM player_stats WHERE UUID = ?")) {
|
||||||
|
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
|
try(ResultSet resultSet = statement.executeQuery()) {
|
||||||
|
if(resultSet.next())
|
||||||
|
return resultSet.getInt(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch(SQLException z) {
|
||||||
|
z.printStackTrace();
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuspect(int value) {
|
||||||
|
try {
|
||||||
|
try(PreparedStatement statement = PrisonAPI.CONN.prepareStatement("UPDATE player_stats SET SUSPECT = ? WHERE UUID = ?")) {
|
||||||
|
statement.setInt(1, value);
|
||||||
|
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
|
statement.executeUpdate();
|
||||||
|
}
|
||||||
|
} catch(SQLException z) {
|
||||||
|
z.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addSuspect(int value) {
|
||||||
|
int su = getSuspect() + value;
|
||||||
|
setSuspect(su);
|
||||||
|
if(su > 6)
|
||||||
|
setSuspect(su - (su - 6));
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTimeLeftInCage() {
|
||||||
|
try {
|
||||||
|
PreparedStatement statement = PrisonAPI.CONN.prepareStatement("SELECT TIME_IN_CAGE FROM players_in_cages WHERE UUID = ?");
|
||||||
|
statement.setString(1, me.getUniqueId().toString());
|
||||||
|
try(ResultSet resultSet = statement.executeQuery()) {
|
||||||
|
if(resultSet.next())
|
||||||
|
return resultSet.getInt(1);
|
||||||
|
}
|
||||||
|
} catch (SQLException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTimeLeftInCage(int value) {
|
||||||
|
try {
|
||||||
|
PreparedStatement statement = PrisonAPI.CONN.prepareStatement("SELECT TIME_IN_CAGE FROM players_in_cages WHERE UUID = ?");
|
||||||
|
statement.setString(1, me.getUniqueId().toString());
|
||||||
|
try(ResultSet resultSet = statement.executeQuery()) {
|
||||||
|
if(resultSet.next()) {
|
||||||
|
statement = PrisonAPI.CONN.prepareStatement("UPDATE players_in_cages SET TIME_IN_CAGE = ? WHERE UUID = ?");
|
||||||
|
statement.setInt(1, value);
|
||||||
|
statement.setString(2, me.getUniqueId().toString());
|
||||||
|
statement.execute();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch(SQLException z) {
|
||||||
|
z.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getBlocksLeftToBreak() {
|
||||||
|
try {
|
||||||
|
PreparedStatement statement = PrisonAPI.CONN.prepareStatement("SELECT BLOCKS_LEFT FROM players_in_cages WHERE UUID = ?");
|
||||||
|
statement.setString(1, me.getUniqueId().toString());
|
||||||
|
try(ResultSet resultSet = statement.executeQuery()) {
|
||||||
|
if(resultSet.next())
|
||||||
|
return resultSet.getInt(1);
|
||||||
|
}
|
||||||
|
} catch (SQLException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isLocateInCage() {
|
||||||
|
try {
|
||||||
|
PreparedStatement statement = PrisonAPI.CONN.prepareStatement("SELECT UUID FROM players_in_cages WHERE UUID = ?");
|
||||||
|
statement.setString(1, me.getUniqueId().toString());
|
||||||
|
try(ResultSet resultSet = statement.executeQuery()) {
|
||||||
|
if(resultSet.next())
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} catch (SQLException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Faction getFaction() {
|
||||||
|
return faction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Wallet getWallet() {
|
||||||
|
return wallet;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Stats getStats() {
|
||||||
|
return stats;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void register() throws SQLException {
|
||||||
|
PreparedStatement statement = PrisonAPI.CONN.prepareStatement("SELECT UUID FROM player_stats WHERE UUID = ?");
|
||||||
|
statement.setString(1, me.getUniqueId().toString());
|
||||||
|
|
||||||
|
try(ResultSet resultSet = statement.executeQuery()) {
|
||||||
|
if(!resultSet.next()) {
|
||||||
|
statement.close();
|
||||||
|
|
||||||
|
statement = PrisonAPI.CONN.prepareStatement(
|
||||||
|
"INSERT INTO player_stats(NAME, UUID, LEVEL, POINTS, FACTION, RESPECT, F_RANG, SUSPECT, WALLET, " +
|
||||||
|
"G_TIME, D_BLOCKS, K_PLAYERS, K_MOBS, DEATHS) "
|
||||||
|
+ "VALUES (?, ?, 1, 0, 'NONE', 0, 0, 0, 0, 0, 0, 0, 0, 0)");
|
||||||
|
statement.setString(1, getPlayer().getName());
|
||||||
|
statement.setString(2, me.getUniqueId().toString());
|
||||||
|
statement.executeUpdate();
|
||||||
|
statement.close();
|
||||||
|
|
||||||
|
statement = PrisonAPI.CONN.prepareStatement(
|
||||||
|
"INSERT INTO daily_respect_task(NAME, UUID, COOLDOWN) " +
|
||||||
|
"VALUES (?, ?, ?)");
|
||||||
|
statement.setString(1, getPlayer().getName());
|
||||||
|
statement.setString(2, me.getUniqueId().toString());
|
||||||
|
statement.setInt(3, (3600 * 24));
|
||||||
|
statement.executeUpdate();
|
||||||
|
|
||||||
|
level = new Level(this);
|
||||||
|
stats = new Stats(this);
|
||||||
|
wallet = new Wallet(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
statement.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package ru.prisonlife.prisonapi.template;
|
package ru.prisonlife.api.template;
|
||||||
|
|
||||||
|
import ru.prisonlife.api.PrisonAPI;
|
||||||
|
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
|
||||||
import static ru.prisonlife.prisonapi.PrisonAPI.CONN;
|
|
||||||
|
|
||||||
public class Score {
|
public class Score {
|
||||||
|
|
||||||
private Prisoner me;
|
private Prisoner me;
|
||||||
@@ -15,7 +15,7 @@ public class Score {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public double getPoints() throws SQLException {
|
public double getPoints() throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("SELECT POINTS FROM player_stats WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("SELECT POINTS FROM player_stats WHERE UUID = ?")) {
|
||||||
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
try (ResultSet resultSet = statement.executeQuery()) {
|
try (ResultSet resultSet = statement.executeQuery()) {
|
||||||
@@ -29,7 +29,7 @@ public class Score {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setPoints(double value) throws SQLException {
|
public void setPoints(double value) throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("UPDATE player_stats SET POINTS = ? WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("UPDATE player_stats SET POINTS = ? WHERE UUID = ?")) {
|
||||||
statement.setDouble(1, value);
|
statement.setDouble(1, value);
|
||||||
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package ru.prisonlife.prisonapi.template;
|
package ru.prisonlife.api.template;
|
||||||
|
|
||||||
|
import ru.prisonlife.api.PrisonAPI;
|
||||||
|
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
|
||||||
import static ru.prisonlife.prisonapi.PrisonAPI.CONN;
|
|
||||||
|
|
||||||
public class Stats {
|
public class Stats {
|
||||||
|
|
||||||
private Prisoner me;
|
private Prisoner me;
|
||||||
@@ -15,7 +15,7 @@ public class Stats {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setServerTime(int value) throws SQLException {
|
public void setServerTime(int value) throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("UPDATE player_stats SET G_TIME = ? WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("UPDATE player_stats SET G_TIME = ? WHERE UUID = ?")) {
|
||||||
statement.setDouble(1, value);
|
statement.setDouble(1, value);
|
||||||
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ public class Stats {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getServerTime() throws SQLException {
|
public int getServerTime() throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("SELECT G_TIME FROM player_stats WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("SELECT G_TIME FROM player_stats WHERE UUID = ?")) {
|
||||||
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
try (ResultSet resultSet = statement.executeQuery()) {
|
try (ResultSet resultSet = statement.executeQuery()) {
|
||||||
@@ -42,7 +42,7 @@ public class Stats {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setBlocks(int value) throws SQLException {
|
public void setBlocks(int value) throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("UPDATE player_stats SET B = ? WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("UPDATE player_stats SET B = ? WHERE UUID = ?")) {
|
||||||
statement.setDouble(1, value);
|
statement.setDouble(1, value);
|
||||||
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ public class Stats {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getBlocks() throws SQLException {
|
public int getBlocks() throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("SELECT D_BLOCKS FROM player_stats WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("SELECT D_BLOCKS FROM player_stats WHERE UUID = ?")) {
|
||||||
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
try (ResultSet resultSet = statement.executeQuery()) {
|
try (ResultSet resultSet = statement.executeQuery()) {
|
||||||
@@ -69,7 +69,7 @@ public class Stats {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setPlayers(int value) throws SQLException {
|
public void setPlayers(int value) throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("UPDATE player_stats SET K_PLAYERS = ? WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("UPDATE player_stats SET K_PLAYERS = ? WHERE UUID = ?")) {
|
||||||
statement.setDouble(1, value);
|
statement.setDouble(1, value);
|
||||||
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ public class Stats {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getPlayers() throws SQLException {
|
public int getPlayers() throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("SELECT K_PLAYERS FROM player_stats WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("SELECT K_PLAYERS FROM player_stats WHERE UUID = ?")) {
|
||||||
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
try (ResultSet resultSet = statement.executeQuery()) {
|
try (ResultSet resultSet = statement.executeQuery()) {
|
||||||
@@ -96,7 +96,7 @@ public class Stats {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setMobs(int value) throws SQLException {
|
public void setMobs(int value) throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("UPDATE player_stats SET K_MOBS = ? WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("UPDATE player_stats SET K_MOBS = ? WHERE UUID = ?")) {
|
||||||
statement.setDouble(1, value);
|
statement.setDouble(1, value);
|
||||||
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ public class Stats {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getMobs() throws SQLException {
|
public int getMobs() throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("SELECT K_MOBS FROM player_stats WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("SELECT K_MOBS FROM player_stats WHERE UUID = ?")) {
|
||||||
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
try (ResultSet resultSet = statement.executeQuery()) {
|
try (ResultSet resultSet = statement.executeQuery()) {
|
||||||
@@ -123,7 +123,7 @@ public class Stats {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setDeaths(int value) throws SQLException {
|
public void setDeaths(int value) throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("UPDATE player_stats SET DEATHS = ? WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("UPDATE player_stats SET DEATHS = ? WHERE UUID = ?")) {
|
||||||
statement.setDouble(1, value);
|
statement.setDouble(1, value);
|
||||||
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ public class Stats {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getDeaths() throws SQLException {
|
public int getDeaths() throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("SELECT DEATHS FROM player_stats WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("SELECT DEATHS FROM player_stats WHERE UUID = ?")) {
|
||||||
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
try (ResultSet resultSet = statement.executeQuery()) {
|
try (ResultSet resultSet = statement.executeQuery()) {
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package ru.prisonlife.prisonapi.template;
|
package ru.prisonlife.api.template;
|
||||||
|
|
||||||
|
import ru.prisonlife.api.PrisonAPI;
|
||||||
|
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
|
||||||
import static ru.prisonlife.prisonapi.PrisonAPI.CONN;
|
|
||||||
|
|
||||||
public class Wallet {
|
public class Wallet {
|
||||||
|
|
||||||
private Prisoner me;
|
private Prisoner me;
|
||||||
@@ -15,7 +15,7 @@ public class Wallet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getBalance() throws SQLException {
|
public int getBalance() throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("SELECT WALLET FROM player_stats WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("SELECT WALLET FROM player_stats WHERE UUID = ?")) {
|
||||||
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
statement.setString(1, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
try (ResultSet resultSet = statement.executeQuery()) {
|
try (ResultSet resultSet = statement.executeQuery()) {
|
||||||
@@ -37,7 +37,7 @@ public class Wallet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setBalance(int value) throws SQLException {
|
public void setBalance(int value) throws SQLException {
|
||||||
try (PreparedStatement statement = CONN.prepareStatement("UPDATE player_stats SET WALLET = ? WHERE UUID = ?")) {
|
try (PreparedStatement statement = PrisonAPI.CONN.prepareStatement("UPDATE player_stats SET WALLET = ? WHERE UUID = ?")) {
|
||||||
statement.setDouble(1, value);
|
statement.setDouble(1, value);
|
||||||
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
statement.setString(2, me.getPlayer().getUniqueId().toString());
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: PrisonAPI
|
name: PrisonAPI
|
||||||
version: ${project.version}
|
version: ${project.version}
|
||||||
authors: [Overlord_S, Prot_CN, Wani4ka, DmitriyMX]
|
authors: [Overlord_S, Prot_CN, Wani4ka, DmitriyMX]
|
||||||
main: ru.prisonlife.prisonapi.PrisonAPI
|
main: ru.prisonlife.api.PrisonAPI
|
||||||
3
target/classes/META-INF/MANIFEST.MF
Normal file
3
target/classes/META-INF/MANIFEST.MF
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
Main-Class: ru.prisonlife.api.PrisonAPI
|
||||||
|
|
||||||
4
target/classes/plugin.yml
Normal file
4
target/classes/plugin.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
name: PrisonAPI
|
||||||
|
version: ${project.version}
|
||||||
|
authors: [Overlord_S, Prot_CN, Wani4ka, DmitriyMX]
|
||||||
|
main: ru.prisonlife.api.PrisonAPI
|
||||||
BIN
target/classes/ru/prisonlife/api/PrisonAPI$Factions.class
Normal file
BIN
target/classes/ru/prisonlife/api/PrisonAPI$Factions.class
Normal file
Binary file not shown.
BIN
target/classes/ru/prisonlife/api/PrisonAPI.class
Normal file
BIN
target/classes/ru/prisonlife/api/PrisonAPI.class
Normal file
Binary file not shown.
BIN
target/classes/ru/prisonlife/api/template/Faction.class
Normal file
BIN
target/classes/ru/prisonlife/api/template/Faction.class
Normal file
Binary file not shown.
BIN
target/classes/ru/prisonlife/api/template/Level.class
Normal file
BIN
target/classes/ru/prisonlife/api/template/Level.class
Normal file
Binary file not shown.
BIN
target/classes/ru/prisonlife/api/template/Manager.class
Normal file
BIN
target/classes/ru/prisonlife/api/template/Manager.class
Normal file
Binary file not shown.
BIN
target/classes/ru/prisonlife/api/template/Policeman$1.class
Normal file
BIN
target/classes/ru/prisonlife/api/template/Policeman$1.class
Normal file
Binary file not shown.
BIN
target/classes/ru/prisonlife/api/template/Policeman$2.class
Normal file
BIN
target/classes/ru/prisonlife/api/template/Policeman$2.class
Normal file
Binary file not shown.
BIN
target/classes/ru/prisonlife/api/template/Policeman.class
Normal file
BIN
target/classes/ru/prisonlife/api/template/Policeman.class
Normal file
Binary file not shown.
BIN
target/classes/ru/prisonlife/api/template/Prisoner.class
Normal file
BIN
target/classes/ru/prisonlife/api/template/Prisoner.class
Normal file
Binary file not shown.
BIN
target/classes/ru/prisonlife/api/template/Score.class
Normal file
BIN
target/classes/ru/prisonlife/api/template/Score.class
Normal file
Binary file not shown.
BIN
target/classes/ru/prisonlife/api/template/Stats.class
Normal file
BIN
target/classes/ru/prisonlife/api/template/Stats.class
Normal file
Binary file not shown.
BIN
target/classes/ru/prisonlife/api/template/Wallet.class
Normal file
BIN
target/classes/ru/prisonlife/api/template/Wallet.class
Normal file
Binary file not shown.
Reference in New Issue
Block a user