mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-21 12:46:46 +01:00
Improved flag system.
This commit is contained in:
parent
c07634acc6
commit
be278ad781
7
.idea/sqldialects.xml
Normal file
7
.idea/sqldialects.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="SqlDialectMappings">
|
||||
<file url="file://$PROJECT_DIR$/PlotSquared" dialect="SQLite" />
|
||||
</component>
|
||||
</project>
|
||||
|
@ -12,9 +12,19 @@
|
||||
<bookmark url="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/ConsoleColors.java" line="37" mnemonic="2" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="f6aaf715-4424-4f9e-96dc-b47edea10520" name="Default" comment="Fixed yml formatting -.-">
|
||||
<list default="true" id="f6aaf715-4424-4f9e-96dc-b47edea10520" name="Default" comment="">
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/AbstractFlag.java" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/FlagManager.java" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/database/FlatFileManager.java" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/Metrics.java" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/database/SQLite.java" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/sqldialects.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/database/DBFunc.java" afterPath="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/database/DBFunc.java" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/PlotSquared/PlotSquared.iml" afterPath="$PROJECT_DIR$/PlotSquared/PlotSquared.iml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/Flag.java" afterPath="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/Flag.java" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java" afterPath="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/Settings.java" afterPath="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/Settings.java" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/WorldGenerator.java" afterPath="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/WorldGenerator.java" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/XPopulator.java" afterPath="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/XPopulator.java" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||
</list>
|
||||
<ignored path="plot_news.iws" />
|
||||
@ -38,77 +48,61 @@
|
||||
</component>
|
||||
<component name="FileEditorManager">
|
||||
<leaf>
|
||||
<file leaf-file-name="PlotWorld.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/PlotWorld.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="3604">
|
||||
<caret line="208" column="0" selection-start-line="208" selection-start-column="0" selection-end-line="208" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="PlotMain.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="-17.25" vertical-offset="3920" max-vertical-offset="13345">
|
||||
<caret line="283" column="7" selection-start-line="283" selection-start-column="7" selection-end-line="283" selection-end-column="7" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="WorldGenerator.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/WorldGenerator.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="408" max-vertical-offset="7072">
|
||||
<caret line="117" column="57" selection-start-line="117" selection-start-column="57" selection-end-line="117" selection-end-column="57" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="1364" max-vertical-offset="8364">
|
||||
<caret line="117" column="78" selection-start-line="117" selection-start-column="78" selection-end-line="117" selection-end-column="78" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="Claim.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/commands/Claim.java">
|
||||
<file leaf-file-name="Title.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/Title.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="1071" max-vertical-offset="1360">
|
||||
<caret line="63" column="35" selection-start-line="63" selection-start-column="35" selection-end-line="63" selection-end-column="35" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="170" max-vertical-offset="7089">
|
||||
<caret line="18" column="13" selection-start-line="18" selection-start-column="13" selection-end-line="18" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="PlotAPI.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/api/PlotAPI.java">
|
||||
<file leaf-file-name="Settings.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/Settings.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="221" max-vertical-offset="4590">
|
||||
<caret line="32" column="32" selection-start-line="32" selection-start-column="32" selection-end-line="32" selection-end-column="32" />
|
||||
<folding>
|
||||
<marker date="1411466293698" expanded="true" signature="5509:5619" placeholder="/**...*/" />
|
||||
<marker date="1411466293698" expanded="true" signature="5757:5861" placeholder="/**...*/" />
|
||||
<marker date="1411466293698" expanded="true" signature="5972:6099" placeholder="/**...*/" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="MainCommand.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/commands/MainCommand.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="2074" max-vertical-offset="2788">
|
||||
<caret line="122" column="38" selection-start-line="122" selection-start-column="38" selection-end-line="122" selection-end-column="38" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="170" max-vertical-offset="1105">
|
||||
<caret line="18" column="41" selection-start-line="18" selection-start-column="41" selection-end-line="18" selection-end-column="41" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="CommandPermission.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/commands/CommandPermission.java">
|
||||
<file leaf-file-name="SetBlockFast.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/SetBlockFast.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="289" max-vertical-offset="782">
|
||||
<caret line="17" column="13" selection-start-line="17" selection-start-column="13" selection-end-line="17" selection-end-column="13" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="714">
|
||||
<caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="SchematicHandler.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/SchematicHandler.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="1853" max-vertical-offset="2567">
|
||||
<caret line="125" column="32" selection-start-line="125" selection-start-column="32" selection-end-line="125" selection-end-column="32" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="RUtils.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/RUtils.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1496">
|
||||
<caret line="19" column="13" selection-start-line="19" selection-start-column="13" selection-end-line="19" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@ -117,49 +111,75 @@
|
||||
<file leaf-file-name="DBFunc.java" pinned="false" current="true" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/database/DBFunc.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.9628821" vertical-offset="3929" max-vertical-offset="10727">
|
||||
<caret line="310" column="13" selection-start-line="310" selection-start-column="13" selection-end-line="310" selection-end-column="13" />
|
||||
<state vertical-scroll-proportion="9.985025" vertical-offset="0" max-vertical-offset="11339">
|
||||
<caret line="362" column="86" selection-start-line="362" selection-start-column="86" selection-end-line="362" selection-end-column="86" />
|
||||
<folding>
|
||||
<marker date="1411469004774" expanded="true" signature="1865:1946" placeholder="INSERT INTO ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="2560:3012" placeholder="CREATE TABLE..IF..." />
|
||||
<marker date="1411469004774" expanded="true" signature="3053:3247" placeholder="CREATE TABLE..IF..." />
|
||||
<marker date="1411469004774" expanded="true" signature="3301:3506" placeholder="CREATE TABLE..IF..." />
|
||||
<marker date="1411469004774" expanded="true" signature="3556:4239" placeholder="CREATE TABLE..IF..." />
|
||||
<marker date="1411469004774" expanded="true" signature="4289:4411" placeholder="ALTER TABLE ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="6224:6276" placeholder="DELETE FROM ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="6468:6519" placeholder="DELETE FROM ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="6711:6744" placeholder="DELETE FROM ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="7497:7583" placeholder="INSERT INTO ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="7995:8099" placeholder="SELECT `id` ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="10656:10674" placeholder="ALTER TABLE ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="11335:11402" placeholder="SELECT `id`,..." />
|
||||
<marker date="1411469004774" expanded="true" signature="18738:18792" placeholder="SELECT * FRO..." />
|
||||
<marker date="1411469004774" expanded="true" signature="20377:20439" placeholder="SELECT `user..." />
|
||||
<marker date="1411469004774" expanded="true" signature="21146:21208" placeholder="SELECT `user..." />
|
||||
<marker date="1411469004774" expanded="true" signature="21837:21908" placeholder="DELETE FROM ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="22720:22788" placeholder="INSERT INTO ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="23601:23671" placeholder="DELETE FROM ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="24484:24551" placeholder="INSERT INTO ..." />
|
||||
<element signature="e#0#27100#0" expanded="true" />
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#13075#13106#0" expanded="true" />
|
||||
<element signature="e#13163#13178#0" expanded="true" />
|
||||
<element signature="e#16136#16150#0" expanded="true" />
|
||||
<element signature="e#20582#20598#0" expanded="true" />
|
||||
<element signature="e#22244#22250#0" expanded="true" />
|
||||
<element signature="e#23008#23014#0" expanded="true" />
|
||||
<marker date="1411491678199" expanded="true" signature="1109:1180" placeholder="UPDATE `plot..." />
|
||||
<marker date="1411491678199" expanded="true" signature="1874:1955" placeholder="INSERT INTO ..." />
|
||||
<marker date="1411491678199" expanded="true" signature="2677:3257" placeholder="CREATE TABLE..plot..." />
|
||||
<marker date="1411491678199" expanded="true" signature="3309:3550" placeholder="CREATE TABLE..plot_denied..." />
|
||||
<marker date="1411491678199" expanded="true" signature="3615:4490" placeholder="CREATE TABLE..plot_settings..." />
|
||||
<marker date="1411491678199" expanded="true" signature="4555:4677" placeholder="ALTER TABLE `plot_settings`..." />
|
||||
<marker date="1411491678199" expanded="true" signature="4775:5210" placeholder="CREATE TABLE..plot..." />
|
||||
<marker date="1411491678199" expanded="true" signature="5283:5481" placeholder="CREATE TABLE..plot_denied..." />
|
||||
<marker date="1411491678199" expanded="true" signature="5546:6315" placeholder="CREATE TABLE..plot_settings..." />
|
||||
<marker date="1411491678199" expanded="true" signature="8118:8170" placeholder="DELETE FROM ..." />
|
||||
<marker date="1411491678199" expanded="true" signature="8362:8413" placeholder="DELETE FROM ..." />
|
||||
<marker date="1411491678199" expanded="true" signature="8605:8638" placeholder="DELETE FROM ..." />
|
||||
<marker date="1411491678199" expanded="true" signature="9398:9484" placeholder="INSERT INTO ..." />
|
||||
<marker date="1411491678199" expanded="true" signature="9897:10001" placeholder="SELECT `id` ..plot..." />
|
||||
<marker date="1411491678199" expanded="true" signature="11895:12553" placeholder="UPDATE `plot..." />
|
||||
<marker date="1411491678199" expanded="true" signature="12635:12653" placeholder="ALTER TABLE `plot`..." />
|
||||
<marker date="1411491678199" expanded="true" signature="13321:13388" placeholder="SELECT `id`,..plot..." />
|
||||
<marker date="1411491678199" expanded="true" signature="16891:16953" placeholder="UPDATE `plot..." />
|
||||
<marker date="1411491678199" expanded="true" signature="17953:18016" placeholder="UPDATE `plot..." />
|
||||
<marker date="1411491678199" expanded="true" signature="18836:18900" placeholder="UPDATE `plot..." />
|
||||
<marker date="1411491678199" expanded="true" signature="19937:20004" placeholder="UPDATE `plot..." />
|
||||
<marker date="1411491678199" expanded="true" signature="20703:20757" placeholder="SELECT * FRO..plot_settings..." />
|
||||
<marker date="1411491678199" expanded="true" signature="22355:22417" placeholder="SELECT `user..plot_denied..." />
|
||||
<marker date="1411491678199" expanded="true" signature="23157:23219" placeholder="SELECT `user..plot_helpers..." />
|
||||
<marker date="1411491678199" expanded="true" signature="23942:24013" placeholder="DELETE FROM ..." />
|
||||
<marker date="1411491678199" expanded="true" signature="24820:24888" placeholder="INSERT INTO ..." />
|
||||
<marker date="1411491678199" expanded="true" signature="25695:25765" placeholder="DELETE FROM ..." />
|
||||
<marker date="1411491678199" expanded="true" signature="26572:26639" placeholder="INSERT INTO ..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="Schematic.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/commands/Schematic.java">
|
||||
<file leaf-file-name="ReflectionUtils.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/ReflectionUtils.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="986" max-vertical-offset="1292">
|
||||
<caret line="58" column="69" selection-start-line="58" selection-start-column="69" selection-end-line="58" selection-end-column="69" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="7531">
|
||||
<caret line="17" column="13" selection-start-line="17" selection-start-column="13" selection-end-line="17" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="Helpers.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/commands/Helpers.java">
|
||||
<file leaf-file-name="PWE.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/PWE.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="867" max-vertical-offset="2057">
|
||||
<caret line="51" column="56" selection-start-line="51" selection-start-column="56" selection-end-line="51" selection-end-column="56" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1037">
|
||||
<caret line="19" column="13" selection-start-line="19" selection-start-column="13" selection-end-line="19" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="XPopulator.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/XPopulator.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="720" max-vertical-offset="4964">
|
||||
<caret line="81" column="29" selection-start-line="81" selection-start-column="29" selection-end-line="81" selection-end-column="29" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@ -191,7 +211,14 @@
|
||||
<option value="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/PlotWorld.java" />
|
||||
<option value="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/commands/Claim.java" />
|
||||
<option value="$PROJECT_DIR$/PlotSquared/src/plugin.yml" />
|
||||
<option value="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/XPopulator.java" />
|
||||
<option value="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/database/SQLite.java" />
|
||||
<option value="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/Settings.java" />
|
||||
<option value="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/Metrics.java" />
|
||||
<option value="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java" />
|
||||
<option value="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/AbstractFlag.java" />
|
||||
<option value="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/Flag.java" />
|
||||
<option value="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/FlagManager.java" />
|
||||
<option value="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/WorldGenerator.java" />
|
||||
<option value="$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/database/DBFunc.java" />
|
||||
</list>
|
||||
@ -234,7 +261,6 @@
|
||||
<sortByType />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="PackagesPane" />
|
||||
<pane id="Scope" />
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
@ -308,6 +334,32 @@
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="plot_news" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="PlotSquared" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="src" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="com" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="plot" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="listeners" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="plot_news" />
|
||||
@ -414,6 +466,7 @@
|
||||
</PATH>
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="PackagesPane" />
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
@ -440,10 +493,12 @@
|
||||
<property name="GenerateAntBuildDialog.inclineRuntiemClasspath" value="false" />
|
||||
<property name="GenerateAntBuildDialog.generateIdeaHomeProperty" value="false" />
|
||||
<property name="GenerateAntBuildDialog.outputFileNameProperty" value="plotsquared" />
|
||||
<property name="options.lastSelected" value="preferences.pluginManager" />
|
||||
<property name="options.lastSelected" value="SQL Dialects" />
|
||||
<property name="options.splitter.main.proportions" value="0.3" />
|
||||
<property name="options.splitter.details.proportions" value="0.2" />
|
||||
<property name="options.searchVisible" value="true" />
|
||||
<property name="OverrideImplement.combined" value="true" />
|
||||
<property name="OverrideImplement.overriding.sorted" value="false" />
|
||||
</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
@ -467,14 +522,10 @@
|
||||
<option name="mySupportsDeletion" value="false" />
|
||||
<option name="myCanBeAbsent" value="false" />
|
||||
<option name="myId" value="UPDATED" />
|
||||
<PATH vcs="Git" revision="">$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/C.java</PATH>
|
||||
<PATH vcs="Git" revision="">$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/Flag.java</PATH>
|
||||
<PATH vcs="Git" revision="">$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/PlotHelper.java</PATH>
|
||||
<PATH vcs="Git" revision="">$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java</PATH>
|
||||
<PATH vcs="Git" revision="">$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/api/PlotAPI.java</PATH>
|
||||
<PATH vcs="Git" revision="">$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/commands/Claim.java</PATH>
|
||||
<PATH vcs="Git" revision="">$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/commands/Set.java</PATH>
|
||||
<PATH vcs="Git" revision="">$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/database/DBFunc.java</PATH>
|
||||
<PATH vcs="Git" revision="">$PROJECT_DIR$/.gitignore</PATH>
|
||||
<PATH vcs="Git" revision="">$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/PlotWorld.java</PATH>
|
||||
<PATH vcs="Git" revision="">$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/WorldGenerator.java</PATH>
|
||||
<PATH vcs="Git" revision="">$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/XPopulator.java</PATH>
|
||||
</FILE-GROUP>
|
||||
<FILE-GROUP>
|
||||
<option name="myUpdateName" value="Created" />
|
||||
@ -482,6 +533,8 @@
|
||||
<option name="mySupportsDeletion" value="false" />
|
||||
<option name="myCanBeAbsent" value="false" />
|
||||
<option name="myId" value="CREATED" />
|
||||
<PATH vcs="Git" revision="">$PROJECT_DIR$/.classpath</PATH>
|
||||
<PATH vcs="Git" revision="">$PROJECT_DIR$/.project</PATH>
|
||||
</FILE-GROUP>
|
||||
<FILE-GROUP>
|
||||
<option name="myUpdateName" value="Deleted" />
|
||||
@ -715,7 +768,8 @@
|
||||
<workItem from="1411412287455" duration="33000" />
|
||||
<workItem from="1411412344326" duration="2559000" />
|
||||
<workItem from="1411428266938" duration="702000" />
|
||||
<workItem from="1411458289707" duration="4285000" />
|
||||
<workItem from="1411458289707" duration="5043000" />
|
||||
<workItem from="1411478912746" duration="8214000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="First Commit">
|
||||
<created>1411382351159</created>
|
||||
@ -773,36 +827,40 @@
|
||||
<created>1411466605452</created>
|
||||
<updated>1411466605452</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="15" />
|
||||
<task id="LOCAL-00015" summary="Attempt to fix db, might not always work. We got to add a warning to spigot.">
|
||||
<created>1411469097893</created>
|
||||
<updated>1411469097893</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="16" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="totallyTimeSpent" value="21807000" />
|
||||
<option name="totallyTimeSpent" value="30779000" />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="-6" y="-6" width="1932" height="1062" extended-state="6" />
|
||||
<editor active="true" />
|
||||
<layout>
|
||||
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="14" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Remote Host" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Remote Host" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3291536" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3291536" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3291536" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3291536" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3291536" sideWeight="0.5" order="13" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3291536" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="IntelliGuard" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="IntelliGuard" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="12" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||
@ -837,7 +895,8 @@
|
||||
<MESSAGE value="Fixed yml formatting -.-" />
|
||||
<MESSAGE value="Small fixes" />
|
||||
<MESSAGE value="I like pretty configs." />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="I like pretty configs." />
|
||||
<MESSAGE value="Attempt to fix db, might not always work. We got to add a warning to spigot." />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Attempt to fix db, might not always work. We got to add a warning to spigot." />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
@ -849,128 +908,6 @@
|
||||
<option name="FILTER_TARGETS" value="false" />
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/commands/Clear.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="340" max-vertical-offset="748">
|
||||
<caret line="20" column="13" selection-start-line="20" selection-start-column="13" selection-end-line="20" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/commands/Claim.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="1088" max-vertical-offset="1241">
|
||||
<caret line="64" column="35" selection-start-line="64" selection-start-column="35" selection-end-line="64" selection-end-column="35" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/api/PlotAPI.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="306" max-vertical-offset="4046">
|
||||
<caret line="77" column="7" selection-start-line="77" selection-start-column="7" selection-end-line="287" selection-end-column="0" />
|
||||
<folding>
|
||||
<marker date="1411466293698" expanded="true" signature="5509:5619" placeholder="/**...*/" />
|
||||
<marker date="1411466293698" expanded="true" signature="5757:5861" placeholder="/**...*/" />
|
||||
<marker date="1411466293698" expanded="true" signature="5972:6099" placeholder="/**...*/" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/WorldGenerator.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="1445" max-vertical-offset="7072">
|
||||
<caret line="85" column="73" selection-start-line="85" selection-start-column="73" selection-end-line="85" selection-end-column="73" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/PlotId.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="629">
|
||||
<caret line="4" column="13" selection-start-line="4" selection-start-column="13" selection-end-line="4" selection-end-column="13" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/SchematicHandler.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="2125" max-vertical-offset="3026">
|
||||
<caret line="125" column="32" selection-start-line="125" selection-start-column="32" selection-end-line="125" selection-end-column="32" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/Title.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="306" max-vertical-offset="7514">
|
||||
<caret line="18" column="13" selection-start-line="18" selection-start-column="13" selection-end-line="18" selection-end-column="13" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/PlayerFunctions.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="4097">
|
||||
<caret line="142" column="5" selection-start-line="142" selection-start-column="5" selection-end-line="142" selection-end-column="5" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="10829" max-vertical-offset="12257">
|
||||
<caret line="637" column="48" selection-start-line="637" selection-start-column="48" selection-end-line="637" selection-end-column="48" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/PlotWorld.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="2788" max-vertical-offset="2941">
|
||||
<caret line="164" column="11" selection-start-line="164" selection-start-column="11" selection-end-line="164" selection-end-column="11" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/commands/Clear.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="340" max-vertical-offset="748">
|
||||
<caret line="20" column="13" selection-start-line="20" selection-start-column="13" selection-end-line="20" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/commands/Claim.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="1088" max-vertical-offset="1241">
|
||||
<caret line="64" column="35" selection-start-line="64" selection-start-column="35" selection-end-line="64" selection-end-column="35" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/api/PlotAPI.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="306" max-vertical-offset="4046">
|
||||
<caret line="37" column="22" selection-start-line="0" selection-start-column="0" selection-end-line="287" selection-end-column="0" />
|
||||
<folding>
|
||||
<marker date="1411466293698" expanded="true" signature="5509:5619" placeholder="/**...*/" />
|
||||
<marker date="1411466293698" expanded="true" signature="5757:5861" placeholder="/**...*/" />
|
||||
<marker date="1411466293698" expanded="true" signature="5972:6099" placeholder="/**...*/" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/WorldGenerator.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="1445" max-vertical-offset="7072">
|
||||
<caret line="85" column="73" selection-start-line="85" selection-start-column="73" selection-end-line="85" selection-end-column="73" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/.idea/compiler.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="493">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/.idea/encodings.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="85" max-vertical-offset="187">
|
||||
@ -1058,14 +995,14 @@
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/README.md">
|
||||
<provider editor-type-id="MarkdownPreviewEditor">
|
||||
<state />
|
||||
</provider>
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.05654102" vertical-offset="0" max-vertical-offset="902">
|
||||
<caret line="3" column="0" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
<provider editor-type-id="MarkdownPreviewEditor">
|
||||
<state />
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/.idea/encodings.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
@ -1095,20 +1032,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/Settings.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1071">
|
||||
<caret line="22" column="13" selection-start-line="22" selection-start-column="13" selection-end-line="22" selection-end-column="13" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/Plot.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.3327787" vertical-offset="4" max-vertical-offset="3927">
|
||||
<caret line="27" column="13" selection-start-line="27" selection-start-column="13" selection-end-line="27" selection-end-column="13" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/ConsoleColors.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="136" max-vertical-offset="1598">
|
||||
@ -1124,13 +1047,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/Title.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="7089">
|
||||
<caret line="18" column="13" selection-start-line="18" selection-start-column="13" selection-end-line="18" selection-end-column="13" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/PlotId.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="629">
|
||||
@ -1138,27 +1054,10 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/SchematicHandler.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="1700" max-vertical-offset="2601">
|
||||
<caret line="125" column="32" selection-start-line="125" selection-start-column="32" selection-end-line="125" selection-end-column="32" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/commands/Clear.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="527">
|
||||
<caret line="20" column="13" selection-start-line="20" selection-start-column="13" selection-end-line="20" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/commands/Claim.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="1071" max-vertical-offset="1360">
|
||||
<caret line="63" column="35" selection-start-line="63" selection-start-column="35" selection-end-line="63" selection-end-column="35" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -1198,7 +1097,6 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.3476857" vertical-offset="0" max-vertical-offset="929">
|
||||
<caret line="19" column="2" selection-start-line="19" selection-start-column="2" selection-end-line="19" selection-end-column="2" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -1207,64 +1105,289 @@
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="221" max-vertical-offset="4590">
|
||||
<caret line="32" column="32" selection-start-line="32" selection-start-column="32" selection-end-line="32" selection-end-column="32" />
|
||||
<folding>
|
||||
<marker date="1411466293698" expanded="true" signature="5509:5619" placeholder="/**...*/" />
|
||||
<marker date="1411466293698" expanded="true" signature="5757:5861" placeholder="/**...*/" />
|
||||
<marker date="1411466293698" expanded="true" signature="5972:6099" placeholder="/**...*/" />
|
||||
<marker date="1411466293698" expanded="true" signature="-1:-1" placeholder="/**...*/" />
|
||||
<marker date="1411466293698" expanded="true" signature="-1:-1" placeholder="/**...*/" />
|
||||
<marker date="1411466293698" expanded="true" signature="-1:-1" placeholder="/**...*/" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/database/FlatFileManager.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="221">
|
||||
<caret line="5" column="28" selection-start-line="5" selection-start-column="28" selection-end-line="5" selection-end-column="28" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/database/Database.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1700">
|
||||
<caret line="15" column="22" selection-start-line="15" selection-start-column="22" selection-end-line="15" selection-end-column="22" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="false" />
|
||||
<element signature="e#528#529#0" expanded="false" />
|
||||
<element signature="e#552#553#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/database/MySQL.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="907" max-vertical-offset="1836">
|
||||
<caret line="110" column="5" selection-start-line="65" selection-start-column="0" selection-end-line="110" selection-end-column="5" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="false" />
|
||||
<element signature="e#1594#1595#0" expanded="false" />
|
||||
<element signature="e#1652#1653#0" expanded="false" />
|
||||
<element signature="e#1701#1702#0" expanded="false" />
|
||||
<element signature="e#1725#1726#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/database/SQLite.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="635" max-vertical-offset="1768">
|
||||
<caret line="101" column="5" selection-start-line="101" selection-start-column="5" selection-end-line="101" selection-end-column="5" />
|
||||
<folding>
|
||||
<element signature="e#1642#1643#0" expanded="false" />
|
||||
<element signature="e#1709#1710#0" expanded="false" />
|
||||
<element signature="e#1764#1765#0" expanded="false" />
|
||||
<element signature="e#1797#1798#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="-17.25" vertical-offset="3920" max-vertical-offset="13345">
|
||||
<caret line="283" column="7" selection-start-line="283" selection-start-column="7" selection-end-line="283" selection-end-column="7" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="1785" max-vertical-offset="14110">
|
||||
<caret line="32" column="41" selection-start-line="32" selection-start-column="41" selection-end-line="32" selection-end-column="41" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/commands/Claim.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="559" max-vertical-offset="1173">
|
||||
<caret line="63" column="35" selection-start-line="63" selection-start-column="35" selection-end-line="63" selection-end-column="35" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/Lag.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1343">
|
||||
<caret line="16" column="13" selection-start-line="16" selection-start-column="13" selection-end-line="16" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/Plot.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="1275" max-vertical-offset="3808">
|
||||
<caret line="91" column="5" selection-start-line="91" selection-start-column="5" selection-end-line="91" selection-end-column="5" />
|
||||
<folding>
|
||||
<element signature="e#655#683#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/Metrics.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="11509">
|
||||
<caret line="29" column="0" selection-start-line="29" selection-start-column="0" selection-end-line="29" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#19779#19780#0" expanded="true" />
|
||||
<element signature="e#19834#19835#0" expanded="true" />
|
||||
<element signature="e#20285#20294#0" expanded="true" />
|
||||
<element signature="e#20340#20341#0" expanded="true" />
|
||||
<element signature="e#20380#20381#0" expanded="true" />
|
||||
<element signature="e#20519#20520#0" expanded="true" />
|
||||
<element signature="e#20554#20555#0" expanded="true" />
|
||||
<element signature="e#20778#20779#0" expanded="true" />
|
||||
<element signature="e#20823#20824#0" expanded="true" />
|
||||
<element signature="e#21024#21025#0" expanded="true" />
|
||||
<element signature="e#21072#21073#0" expanded="true" />
|
||||
<element signature="e#21311#21312#0" expanded="true" />
|
||||
<element signature="e#21379#21380#0" expanded="true" />
|
||||
<element signature="e#21430#21431#0" expanded="true" />
|
||||
<element signature="e#21476#21477#0" expanded="true" />
|
||||
<element signature="e#22236#22237#0" expanded="true" />
|
||||
<element signature="e#22275#22276#0" expanded="true" />
|
||||
<element signature="e#22501#22502#0" expanded="true" />
|
||||
<element signature="e#22541#22542#0" expanded="true" />
|
||||
<element signature="e#23209#23210#0" expanded="true" />
|
||||
<element signature="e#23244#23245#0" expanded="true" />
|
||||
<element signature="e#23421#23422#0" expanded="true" />
|
||||
<element signature="e#23478#23479#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/Flag.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="799">
|
||||
<caret line="18" column="61" selection-start-line="18" selection-start-column="61" selection-end-line="18" selection-end-column="61" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/AbstractFlag.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="408">
|
||||
<caret line="8" column="0" selection-start-line="8" selection-start-column="0" selection-end-line="8" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="e#186#187#0" expanded="true" />
|
||||
<element signature="e#216#217#0" expanded="true" />
|
||||
<element signature="e#246#247#0" expanded="true" />
|
||||
<element signature="e#277#278#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/FlagManager.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="15" max-vertical-offset="867">
|
||||
<caret line="31" column="44" selection-start-line="31" selection-start-column="44" selection-end-line="31" selection-end-column="44" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#416#417#0" expanded="true" />
|
||||
<element signature="e#444#445#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/PlotSettings.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="2482">
|
||||
<caret line="23" column="13" selection-start-line="23" selection-start-column="13" selection-end-line="23" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/PlotWorld.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="3604">
|
||||
<caret line="208" column="0" selection-start-line="208" selection-start-column="0" selection-end-line="208" selection-end-column="0" />
|
||||
<caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/XPopulator.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="567" max-vertical-offset="4964">
|
||||
<caret line="81" column="29" selection-start-line="81" selection-start-column="29" selection-end-line="81" selection-end-column="29" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/WorldGenerator.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="408" max-vertical-offset="7072">
|
||||
<caret line="117" column="57" selection-start-line="117" selection-start-column="57" selection-end-line="117" selection-end-column="57" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="1364" max-vertical-offset="8364">
|
||||
<caret line="117" column="78" selection-start-line="117" selection-start-column="78" selection-end-line="117" selection-end-column="78" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/Title.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="170" max-vertical-offset="7089">
|
||||
<caret line="18" column="13" selection-start-line="18" selection-start-column="13" selection-end-line="18" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/Settings.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1105">
|
||||
<caret line="18" column="41" selection-start-line="18" selection-start-column="41" selection-end-line="18" selection-end-column="41" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/SetBlockFast.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="714">
|
||||
<caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/SchematicHandler.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="1700" max-vertical-offset="2601">
|
||||
<caret line="125" column="32" selection-start-line="125" selection-start-column="32" selection-end-line="125" selection-end-column="32" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/RUtils.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1496">
|
||||
<caret line="19" column="13" selection-start-line="19" selection-start-column="13" selection-end-line="19" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/ReflectionUtils.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="7531">
|
||||
<caret line="17" column="13" selection-start-line="17" selection-start-column="13" selection-end-line="17" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/PWE.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1037">
|
||||
<caret line="19" column="13" selection-start-line="19" selection-start-column="13" selection-end-line="19" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/PlotSquared/src/com/intellectualcrafters/plot/database/DBFunc.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.9628821" vertical-offset="3929" max-vertical-offset="10727">
|
||||
<caret line="310" column="13" selection-start-line="310" selection-start-column="13" selection-end-line="310" selection-end-column="13" />
|
||||
<state vertical-scroll-proportion="9.985025" vertical-offset="0" max-vertical-offset="11339">
|
||||
<caret line="362" column="86" selection-start-line="362" selection-start-column="86" selection-end-line="362" selection-end-column="86" />
|
||||
<folding>
|
||||
<marker date="1411469004774" expanded="true" signature="1865:1946" placeholder="INSERT INTO ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="2560:3012" placeholder="CREATE TABLE..IF..." />
|
||||
<marker date="1411469004774" expanded="true" signature="3053:3247" placeholder="CREATE TABLE..IF..." />
|
||||
<marker date="1411469004774" expanded="true" signature="3301:3506" placeholder="CREATE TABLE..IF..." />
|
||||
<marker date="1411469004774" expanded="true" signature="3556:4239" placeholder="CREATE TABLE..IF..." />
|
||||
<marker date="1411469004774" expanded="true" signature="4289:4411" placeholder="ALTER TABLE ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="6224:6276" placeholder="DELETE FROM ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="6468:6519" placeholder="DELETE FROM ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="6711:6744" placeholder="DELETE FROM ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="7497:7583" placeholder="INSERT INTO ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="7995:8099" placeholder="SELECT `id` ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="10656:10674" placeholder="ALTER TABLE ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="11335:11402" placeholder="SELECT `id`,..." />
|
||||
<marker date="1411469004774" expanded="true" signature="18738:18792" placeholder="SELECT * FRO..." />
|
||||
<marker date="1411469004774" expanded="true" signature="20377:20439" placeholder="SELECT `user..." />
|
||||
<marker date="1411469004774" expanded="true" signature="21146:21208" placeholder="SELECT `user..." />
|
||||
<marker date="1411469004774" expanded="true" signature="21837:21908" placeholder="DELETE FROM ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="22720:22788" placeholder="INSERT INTO ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="23601:23671" placeholder="DELETE FROM ..." />
|
||||
<marker date="1411469004774" expanded="true" signature="24484:24551" placeholder="INSERT INTO ..." />
|
||||
<element signature="e#0#27100#0" expanded="true" />
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#13075#13106#0" expanded="true" />
|
||||
<element signature="e#13163#13178#0" expanded="true" />
|
||||
<element signature="e#16136#16150#0" expanded="true" />
|
||||
<element signature="e#20582#20598#0" expanded="true" />
|
||||
<element signature="e#22244#22250#0" expanded="true" />
|
||||
<element signature="e#23008#23014#0" expanded="true" />
|
||||
<marker date="1411491678199" expanded="true" signature="1109:1180" placeholder="UPDATE `plot..." />
|
||||
<marker date="1411491678199" expanded="true" signature="1874:1955" placeholder="INSERT INTO ..." />
|
||||
<marker date="1411491678199" expanded="true" signature="2677:3257" placeholder="CREATE TABLE..plot..." />
|
||||
<marker date="1411491678199" expanded="true" signature="3309:3550" placeholder="CREATE TABLE..plot_denied..." />
|
||||
<marker date="1411491678199" expanded="true" signature="3615:4490" placeholder="CREATE TABLE..plot_settings..." />
|
||||
<marker date="1411491678199" expanded="true" signature="4555:4677" placeholder="ALTER TABLE `plot_settings`..." />
|
||||
<marker date="1411491678199" expanded="true" signature="4775:5210" placeholder="CREATE TABLE..plot..." />
|
||||
<marker date="1411491678199" expanded="true" signature="5283:5481" placeholder="CREATE TABLE..plot_denied..." />
|
||||
<marker date="1411491678199" expanded="true" signature="5546:6315" placeholder="CREATE TABLE..plot_settings..." />
|
||||
<marker date="1411491678199" expanded="true" signature="8118:8170" placeholder="DELETE FROM ..." />
|
||||
<marker date="1411491678199" expanded="true" signature="8362:8413" placeholder="DELETE FROM ..." />
|
||||
<marker date="1411491678199" expanded="true" signature="8605:8638" placeholder="DELETE FROM ..." />
|
||||
<marker date="1411491678199" expanded="true" signature="9398:9484" placeholder="INSERT INTO ..." />
|
||||
<marker date="1411491678199" expanded="true" signature="9897:10001" placeholder="SELECT `id` ..plot..." />
|
||||
<marker date="1411491678199" expanded="true" signature="11895:12553" placeholder="UPDATE `plot..." />
|
||||
<marker date="1411491678199" expanded="true" signature="12635:12653" placeholder="ALTER TABLE `plot`..." />
|
||||
<marker date="1411491678199" expanded="true" signature="13321:13388" placeholder="SELECT `id`,..plot..." />
|
||||
<marker date="1411491678199" expanded="true" signature="16891:16953" placeholder="UPDATE `plot..." />
|
||||
<marker date="1411491678199" expanded="true" signature="17953:18016" placeholder="UPDATE `plot..." />
|
||||
<marker date="1411491678199" expanded="true" signature="18836:18900" placeholder="UPDATE `plot..." />
|
||||
<marker date="1411491678199" expanded="true" signature="19937:20004" placeholder="UPDATE `plot..." />
|
||||
<marker date="1411491678199" expanded="true" signature="20703:20757" placeholder="SELECT * FRO..plot_settings..." />
|
||||
<marker date="1411491678199" expanded="true" signature="22355:22417" placeholder="SELECT `user..plot_denied..." />
|
||||
<marker date="1411491678199" expanded="true" signature="23157:23219" placeholder="SELECT `user..plot_helpers..." />
|
||||
<marker date="1411491678199" expanded="true" signature="23942:24013" placeholder="DELETE FROM ..." />
|
||||
<marker date="1411491678199" expanded="true" signature="24820:24888" placeholder="INSERT INTO ..." />
|
||||
<marker date="1411491678199" expanded="true" signature="25695:25765" placeholder="DELETE FROM ..." />
|
||||
<marker date="1411491678199" expanded="true" signature="26572:26639" placeholder="INSERT INTO ..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -0,0 +1,18 @@
|
||||
package com.intellectualcrafters.plot;
|
||||
|
||||
/**
|
||||
* Created by Citymonstret on 2014-09-23.
|
||||
*/
|
||||
public class AbstractFlag {
|
||||
|
||||
private final String key;
|
||||
|
||||
public AbstractFlag(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
}
|
@ -4,20 +4,21 @@ import org.apache.commons.lang.StringUtils;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
public class Flag {
|
||||
private String key;
|
||||
private AbstractFlag key;
|
||||
private String value;
|
||||
public Flag(String key, String value) {
|
||||
if (!StringUtils.isAlphanumeric(key) || !StringUtils.isAlphanumeric(ChatColor.stripColor(value).replace(" ", "")))
|
||||
public Flag(AbstractFlag key, String value) {
|
||||
if (!StringUtils.isAlphanumeric(ChatColor.stripColor(value).replace(" ", "")))
|
||||
throw new IllegalArgumentException("Flag must be alphanumerical");
|
||||
if (key.length()>16)
|
||||
throw new IllegalArgumentException("Key must be <= 16 characters");
|
||||
/*if (key.length()>16)
|
||||
throw new IllegalArgumentException("Key must be <= 16 characters");*/
|
||||
if (value.length()>48)
|
||||
throw new IllegalArgumentException("Value must be <= 48 characters");
|
||||
this.key = key.toLowerCase();
|
||||
this.key = key;
|
||||
this.value = value;
|
||||
}
|
||||
public AbstractFlag getAbstractFlag() { return this.key; }
|
||||
public String getKey() {
|
||||
return this.key;
|
||||
return this.key.getKey();
|
||||
}
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
@ -25,7 +26,7 @@ public class Flag {
|
||||
@Override
|
||||
public String toString() {
|
||||
if (this.value.equals("")) {
|
||||
return this.key;
|
||||
return this.key.getKey();
|
||||
}
|
||||
return this.key+":"+this.value;
|
||||
}
|
||||
@ -42,6 +43,6 @@ public class Flag {
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return key.hashCode();
|
||||
return key.getKey().hashCode();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,45 @@
|
||||
package com.intellectualcrafters.plot;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class FlagManager {
|
||||
|
||||
private static ArrayList<AbstractFlag> flags;
|
||||
|
||||
public static boolean addFlag(AbstractFlag flag) {
|
||||
if(getFlag(flag.getKey()) != null) {
|
||||
return false;
|
||||
}
|
||||
return flags.add(flag);
|
||||
}
|
||||
|
||||
public static List<AbstractFlag> getFlags() {
|
||||
return flags;
|
||||
}
|
||||
|
||||
public static AbstractFlag getFlag(String string) {
|
||||
for(AbstractFlag flag : flags) {
|
||||
if(flag.getKey().equalsIgnoreCase(string)) {
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static AbstractFlag getFlag(String string, boolean create) {
|
||||
if(getFlag(string) == null && create) {
|
||||
AbstractFlag flag = new AbstractFlag(string);
|
||||
return flag;
|
||||
}
|
||||
return getFlag(string);
|
||||
}
|
||||
|
||||
public static List<AbstractFlag> getPlotFlags(Plot plot) {
|
||||
Set<Flag> plotFlags = plot.settings.getFlags();
|
||||
List<AbstractFlag> flags = new ArrayList<>();
|
||||
for(Flag flag : plotFlags) flags.add(flag.getAbstractFlag());
|
||||
return flags;
|
||||
}
|
||||
}
|
671
PlotSquared/src/com/intellectualcrafters/plot/Metrics.java
Normal file
671
PlotSquared/src/com/intellectualcrafters/plot/Metrics.java
Normal file
@ -0,0 +1,671 @@
|
||||
package com.intellectualcrafters.plot;
|
||||
|
||||
/*
|
||||
* Copyright 2011-2013 Tyler Blair. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and contributors and should not be interpreted as representing official policies,
|
||||
* either expressed or implied, of anybody else.
|
||||
*/
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.InvalidConfigurationException;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.PluginDescriptionFile;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.Proxy;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
import java.util.logging.Level;
|
||||
import java.util.zip.GZIPOutputStream;
|
||||
|
||||
public class Metrics {
|
||||
/**
|
||||
* The current revision number
|
||||
*/
|
||||
private final static int REVISION = 7;
|
||||
/**
|
||||
* The base url of the metrics domain
|
||||
*/
|
||||
private static final String BASE_URL = "http://report.mcstats.org";
|
||||
/**
|
||||
* The url used to report a server's status
|
||||
*/
|
||||
private static final String REPORT_URL = "/plugin/%s";
|
||||
/**
|
||||
* Interval of time to ping (in minutes)
|
||||
*/
|
||||
private static final int PING_INTERVAL = 15;
|
||||
/**
|
||||
* The plugin this metrics submits for
|
||||
*/
|
||||
private final Plugin plugin;
|
||||
/**
|
||||
* All of the custom graphs to submit to metrics
|
||||
*/
|
||||
private final Set<Graph> graphs = Collections.synchronizedSet(new HashSet<Graph>());
|
||||
/**
|
||||
* The plugin configuration file
|
||||
*/
|
||||
private final YamlConfiguration configuration;
|
||||
/**
|
||||
* The plugin configuration file
|
||||
*/
|
||||
private final File configurationFile;
|
||||
/**
|
||||
* Unique server id
|
||||
*/
|
||||
private final String guid;
|
||||
/**
|
||||
* Debug mode
|
||||
*/
|
||||
private final boolean debug;
|
||||
/**
|
||||
* Lock for synchronization
|
||||
*/
|
||||
private final Object optOutLock = new Object();
|
||||
/**
|
||||
* The scheduled task
|
||||
*/
|
||||
private volatile BukkitTask task = null;
|
||||
|
||||
public Metrics(final Plugin plugin) throws IOException {
|
||||
if (plugin == null) {
|
||||
throw new IllegalArgumentException("Plugin cannot be null");
|
||||
}
|
||||
this.plugin = plugin;
|
||||
// load the config
|
||||
configurationFile = getConfigFile();
|
||||
configuration = YamlConfiguration.loadConfiguration(configurationFile);
|
||||
// add some defaults
|
||||
configuration.addDefault("opt-out", false);
|
||||
configuration.addDefault("guid", UUID.randomUUID().toString());
|
||||
configuration.addDefault("debug", false);
|
||||
// Do we need to create the file?
|
||||
if (configuration.get("guid", null) == null) {
|
||||
configuration.options().header("http://mcstats.org").copyDefaults(true);
|
||||
configuration.save(configurationFile);
|
||||
}
|
||||
// Load the guid then
|
||||
guid = configuration.getString("guid");
|
||||
debug = configuration.getBoolean("debug", false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct and create a Graph that can be used to separate specific plotters to their own graphs on the metrics
|
||||
* website. Plotters can be added to the graph object returned.
|
||||
*
|
||||
* @param name The name of the graph
|
||||
* @return Graph object created. Will never return NULL under normal circumstances unless bad parameters are given
|
||||
*/
|
||||
public Graph createGraph(final String name) {
|
||||
if (name == null) {
|
||||
throw new IllegalArgumentException("Graph name cannot be null");
|
||||
}
|
||||
// Construct the graph object
|
||||
final Graph graph = new Graph(name);
|
||||
// Now we can add our graph
|
||||
graphs.add(graph);
|
||||
// and return back
|
||||
return graph;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Graph object to BukkitMetrics that represents data for the plugin that should be sent to the backend
|
||||
*
|
||||
* @param graph The name of the graph
|
||||
*/
|
||||
public void addGraph(final Graph graph) {
|
||||
if (graph == null) {
|
||||
throw new IllegalArgumentException("Graph cannot be null");
|
||||
}
|
||||
graphs.add(graph);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start measuring statistics. This will immediately create an async repeating task as the plugin and send the
|
||||
* initial data to the metrics backend, and then after that it will post in increments of PING_INTERVAL * 1200
|
||||
* ticks.
|
||||
*
|
||||
* @return True if statistics measuring is running, otherwise false.
|
||||
*/
|
||||
public boolean start() {
|
||||
synchronized (optOutLock) {
|
||||
// Did we opt out?
|
||||
if (isOptOut()) {
|
||||
return false;
|
||||
}
|
||||
// Is metrics already running?
|
||||
if (task != null) {
|
||||
return true;
|
||||
}
|
||||
// Begin hitting the server with glorious data
|
||||
task = plugin.getServer().getScheduler().runTaskTimerAsynchronously(plugin, new Runnable() {
|
||||
private boolean firstPost = true;
|
||||
|
||||
public void run() {
|
||||
try {
|
||||
// This has to be synchronized or it can collide with the disable method.
|
||||
synchronized (optOutLock) {
|
||||
// Disable Task, if it is running and the server owner decided to opt-out
|
||||
if (isOptOut() && task != null) {
|
||||
task.cancel();
|
||||
task = null;
|
||||
// Tell all plotters to stop gathering information.
|
||||
for (Graph graph : graphs) {
|
||||
graph.onOptOut();
|
||||
}
|
||||
}
|
||||
}
|
||||
// We use the inverse of firstPost because if it is the first time we are posting,
|
||||
// it is not a interval ping, so it evaluates to FALSE
|
||||
// Each time thereafter it will evaluate to TRUE, i.e PING!
|
||||
postPlugin(!firstPost);
|
||||
// After the first post we set firstPost to false
|
||||
// Each post thereafter will be a ping
|
||||
firstPost = false;
|
||||
} catch (IOException e) {
|
||||
if (debug) {
|
||||
Bukkit.getLogger().log(Level.INFO, "[Metrics] " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 0, PING_INTERVAL * 1200);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Has the server owner denied plugin metrics?
|
||||
*
|
||||
* @return true if metrics should be opted out of it
|
||||
*/
|
||||
public boolean isOptOut() {
|
||||
synchronized (optOutLock) {
|
||||
try {
|
||||
// Reload the metrics file
|
||||
configuration.load(getConfigFile());
|
||||
} catch (IOException ex) {
|
||||
if (debug) {
|
||||
Bukkit.getLogger().log(Level.INFO, "[Metrics] " + ex.getMessage());
|
||||
}
|
||||
return true;
|
||||
} catch (InvalidConfigurationException ex) {
|
||||
if (debug) {
|
||||
Bukkit.getLogger().log(Level.INFO, "[Metrics] " + ex.getMessage());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return configuration.getBoolean("opt-out", false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables metrics for the server by setting "opt-out" to false in the config file and starting the metrics task.
|
||||
*
|
||||
* @throws java.io.IOException
|
||||
*/
|
||||
public void enable() throws IOException {
|
||||
// This has to be synchronized or it can collide with the check in the task.
|
||||
synchronized (optOutLock) {
|
||||
// Check if the server owner has already set opt-out, if not, set it.
|
||||
if (isOptOut()) {
|
||||
configuration.set("opt-out", false);
|
||||
configuration.save(configurationFile);
|
||||
}
|
||||
// Enable Task, if it is not running
|
||||
if (task == null) {
|
||||
start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Disables metrics for the server by setting "opt-out" to true in the config file and canceling the metrics task.
|
||||
*
|
||||
* @throws java.io.IOException
|
||||
*/
|
||||
public void disable() throws IOException {
|
||||
// This has to be synchronized or it can collide with the check in the task.
|
||||
synchronized (optOutLock) {
|
||||
// Check if the server owner has already set opt-out, if not, set it.
|
||||
if (!isOptOut()) {
|
||||
configuration.set("opt-out", true);
|
||||
configuration.save(configurationFile);
|
||||
}
|
||||
// Disable Task, if it is running
|
||||
if (task != null) {
|
||||
task.cancel();
|
||||
task = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the File object of the config file that should be used to store data such as the GUID and opt-out status
|
||||
*
|
||||
* @return the File object for the config file
|
||||
*/
|
||||
public File getConfigFile() {
|
||||
// I believe the easiest way to get the base folder (e.g craftbukkit set via -P) for plugins to use
|
||||
// is to abuse the plugin object we already have
|
||||
// plugin.getDataFolder() => base/plugins/PluginA/
|
||||
// pluginsFolder => base/plugins/
|
||||
// The base is not necessarily relative to the startup directory.
|
||||
File pluginsFolder = plugin.getDataFolder().getParentFile();
|
||||
// return => base/plugins/PluginMetrics/config.yml
|
||||
return new File(new File(pluginsFolder, "PluginMetrics"), "config.yml");
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic method that posts a plugin to the metrics website
|
||||
*/
|
||||
private void postPlugin(final boolean isPing) throws IOException {
|
||||
// Server software specific section
|
||||
PluginDescriptionFile description = plugin.getDescription();
|
||||
String pluginName = description.getName();
|
||||
boolean onlineMode = Bukkit.getServer().getOnlineMode(); // TRUE if online mode is enabled
|
||||
String pluginVersion = description.getVersion();
|
||||
String serverVersion = Bukkit.getVersion();
|
||||
int playersOnline = Bukkit.getServer().getOnlinePlayers().length;
|
||||
// END server software specific section -- all code below does not use any code outside of this class / Java
|
||||
// Construct the post data
|
||||
StringBuilder json = new StringBuilder(1024);
|
||||
json.append('{');
|
||||
// The plugin's description file containg all of the plugin data such as name, version, author, etc
|
||||
appendJSONPair(json, "guid", guid);
|
||||
appendJSONPair(json, "plugin_version", pluginVersion);
|
||||
appendJSONPair(json, "server_version", serverVersion);
|
||||
appendJSONPair(json, "players_online", Integer.toString(playersOnline));
|
||||
// New data as of R6
|
||||
String osname = System.getProperty("os.name");
|
||||
String osarch = System.getProperty("os.arch");
|
||||
String osversion = System.getProperty("os.version");
|
||||
String java_version = System.getProperty("java.version");
|
||||
int coreCount = Runtime.getRuntime().availableProcessors();
|
||||
// normalize os arch .. amd64 -> x86_64
|
||||
if (osarch.equals("amd64")) {
|
||||
osarch = "x86_64";
|
||||
}
|
||||
appendJSONPair(json, "osname", osname);
|
||||
appendJSONPair(json, "osarch", osarch);
|
||||
appendJSONPair(json, "osversion", osversion);
|
||||
appendJSONPair(json, "cores", Integer.toString(coreCount));
|
||||
appendJSONPair(json, "auth_mode", onlineMode ? "1" : "0");
|
||||
appendJSONPair(json, "java_version", java_version);
|
||||
// If we're pinging, append it
|
||||
if (isPing) {
|
||||
appendJSONPair(json, "ping", "1");
|
||||
}
|
||||
if (graphs.size() > 0) {
|
||||
synchronized (graphs) {
|
||||
json.append(',');
|
||||
json.append('"');
|
||||
json.append("graphs");
|
||||
json.append('"');
|
||||
json.append(':');
|
||||
json.append('{');
|
||||
boolean firstGraph = true;
|
||||
final Iterator<Graph> iter = graphs.iterator();
|
||||
while (iter.hasNext()) {
|
||||
Graph graph = iter.next();
|
||||
StringBuilder graphJson = new StringBuilder();
|
||||
graphJson.append('{');
|
||||
for (Plotter plotter : graph.getPlotters()) {
|
||||
appendJSONPair(graphJson, plotter.getColumnName(), Integer.toString(plotter.getValue()));
|
||||
}
|
||||
graphJson.append('}');
|
||||
if (!firstGraph) {
|
||||
json.append(',');
|
||||
}
|
||||
json.append(escapeJSON(graph.getName()));
|
||||
json.append(':');
|
||||
json.append(graphJson);
|
||||
firstGraph = false;
|
||||
}
|
||||
json.append('}');
|
||||
}
|
||||
}
|
||||
// close json
|
||||
json.append('}');
|
||||
// Create the url
|
||||
URL url = new URL(BASE_URL + String.format(REPORT_URL, urlEncode(pluginName)));
|
||||
// Connect to the website
|
||||
URLConnection connection;
|
||||
// Mineshafter creates a socks proxy, so we can safely bypass it
|
||||
// It does not reroute POST requests so we need to go around it
|
||||
if (isMineshafterPresent()) {
|
||||
connection = url.openConnection(Proxy.NO_PROXY);
|
||||
} else {
|
||||
connection = url.openConnection();
|
||||
}
|
||||
byte[] uncompressed = json.toString().getBytes();
|
||||
byte[] compressed = gzip(json.toString());
|
||||
// Headers
|
||||
connection.addRequestProperty("User-Agent", "MCStats/" + REVISION);
|
||||
connection.addRequestProperty("Content-Type", "application/json");
|
||||
connection.addRequestProperty("Content-Encoding", "gzip");
|
||||
connection.addRequestProperty("Content-Length", Integer.toString(compressed.length));
|
||||
connection.addRequestProperty("Accept", "application/json");
|
||||
connection.addRequestProperty("Connection", "close");
|
||||
connection.setDoOutput(true);
|
||||
if (debug) {
|
||||
System.out.println("[Metrics] Prepared request for " + pluginName + " uncompressed=" + uncompressed.length + " compressed=" + compressed.length);
|
||||
}
|
||||
// Write the data
|
||||
OutputStream os = connection.getOutputStream();
|
||||
os.write(compressed);
|
||||
os.flush();
|
||||
// Now read the response
|
||||
final BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
|
||||
String response = reader.readLine();
|
||||
// close resources
|
||||
os.close();
|
||||
reader.close();
|
||||
if (response == null || response.startsWith("ERR") || response.startsWith("7")) {
|
||||
if (response == null) {
|
||||
response = "null";
|
||||
} else if (response.startsWith("7")) {
|
||||
response = response.substring(response.startsWith("7,") ? 2 : 1);
|
||||
}
|
||||
throw new IOException(response);
|
||||
} else {
|
||||
// Is this the first update this hour?
|
||||
if (response.equals("1") || response.contains("This is your first update this hour")) {
|
||||
synchronized (graphs) {
|
||||
final Iterator<Graph> iter = graphs.iterator();
|
||||
while (iter.hasNext()) {
|
||||
final Graph graph = iter.next();
|
||||
for (Plotter plotter : graph.getPlotters()) {
|
||||
plotter.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* GZip compress a string of bytes
|
||||
*
|
||||
* @param input
|
||||
* @return
|
||||
*/
|
||||
public static byte[] gzip(String input) {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
GZIPOutputStream gzos = null;
|
||||
try {
|
||||
gzos = new GZIPOutputStream(baos);
|
||||
gzos.write(input.getBytes("UTF-8"));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (gzos != null) try {
|
||||
gzos.close();
|
||||
} catch (IOException ignore) {
|
||||
}
|
||||
}
|
||||
return baos.toByteArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if mineshafter is present. If it is, we need to bypass it to send POST requests
|
||||
*
|
||||
* @return true if mineshafter is installed on the server
|
||||
*/
|
||||
private boolean isMineshafterPresent() {
|
||||
try {
|
||||
Class.forName("mineshafter.MineServer");
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends a json encoded key/value pair to the given string builder.
|
||||
*
|
||||
* @param json
|
||||
* @param key
|
||||
* @param value
|
||||
* @throws UnsupportedEncodingException
|
||||
*/
|
||||
private static void appendJSONPair(StringBuilder json, String key, String value) throws UnsupportedEncodingException {
|
||||
boolean isValueNumeric = false;
|
||||
try {
|
||||
if (value.equals("0") || !value.endsWith("0")) {
|
||||
Double.parseDouble(value);
|
||||
isValueNumeric = true;
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
isValueNumeric = false;
|
||||
}
|
||||
if (json.charAt(json.length() - 1) != '{') {
|
||||
json.append(',');
|
||||
}
|
||||
json.append(escapeJSON(key));
|
||||
json.append(':');
|
||||
if (isValueNumeric) {
|
||||
json.append(value);
|
||||
} else {
|
||||
json.append(escapeJSON(value));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Escape a string to create a valid JSON string
|
||||
*
|
||||
* @param text
|
||||
* @return
|
||||
*/
|
||||
private static String escapeJSON(String text) {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append('"');
|
||||
for (int index = 0; index < text.length(); index++) {
|
||||
char chr = text.charAt(index);
|
||||
switch (chr) {
|
||||
case '"':
|
||||
case '\\':
|
||||
builder.append('\\');
|
||||
builder.append(chr);
|
||||
break;
|
||||
case '\b':
|
||||
builder.append("\\b");
|
||||
break;
|
||||
case '\t':
|
||||
builder.append("\\t");
|
||||
break;
|
||||
case '\n':
|
||||
builder.append("\\n");
|
||||
break;
|
||||
case '\r':
|
||||
builder.append("\\r");
|
||||
break;
|
||||
default:
|
||||
if (chr < ' ') {
|
||||
String t = "000" + Integer.toHexString(chr);
|
||||
builder.append("\\u" + t.substring(t.length() - 4));
|
||||
} else {
|
||||
builder.append(chr);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
builder.append('"');
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode text as UTF-8
|
||||
*
|
||||
* @param text the text to encode
|
||||
* @return the encoded text, as UTF-8
|
||||
*/
|
||||
private static String urlEncode(final String text) throws UnsupportedEncodingException {
|
||||
return URLEncoder.encode(text, "UTF-8");
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a custom graph on the website
|
||||
*/
|
||||
public static class Graph {
|
||||
/**
|
||||
* The graph's name, alphanumeric and spaces only :) If it does not comply to the above when submitted, it is
|
||||
* rejected
|
||||
*/
|
||||
private final String name;
|
||||
/**
|
||||
* The set of plotters that are contained within this graph
|
||||
*/
|
||||
private final Set<Plotter> plotters = new LinkedHashSet<Plotter>();
|
||||
|
||||
private Graph(final String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the graph's name
|
||||
*
|
||||
* @return the Graph's name
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a plotter to the graph, which will be used to plot entries
|
||||
*
|
||||
* @param plotter the plotter to add to the graph
|
||||
*/
|
||||
public void addPlotter(final Plotter plotter) {
|
||||
plotters.add(plotter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a plotter from the graph
|
||||
*
|
||||
* @param plotter the plotter to remove from the graph
|
||||
*/
|
||||
public void removePlotter(final Plotter plotter) {
|
||||
plotters.remove(plotter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an <b>unmodifiable</b> set of the plotter objects in the graph
|
||||
*
|
||||
* @return an unmodifiable {@link java.util.Set} of the plotter objects
|
||||
*/
|
||||
public Set<Plotter> getPlotters() {
|
||||
return Collections.unmodifiableSet(plotters);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return name.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object object) {
|
||||
if (!(object instanceof Graph)) {
|
||||
return false;
|
||||
}
|
||||
final Graph graph = (Graph) object;
|
||||
return graph.name.equals(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the server owner decides to opt-out of BukkitMetrics while the server is running.
|
||||
*/
|
||||
protected void onOptOut() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface used to collect custom data for a plugin
|
||||
*/
|
||||
public static abstract class Plotter {
|
||||
/**
|
||||
* The plot's name
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
/**
|
||||
* Construct a plotter with the default plot name
|
||||
*/
|
||||
public Plotter() {
|
||||
this("Default");
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a plotter with a specific plot name
|
||||
*
|
||||
* @param name the name of the plotter to use, which will show up on the website
|
||||
*/
|
||||
public Plotter(final String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current value for the plotted point. Since this function defers to an external function it may or may
|
||||
* not return immediately thus cannot be guaranteed to be thread friendly or safe. This function can be called
|
||||
* from any thread so care should be taken when accessing resources that need to be synchronized.
|
||||
*
|
||||
* @return the current value for the point to be plotted.
|
||||
*/
|
||||
public abstract int getValue();
|
||||
|
||||
/**
|
||||
* Get the column name for the plotted point
|
||||
*
|
||||
* @return the plotted point's column name
|
||||
*/
|
||||
public String getColumnName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called after the website graphs have been updated
|
||||
*/
|
||||
public void reset() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getColumnName().hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object object) {
|
||||
if (!(object instanceof Plotter)) {
|
||||
return false;
|
||||
}
|
||||
final Plotter plotter = (Plotter) object;
|
||||
return plotter.name.equals(name) && plotter.getValue() == getValue();
|
||||
}
|
||||
}
|
||||
}
|
@ -10,7 +10,6 @@
|
||||
package com.intellectualcrafters.plot;
|
||||
|
||||
import ca.mera.CameraAPI;
|
||||
|
||||
import com.intellectualcrafters.plot.Logger.LogLevel;
|
||||
import com.intellectualcrafters.plot.Settings.Web;
|
||||
import com.intellectualcrafters.plot.commands.Camera;
|
||||
@ -18,14 +17,13 @@ import com.intellectualcrafters.plot.commands.MainCommand;
|
||||
import com.intellectualcrafters.plot.database.DBFunc;
|
||||
import com.intellectualcrafters.plot.database.MySQL;
|
||||
import com.intellectualcrafters.plot.database.PlotMeConverter;
|
||||
import com.intellectualcrafters.plot.database.SQLite;
|
||||
import com.intellectualcrafters.plot.events.PlayerTeleportToPlotEvent;
|
||||
import com.intellectualcrafters.plot.events.PlotDeleteEvent;
|
||||
import com.intellectualcrafters.plot.listeners.PlayerEvents;
|
||||
import com.intellectualcrafters.plot.listeners.WorldEditListener;
|
||||
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
|
||||
|
||||
import me.confuser.barapi.BarAPI;
|
||||
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Entity;
|
||||
@ -354,17 +352,39 @@ public class PlotMain extends JavaPlugin {
|
||||
Logger.setup(log);
|
||||
Logger.add(LogLevel.GENERAL, "Logger enabled");
|
||||
}
|
||||
|
||||
private static double getJavaVersion() {
|
||||
return Double.parseDouble(System.getProperty("java.specification.version"));
|
||||
}
|
||||
|
||||
/**
|
||||
* On Load.
|
||||
* TODO: Load updates async
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void onEnable() {
|
||||
setupLogger();
|
||||
|
||||
//Check for outdated java version.
|
||||
if(getJavaVersion() < 1.7) {
|
||||
sendConsoleSenderMessage(C.PREFIX.s() + "&cYour java version is outdated. Please update to at least 1.7.");
|
||||
sendConsoleSenderMessage(C.PREFIX.s() + "&cURL: &6https://java.com/en/download/index.jsp");
|
||||
Bukkit.getPluginManager().disablePlugin(this);
|
||||
return;
|
||||
}
|
||||
|
||||
configs();
|
||||
|
||||
if(Settings.METRICS) {
|
||||
try {
|
||||
Metrics metrics = new Metrics(this);
|
||||
metrics.start();
|
||||
sendConsoleSenderMessage(C.PREFIX.s() + "&6Metrics enabled.");
|
||||
} catch(Exception e) {
|
||||
sendConsoleSenderMessage(C.PREFIX.s() + "&cFailed to load up metrics.");
|
||||
}
|
||||
}
|
||||
|
||||
// TODO make this configurable
|
||||
PlotWorld.BLOCKS = new ArrayList<>(Arrays.asList(new Material[]{
|
||||
ACACIA_STAIRS, BEACON, BEDROCK,
|
||||
@ -416,7 +436,7 @@ public class PlotMain extends JavaPlugin {
|
||||
DatabaseMetaData meta = connection.getMetaData();
|
||||
ResultSet res = meta.getTables(null, null, "plot", null);
|
||||
if(!res.next())
|
||||
DBFunc.createTables();
|
||||
DBFunc.createTables("mysql");
|
||||
}
|
||||
} catch (ClassNotFoundException | SQLException e) {
|
||||
Logger.add(LogLevel.DANGER, "MySQL connection failed.");
|
||||
@ -430,6 +450,24 @@ public class PlotMain extends JavaPlugin {
|
||||
|
||||
} else if (Settings.DB.USE_MONGO) {
|
||||
sendConsoleSenderMessage(C.PREFIX.s() + "MongoDB is not yet implemented");
|
||||
} else if (Settings.DB.USE_SQLITE) {
|
||||
try {
|
||||
connection = new SQLite(this, Settings.DB.SQLITE_DB + ".db").openConnection();
|
||||
{
|
||||
DatabaseMetaData meta = connection.getMetaData();
|
||||
ResultSet res = meta.getTables(null, null, "plot", null);
|
||||
if(!res.next())
|
||||
DBFunc.createTables("sqlite");
|
||||
}
|
||||
} catch (ClassNotFoundException | SQLException e) {
|
||||
Logger.add(LogLevel.DANGER, "SQLite connection failed");
|
||||
sendConsoleSenderMessage(C.PREFIX.s() + "&cFailed to open SQLite connection. The plugin will disable itself.");
|
||||
sendConsoleSenderMessage("&9==== Here is an ugly stacktrace, if you are interested in those things ===");
|
||||
e.printStackTrace();
|
||||
Bukkit.getPluginManager().disablePlugin(this);
|
||||
return;
|
||||
}
|
||||
plots = DBFunc.getPlots();
|
||||
} else {
|
||||
Logger.add(LogLevel.DANGER, "No storage type is set.");
|
||||
sendConsoleSenderMessage(C.PREFIX + "&cNo storage type is set!");
|
||||
@ -651,17 +689,20 @@ public class PlotMain extends JavaPlugin {
|
||||
e.printStackTrace();
|
||||
}
|
||||
{
|
||||
Settings.DB.USE_MYSQL = true;
|
||||
Settings.DB.USER = storage.getString("mysql_user");
|
||||
Settings.DB.PASSWORD = storage.getString("mysql_password");
|
||||
Settings.DB.HOST_NAME = storage.getString("mysql_host");
|
||||
Settings.DB.PORT = storage.getString("mysql_port");
|
||||
Settings.DB.DATABASE = storage.getString("mysql_database");
|
||||
Settings.DB.USE_MYSQL = storage.getBoolean("mysql.use");
|
||||
Settings.DB.USER = storage.getString("mysql.user");
|
||||
Settings.DB.PASSWORD = storage.getString("mysql.password");
|
||||
Settings.DB.HOST_NAME = storage.getString("mysql.host");
|
||||
Settings.DB.PORT = storage.getString("mysql.port");
|
||||
Settings.DB.DATABASE = storage.getString("mysql.database");
|
||||
Settings.DB.USE_SQLITE = storage.getBoolean("sqlite.use");
|
||||
Settings.DB.SQLITE_DB = storage.getString("sqlite.db");
|
||||
}
|
||||
{
|
||||
Settings.METRICS = config.getBoolean("metrics");
|
||||
//Web
|
||||
Web.ENABLED = config.getBoolean("web.enabled");
|
||||
Web.PORT = config.getInt("web.port");
|
||||
//Web.ENABLED = config.getBoolean("web.enabled");
|
||||
//Web.PORT = config.getInt("web.port");
|
||||
}
|
||||
}
|
||||
|
||||
@ -720,10 +761,11 @@ public class PlotMain extends JavaPlugin {
|
||||
private static void setupConfig() {
|
||||
config.set("version", config_ver);
|
||||
Map<String, Object> options = new HashMap<String, Object>();
|
||||
options.put("auto_update", false);
|
||||
//options.put("auto_update", false);
|
||||
options.put("kill_road_mobs", Settings.KILL_ROAD_MOBS_DEFAULT);
|
||||
options.put("web.enabled", Web.ENABLED);
|
||||
options.put("web.port", Web.PORT);
|
||||
options.put("metrics", true);
|
||||
for (Entry<String, Object> node : options.entrySet()) {
|
||||
if (!config.contains(node.getKey())) {
|
||||
config.set(node.getKey(), node.getValue());
|
||||
@ -753,11 +795,14 @@ public class PlotMain extends JavaPlugin {
|
||||
private static void setupStorage() {
|
||||
storage.set("version", storage_ver);
|
||||
Map<String, Object> options = new HashMap<String, Object>();
|
||||
options.put("mysql_host", "localhost");
|
||||
options.put("mysql_port", "3306");
|
||||
options.put("mysql_user", "root");
|
||||
options.put("mysql_password", "password");
|
||||
options.put("mysql_database", "plot_db");
|
||||
options.put("mysql.use", true);
|
||||
options.put("sqlite.use", false);
|
||||
options.put("sqllite.db", "storage");
|
||||
options.put("mysql.host", "localhost");
|
||||
options.put("mysql.port", "3306");
|
||||
options.put("mysql.user", "root");
|
||||
options.put("mysql.password", "password");
|
||||
options.put("mysql.database", "plot_db");
|
||||
for (Entry<String, Object> node : options.entrySet()) {
|
||||
if (!storage.contains(node.getKey())) {
|
||||
storage.set(node.getKey(), node.getValue());
|
||||
|
@ -9,11 +9,6 @@
|
||||
|
||||
package com.intellectualcrafters.plot;
|
||||
|
||||
import org.bukkit.Material;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Updater and DB settings
|
||||
* @author Citymonstret
|
||||
@ -21,6 +16,7 @@ import java.util.List;
|
||||
* @author Empire92
|
||||
*/
|
||||
public class Settings {
|
||||
public static boolean METRICS = true;
|
||||
/**
|
||||
* plot specific resource pack
|
||||
*/
|
||||
@ -42,6 +38,7 @@ public class Settings {
|
||||
public static class Update {
|
||||
/**
|
||||
* Update plugin?
|
||||
* @deprecated
|
||||
*/
|
||||
public static boolean AUTO_UPDATE = false;
|
||||
}
|
||||
@ -58,11 +55,13 @@ public class Settings {
|
||||
*/
|
||||
public static class DB {
|
||||
public static boolean USE_MONGO = false; /* TODO: Implement Mongo */;
|
||||
public static boolean USE_MYSQL = true; /* NOTE: Fixed connector */
|
||||
public static boolean USE_SQLITE = false;
|
||||
public static boolean USE_MYSQL = true; /* NOTE: Fixed connector */
|
||||
public static String SQLITE_DB = "storage";
|
||||
public static String HOST_NAME = "localhost";
|
||||
public static String PORT = "3306";
|
||||
public static String DATABASE = "plot_db";
|
||||
public static String USER = "root";
|
||||
public static String PASSWORD = "password";
|
||||
public static String DATABASE = "plot_db";
|
||||
public static String USER = "root";
|
||||
public static String PASSWORD = "password";
|
||||
}
|
||||
}
|
@ -113,9 +113,9 @@ public class WorldGenerator extends ChunkGenerator {
|
||||
for (int i = 0; i < default_flags.length; i++) {
|
||||
String current = default_flags_string[i];
|
||||
if (current.contains(","))
|
||||
default_flags[i] = new Flag(current.split(",")[0], current.split(",")[1]);
|
||||
default_flags[i] = new Flag(FlagManager.getFlag(current.split(",")[0], true), current.split(",")[1]);
|
||||
else
|
||||
default_flags[i] = new Flag(current, "");
|
||||
default_flags[i] = new Flag(FlagManager.getFlag(current, true), "");
|
||||
}
|
||||
plotworld.DEFAULT_FLAGS = default_flags;
|
||||
|
||||
|
@ -15,6 +15,7 @@ import java.util.Random;
|
||||
*/
|
||||
public class XPopulator extends BlockPopulator {
|
||||
private SetBlockFast setBlockClass = null;
|
||||
|
||||
public XPopulator() {
|
||||
try {
|
||||
setBlockClass = new SetBlockFast();
|
||||
|
@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
package com.intellectualcrafters.plot.database;
|
||||
|
||||
import com.intellectualcrafters.plot.*;
|
||||
import com.intellectualcrafters.plot.Logger.LogLevel;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
@ -22,14 +23,13 @@ import java.util.UUID;
|
||||
import static com.intellectualcrafters.plot.PlotMain.connection;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Citymonstret
|
||||
*
|
||||
*/
|
||||
public class DBFunc {
|
||||
|
||||
/**
|
||||
* Set Plot owner
|
||||
*
|
||||
* @param plot
|
||||
* @param uuid
|
||||
*/
|
||||
@ -44,7 +44,7 @@ public class DBFunc {
|
||||
statement.setInt(3, plot.id.y);
|
||||
statement.executeUpdate();
|
||||
statement.close();
|
||||
} catch(SQLException e) {
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
Logger.add(LogLevel.DANGER, "Could not set owner for plot " + plot.id);
|
||||
}
|
||||
@ -54,6 +54,7 @@ public class DBFunc {
|
||||
|
||||
/**
|
||||
* Create a plot
|
||||
*
|
||||
* @param plot
|
||||
*/
|
||||
public static void createPlot(Plot plot) {
|
||||
@ -74,59 +75,86 @@ public class DBFunc {
|
||||
|
||||
/**
|
||||
* Create tables
|
||||
*
|
||||
* @throws SQLException
|
||||
*/
|
||||
public static void createTables() throws SQLException{
|
||||
public static void createTables(String database) throws SQLException {
|
||||
boolean mysql = database.equals("mysql");
|
||||
|
||||
Statement stmt = connection.createStatement();
|
||||
stmt.addBatch(
|
||||
"CREATE TABLE IF NOT EXISTS `plot` (" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT," +
|
||||
"`plot_id_x` int(11) NOT NULL," +
|
||||
"`plot_id_z` int(11) NOT NULL," +
|
||||
"`owner` varchar(45) NOT NULL," +
|
||||
"`world` varchar(45) NOT NULL," +
|
||||
"`timestamp` timestamp not null DEFAULT CURRENT_TIMESTAMP," +
|
||||
"PRIMARY KEY (`id`)" +
|
||||
") ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0");
|
||||
|
||||
stmt.addBatch(
|
||||
"CREATE TABLE IF NOT EXISTS `plot_helpers` (" +
|
||||
"`plot_plot_id` int(11) NOT NULL," +
|
||||
"`user_uuid` varchar(40) NOT NULL" +
|
||||
") ENGINE=InnoDB DEFAULT CHARSET=utf8"
|
||||
);
|
||||
if (mysql) {
|
||||
stmt.addBatch(
|
||||
"CREATE TABLE IF NOT EXISTS `plot` (" +
|
||||
"`id` INT(11) NOT NULL AUTO_INCREMENT," +
|
||||
"`plot_id_x` INT(11) NOT NULL," +
|
||||
"`plot_id_z` INT(11) NOT NULL," +
|
||||
"`owner` VARCHAR(45) NOT NULL," +
|
||||
"`world` VARCHAR(45) NOT NULL," +
|
||||
"`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP," +
|
||||
"PRIMARY KEY (`id`)" +
|
||||
") ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0");
|
||||
stmt.addBatch(
|
||||
"CREATE TABLE IF NOT EXISTS `plot_denied` (" +
|
||||
"`plot_plot_id` INT(11) NOT NULL," +
|
||||
"`user_uuid` VARCHAR(40) NOT NULL" +
|
||||
") ENGINE=InnoDB DEFAULT CHARSET=utf8"
|
||||
);
|
||||
stmt.addBatch(
|
||||
"CREATE TABLE IF NOT EXISTS `plot_settings` (" +
|
||||
" `plot_plot_id` INT(11) NOT NULL," +
|
||||
" `biome` VARCHAR(45) DEFAULT 'FOREST'," +
|
||||
" `rain` INT(1) DEFAULT 0," +
|
||||
" `custom_time` TINYINT(1) DEFAULT '0'," +
|
||||
" `time` INT(11) DEFAULT '8000'," +
|
||||
" `deny_entry` TINYINT(1) DEFAULT '0'," +
|
||||
" `alias` VARCHAR(50) DEFAULT NULL," +
|
||||
" `flags` VARCHAR(512) DEFAULT NULL," +
|
||||
" `position` VARCHAR(50) NOT NULL DEFAULT 'DEFAULT'," +
|
||||
" PRIMARY KEY (`plot_plot_id`)," +
|
||||
" UNIQUE KEY `unique_alias` (`alias`)" +
|
||||
") ENGINE=InnoDB DEFAULT CHARSET=utf8"
|
||||
);
|
||||
stmt.addBatch(
|
||||
"ALTER TABLE `plot_settings` ADD CONSTRAINT `plot_settings_ibfk_1` FOREIGN KEY (`plot_plot_id`) REFERENCES `plot` (`id`) ON DELETE CASCADE"
|
||||
);
|
||||
|
||||
stmt.addBatch(
|
||||
"CREATE TABLE IF NOT EXISTS `plot_denied` (" +
|
||||
"`plot_plot_id` int(11) NOT NULL," +
|
||||
"`user_uuid` varchar(40) NOT NULL" +
|
||||
") ENGINE=InnoDB DEFAULT CHARSET=utf8"
|
||||
);
|
||||
|
||||
stmt.addBatch(
|
||||
"CREATE TABLE IF NOT EXISTS `plot_settings` (" +
|
||||
" `plot_plot_id` INT(11) NOT NULL," +
|
||||
" `biome` VARCHAR(45) DEFAULT 'FOREST'," +
|
||||
" `rain` INT(1) DEFAULT 0," +
|
||||
" `custom_time` TINYINT(1) DEFAULT '0'," +
|
||||
" `time` INT(11) DEFAULT '8000'," +
|
||||
" `deny_entry` TINYINT(1) DEFAULT '0'," +
|
||||
" `alias` VARCHAR(50) DEFAULT NULL," +
|
||||
" `flags` VARCHAR(512) DEFAULT NULL," +
|
||||
" `position` VARCHAR(50) NOT NULL DEFAULT 'DEFAULT'," +
|
||||
" PRIMARY KEY (`plot_plot_id`)," +
|
||||
" UNIQUE KEY `unique_alias` (`alias`)" +
|
||||
") ENGINE=InnoDB DEFAULT CHARSET=utf8"
|
||||
);
|
||||
|
||||
stmt.addBatch(
|
||||
"ALTER TABLE `plot_settings` ADD CONSTRAINT `plot_settings_ibfk_1` FOREIGN KEY (`plot_plot_id`) REFERENCES `plot` (`id`) ON DELETE CASCADE"
|
||||
);
|
||||
} else {
|
||||
stmt.addBatch(
|
||||
"CREATE TABLE IF NOT EXISTS `plot` (" +
|
||||
"`id` INTEGER(11) PRIMARY KEY," +
|
||||
"`plot_id_x` INT(11) NOT NULL," +
|
||||
"`plot_id_z` INT(11) NOT NULL," +
|
||||
"`owner` VARCHAR(45) NOT NULL," +
|
||||
"`world` VARCHAR(45) NOT NULL," +
|
||||
"`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP)"
|
||||
);
|
||||
stmt.addBatch(
|
||||
"CREATE TABLE IF NOT EXISTS `plot_denied` (" +
|
||||
"`plot_plot_id` INT(11) NOT NULL," +
|
||||
"`user_uuid` VARCHAR(40) NOT NULL" +
|
||||
")"
|
||||
);
|
||||
stmt.addBatch(
|
||||
"CREATE TABLE IF NOT EXISTS `plot_settings` (" +
|
||||
" `plot_plot_id` INT(11) NOT NULL," +
|
||||
" `biome` VARCHAR(45) DEFAULT 'FOREST'," +
|
||||
" `rain` INT(1) DEFAULT 0," +
|
||||
" `custom_time` TINYINT(1) DEFAULT '0'," +
|
||||
" `time` INT(11) DEFAULT '8000'," +
|
||||
" `deny_entry` TINYINT(1) DEFAULT '0'," +
|
||||
" `alias` VARCHAR(50) DEFAULT NULL," +
|
||||
" `flags` VARCHAR(512) DEFAULT NULL," +
|
||||
" `position` VARCHAR(50) NOT NULL DEFAULT 'DEFAULT'," +
|
||||
" PRIMARY KEY (`plot_plot_id`)" +
|
||||
")"
|
||||
);
|
||||
}
|
||||
|
||||
stmt.executeBatch();
|
||||
stmt.clearBatch();
|
||||
stmt.close();
|
||||
|
||||
|
||||
/**
|
||||
* Adding missing columns (for older versions)
|
||||
* + get current columns (continue if they do not match the current number of columns)
|
||||
@ -134,8 +162,8 @@ public class DBFunc {
|
||||
* - create column (plot_id_x,plot_id_z,world)
|
||||
* - populate plot_id_x, plot_id_z with data from plot_id
|
||||
* - populate world column with PlotMain.config.getString("plot_world") - which will be set from previous release;
|
||||
*/
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
* `plot`
|
||||
*/
|
||||
@ -160,16 +188,17 @@ public class DBFunc {
|
||||
|
||||
/**
|
||||
* Delete a plot
|
||||
*
|
||||
* @param plot
|
||||
*/
|
||||
public static void delete(final String world, final Plot plot) {
|
||||
boolean result = PlotMain.removePlot(world,plot.id);
|
||||
boolean result = PlotMain.removePlot(world, plot.id);
|
||||
if (result) {
|
||||
runTask(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
PreparedStatement stmt = null;
|
||||
int id = getId(world,plot.id);
|
||||
int id = getId(world, plot.id);
|
||||
try {
|
||||
stmt = connection.prepareStatement("DELETE FROM `plot_settings` WHERE `plot_plot_id` = ?");
|
||||
stmt.setInt(1, id);
|
||||
@ -194,6 +223,7 @@ public class DBFunc {
|
||||
|
||||
/**
|
||||
* Create plot settings
|
||||
*
|
||||
* @param id
|
||||
* @param plot
|
||||
*/
|
||||
@ -208,7 +238,7 @@ public class DBFunc {
|
||||
stmt.setInt(1, id);
|
||||
stmt.executeUpdate();
|
||||
stmt.close();
|
||||
} catch(SQLException e) {
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@ -260,15 +290,14 @@ public class DBFunc {
|
||||
}*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static HashMap<String, HashMap<PlotId, Plot>> getPlots() {
|
||||
public static HashMap<String, HashMap<PlotId, Plot>> getPlots() {
|
||||
try {
|
||||
DatabaseMetaData data = connection.getMetaData();
|
||||
ResultSet rs = data.getColumns(null, null, "plot", "plot_id");
|
||||
boolean execute = rs.next();
|
||||
if(execute) {
|
||||
if (execute) {
|
||||
Statement statement = connection.createStatement();
|
||||
statement.addBatch(
|
||||
"ALTER IGNORE TABLE `plot` ADD `plot_id_x` int(11) DEFAULT 0"
|
||||
@ -278,16 +307,16 @@ public class DBFunc {
|
||||
);
|
||||
statement.addBatch(
|
||||
"UPDATE `plot` SET\n" +
|
||||
" `plot_id_x` = IF(" +
|
||||
" LOCATE(';', `plot_id`) > 0," +
|
||||
" SUBSTRING(`plot_id`, 1, LOCATE(';', `plot_id`) - 1)," +
|
||||
" `plot_id`" +
|
||||
" )," +
|
||||
" `plot_id_z` = IF(" +
|
||||
" LOCATE(';', `plot_id`) > 0," +
|
||||
" SUBSTRING(`plot_id`, LOCATE(';', `plot_id`) + 1)," +
|
||||
" NULL" +
|
||||
" )"
|
||||
" `plot_id_x` = IF(" +
|
||||
" LOCATE(';', `plot_id`) > 0," +
|
||||
" SUBSTRING(`plot_id`, 1, LOCATE(';', `plot_id`) - 1)," +
|
||||
" `plot_id`" +
|
||||
" )," +
|
||||
" `plot_id_z` = IF(" +
|
||||
" LOCATE(';', `plot_id`) > 0," +
|
||||
" SUBSTRING(`plot_id`, LOCATE(';', `plot_id`) + 1)," +
|
||||
" NULL" +
|
||||
" )"
|
||||
);
|
||||
statement.addBatch(
|
||||
"ALTER TABLE `plot` DROP `plot_id`"
|
||||
@ -298,11 +327,11 @@ public class DBFunc {
|
||||
statement.executeBatch();
|
||||
statement.close();
|
||||
}
|
||||
} catch(Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
HashMap<String, HashMap<PlotId, Plot>> plots = new HashMap<String, HashMap<PlotId, Plot>>();
|
||||
HashMap<String, World> worldMap = new HashMap<String, World>();
|
||||
HashMap<String, HashMap<PlotId, Plot>> plots = new HashMap<String, HashMap<PlotId, Plot>>();
|
||||
HashMap<String, World> worldMap = new HashMap<String, World>();
|
||||
Statement stmt = null;
|
||||
try {
|
||||
stmt = connection.createStatement();
|
||||
@ -312,30 +341,29 @@ public class DBFunc {
|
||||
Plot p;
|
||||
World w;
|
||||
while (r.next()) {
|
||||
plot_id = new PlotId(r.getInt("plot_id_x"),r.getInt("plot_id_z"));
|
||||
plot_id = new PlotId(r.getInt("plot_id_x"), r.getInt("plot_id_z"));
|
||||
id = r.getInt("id");
|
||||
String worldname = r.getString("world");
|
||||
// Quicker to get cache the UUID to the World than to convert each time.
|
||||
HashMap<String, Object> settings = getSettings(id);
|
||||
UUID owner = UUID.fromString(r.getString("owner"));
|
||||
Biome plotBiome = Biome.valueOf((String) settings.get("biome"));
|
||||
if(plotBiome == null) plotBiome = Biome.FOREST;
|
||||
if (plotBiome == null) plotBiome = Biome.FOREST;
|
||||
String[] flags_string;
|
||||
if (settings.get("flags") == null)
|
||||
flags_string = new String[] {};
|
||||
flags_string = new String[]{};
|
||||
else
|
||||
flags_string = ((String) settings.get("flags")).split(",");
|
||||
Flag[] flags = new Flag[flags_string.length];
|
||||
for (int i = 0; i<flags.length; i++) {
|
||||
for (int i = 0; i < flags.length; i++) {
|
||||
if (flags_string[i].contains(":")) {
|
||||
String[] split = flags_string[i].split(":");
|
||||
flags[i] = new Flag(split[0], split[1]);
|
||||
}
|
||||
else {
|
||||
flags[i] = new Flag(flags_string[i], "");
|
||||
flags[i] = new Flag(FlagManager.getFlag(split[0], true), split[1]);
|
||||
} else {
|
||||
flags[i] = new Flag(FlagManager.getFlag(flags_string[i], true), "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ArrayList<UUID> helpers = plotHelpers(id);
|
||||
ArrayList<UUID> denied = plotDenied(id);
|
||||
//boolean changeTime = ((Short) settings.get("custom_time") == 0) ? false : true;
|
||||
@ -346,17 +374,16 @@ public class DBFunc {
|
||||
//boolean rain = Integer.parseInt(settings.get("rain").toString()) == 1 ? true : false;
|
||||
boolean rain = false;
|
||||
String alias = (String) settings.get("alias");
|
||||
if(alias == null || alias.equalsIgnoreCase("NEW")) alias = "";
|
||||
if (alias == null || alias.equalsIgnoreCase("NEW")) alias = "";
|
||||
PlotHomePosition position = null;
|
||||
for(PlotHomePosition plotHomePosition : PlotHomePosition.values())
|
||||
if(plotHomePosition.isMatching((String)settings.get("position"))) position = plotHomePosition;
|
||||
if(position == null) position = PlotHomePosition.DEFAULT;
|
||||
|
||||
for (PlotHomePosition plotHomePosition : PlotHomePosition.values())
|
||||
if (plotHomePosition.isMatching((String) settings.get("position"))) position = plotHomePosition;
|
||||
if (position == null) position = PlotHomePosition.DEFAULT;
|
||||
|
||||
p = new Plot(plot_id, owner, plotBiome, helpers, denied, /*changeTime*/ false, time, rain, alias, position, flags, worldname);
|
||||
if (plots.containsKey(worldname)) {
|
||||
plots.get(worldname).put((plot_id), p);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
HashMap<PlotId, Plot> map = new HashMap<PlotId, Plot>();
|
||||
map.put((plot_id), p);
|
||||
plots.put(worldname, map);
|
||||
@ -371,11 +398,10 @@ public class DBFunc {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param plot
|
||||
* @param rain
|
||||
*/
|
||||
public static void setWeather(final String world, final Plot plot, final boolean rain) {
|
||||
public static void setWeather(final String world, final Plot plot, final boolean rain) {
|
||||
plot.settings.setRain(rain);
|
||||
runTask(new Runnable() {
|
||||
@Override
|
||||
@ -387,21 +413,22 @@ public class DBFunc {
|
||||
stmt.setInt(2, getId(world, plot.id));
|
||||
stmt.execute();
|
||||
stmt.close();
|
||||
} catch(SQLException e) {
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
Logger.add(LogLevel.WARNING, "Could not set weather for plot " + plot.id);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
public static void setFlags(final String world, final Plot plot, final Flag[] flags) {
|
||||
|
||||
public static void setFlags(final String world, final Plot plot, final Flag[] flags) {
|
||||
plot.settings.setFlags(flags);
|
||||
final StringBuilder flag_string = new StringBuilder();
|
||||
int i = 0;
|
||||
for (Flag flag:flags) {
|
||||
if (i!=0)
|
||||
for (Flag flag : flags) {
|
||||
if (i != 0)
|
||||
flag_string.append(",");
|
||||
flag_string.append(flag.getKey()+":"+flag.getValue());
|
||||
flag_string.append(flag.getKey() + ":" + flag.getValue());
|
||||
i++;
|
||||
}
|
||||
runTask(new Runnable() {
|
||||
@ -413,7 +440,7 @@ public class DBFunc {
|
||||
stmt.setInt(2, getId(world, plot.id));
|
||||
stmt.execute();
|
||||
stmt.close();
|
||||
} catch(SQLException e) {
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
Logger.add(LogLevel.WARNING, "Could not set flag for plot " + plot.id);
|
||||
}
|
||||
@ -422,7 +449,6 @@ public class DBFunc {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param plot
|
||||
* @param alias
|
||||
*/
|
||||
@ -438,7 +464,7 @@ public class DBFunc {
|
||||
stmt.setInt(2, getId(world, plot.id));
|
||||
stmt.executeUpdate();
|
||||
stmt.close();
|
||||
} catch(SQLException e) {
|
||||
} catch (SQLException e) {
|
||||
Logger.add(LogLevel.WARNING, "Failed to set alias for plot " + plot.id);
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -448,7 +474,6 @@ public class DBFunc {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param r
|
||||
*/
|
||||
private static void runTask(Runnable r) {
|
||||
@ -456,11 +481,10 @@ public class DBFunc {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param plot
|
||||
* @param position
|
||||
*/
|
||||
public static void setPosition(final String world,final Plot plot, final String position) {
|
||||
public static void setPosition(final String world, final Plot plot, final String position) {
|
||||
plot.settings.setPosition(PlotHomePosition.valueOf(position));
|
||||
runTask(new Runnable() {
|
||||
@Override
|
||||
@ -472,7 +496,7 @@ public class DBFunc {
|
||||
stmt.setInt(2, getId(world, plot.id));
|
||||
stmt.executeUpdate();
|
||||
stmt.close();
|
||||
} catch(SQLException e) {
|
||||
} catch (SQLException e) {
|
||||
Logger.add(LogLevel.WARNING, "Failed to set position for plot " + plot.id);
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -481,7 +505,6 @@ public class DBFunc {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ -494,19 +517,19 @@ public class DBFunc {
|
||||
ResultSet r = stmt.executeQuery();
|
||||
String var;
|
||||
Object val;
|
||||
while(r.next()) {
|
||||
while (r.next()) {
|
||||
var = "biome";
|
||||
val = r.getObject(var);
|
||||
h.put(var,val);
|
||||
h.put(var, val);
|
||||
var = "rain";
|
||||
val = r.getObject(var);
|
||||
h.put(var,val);
|
||||
h.put(var, val);
|
||||
var = "custom_time";
|
||||
val = r.getObject(var);
|
||||
h.put(var, val);
|
||||
var = "time";
|
||||
val = r.getObject(var);
|
||||
h.put(var,val);
|
||||
h.put(var, val);
|
||||
var = "deny_entry";
|
||||
val = r.getObject(var);
|
||||
h.put(var, (short) 0);
|
||||
@ -520,9 +543,10 @@ public class DBFunc {
|
||||
val = r.getObject(var);
|
||||
h.put(var, val);
|
||||
}
|
||||
stmt.close();;
|
||||
} catch(SQLException e) {
|
||||
Logger.add(LogLevel.WARNING, "Failed to load settings for plot: " + id);
|
||||
stmt.close();
|
||||
;
|
||||
} catch (SQLException e) {
|
||||
Logger.add(LogLevel.WARNING, "Failed to load settings for plot: " + id);
|
||||
e.printStackTrace();
|
||||
}
|
||||
return h;
|
||||
@ -534,7 +558,6 @@ public class DBFunc {
|
||||
public static UUID everyone = UUID.fromString("1-1-3-3-7");
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ -546,12 +569,12 @@ public class DBFunc {
|
||||
stmt.setInt(1, id);
|
||||
ResultSet r = stmt.executeQuery();
|
||||
UUID u;
|
||||
while(r.next()) {
|
||||
while (r.next()) {
|
||||
u = UUID.fromString(r.getString("user_uuid"));
|
||||
l.add(u);
|
||||
}
|
||||
stmt.close();
|
||||
} catch(Exception e) {
|
||||
} catch (Exception e) {
|
||||
Logger.add(LogLevel.DANGER, "Failed to load denied for plot: " + id);
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -559,35 +582,33 @@ public class DBFunc {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
private static ArrayList<UUID> plotHelpers(int id) {
|
||||
ArrayList<UUID> l = new ArrayList<UUID>();
|
||||
Statement stmt = null;
|
||||
try {
|
||||
stmt = connection.createStatement();
|
||||
ResultSet r = stmt.executeQuery("SELECT `user_uuid` FROM `plot_helpers` WHERE `plot_plot_id` = " + id);
|
||||
UUID u;
|
||||
while(r.next()) {
|
||||
u = UUID.fromString(r.getString("user_uuid"));
|
||||
l.add(u);
|
||||
}
|
||||
stmt.close();
|
||||
} catch (SQLException e) {
|
||||
Logger.add(LogLevel.WARNING, "Failed to load helpers for plot: " + id);
|
||||
e.printStackTrace();
|
||||
}
|
||||
return l;
|
||||
}
|
||||
private static ArrayList<UUID> plotHelpers(int id) {
|
||||
ArrayList<UUID> l = new ArrayList<UUID>();
|
||||
Statement stmt = null;
|
||||
try {
|
||||
stmt = connection.createStatement();
|
||||
ResultSet r = stmt.executeQuery("SELECT `user_uuid` FROM `plot_helpers` WHERE `plot_plot_id` = " + id);
|
||||
UUID u;
|
||||
while (r.next()) {
|
||||
u = UUID.fromString(r.getString("user_uuid"));
|
||||
l.add(u);
|
||||
}
|
||||
stmt.close();
|
||||
} catch (SQLException e) {
|
||||
Logger.add(LogLevel.WARNING, "Failed to load helpers for plot: " + id);
|
||||
e.printStackTrace();
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param plot
|
||||
* @param player
|
||||
*/
|
||||
public static void removeHelper(final String world,final Plot plot, final OfflinePlayer player) {
|
||||
public static void removeHelper(final String world, final Plot plot, final OfflinePlayer player) {
|
||||
runTask(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -597,7 +618,7 @@ public class DBFunc {
|
||||
statement.setString(2, player.getUniqueId().toString());
|
||||
statement.executeUpdate();
|
||||
statement.close();
|
||||
} catch(SQLException e) {
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
Logger.add(LogLevel.WARNING, "Failed to remove helper for plot " + plot.id);
|
||||
}
|
||||
@ -606,11 +627,10 @@ public class DBFunc {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param plot
|
||||
* @param player
|
||||
*/
|
||||
public static void setHelper(final String world,final Plot plot, final OfflinePlayer player) {
|
||||
public static void setHelper(final String world, final Plot plot, final OfflinePlayer player) {
|
||||
runTask(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -620,7 +640,7 @@ public class DBFunc {
|
||||
statement.setString(2, player.getUniqueId().toString());
|
||||
statement.executeUpdate();
|
||||
statement.close();
|
||||
} catch(SQLException e) {
|
||||
} catch (SQLException e) {
|
||||
Logger.add(LogLevel.WARNING, "Failed to set helper for plot " + plot.id);
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -629,7 +649,6 @@ public class DBFunc {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param plot
|
||||
* @param player
|
||||
*/
|
||||
@ -643,7 +662,7 @@ public class DBFunc {
|
||||
statement.setString(2, player.getUniqueId().toString());
|
||||
statement.executeUpdate();
|
||||
statement.close();
|
||||
} catch(SQLException e) {
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
Logger.add(LogLevel.WARNING, "Failed to remove denied for plot " + plot.id);
|
||||
}
|
||||
@ -652,7 +671,6 @@ public class DBFunc {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param plot
|
||||
* @param player
|
||||
*/
|
||||
@ -666,7 +684,7 @@ public class DBFunc {
|
||||
statement.setString(2, player.getUniqueId().toString());
|
||||
statement.executeUpdate();
|
||||
statement.close();
|
||||
} catch(SQLException e) {
|
||||
} catch (SQLException e) {
|
||||
Logger.add(LogLevel.WARNING, "Failed to set denied for plot " + plot.id);
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -0,0 +1,7 @@
|
||||
package com.intellectualcrafters.plot.database;
|
||||
|
||||
/**
|
||||
* Created by Citymonstret on 2014-09-23.
|
||||
*/
|
||||
public class FlatFileManager {
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
package com.intellectualcrafters.plot.database;
|
||||
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.sql.*;
|
||||
import java.util.logging.Level;
|
||||
|
||||
/**
|
||||
* Connects to and uses a SQLite database
|
||||
* @author Citymonstret
|
||||
* @author tips48
|
||||
*/
|
||||
public class SQLite extends Database {
|
||||
|
||||
private Connection connection;
|
||||
private final String dbLocation;
|
||||
/**
|
||||
* Creates a new SQLite instance
|
||||
*
|
||||
* @param plugin
|
||||
* Plugin instance
|
||||
* @param dbLocation
|
||||
* Location of the Database (Must end in .db)
|
||||
*/
|
||||
public SQLite(Plugin plugin, String dbLocation) {
|
||||
super(plugin);
|
||||
this.dbLocation = dbLocation;
|
||||
}
|
||||
@Override
|
||||
public Connection openConnection() throws SQLException,
|
||||
ClassNotFoundException {
|
||||
if (checkConnection()) {
|
||||
return connection;
|
||||
}
|
||||
if (!plugin.getDataFolder().exists()) {
|
||||
plugin.getDataFolder().mkdirs();
|
||||
}
|
||||
File file = new File(plugin.getDataFolder(), dbLocation);
|
||||
if (!(file.exists())) {
|
||||
try {
|
||||
file.createNewFile();
|
||||
} catch (IOException e) {
|
||||
plugin.getLogger().log(Level.SEVERE,
|
||||
"Unable to create database!");
|
||||
}
|
||||
}
|
||||
Class.forName("org.sqlite.JDBC");
|
||||
connection = DriverManager
|
||||
.getConnection("jdbc:sqlite:"
|
||||
+ plugin.getDataFolder().toPath().toString() + "/"
|
||||
+ dbLocation);
|
||||
return connection;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkConnection() throws SQLException {
|
||||
return connection != null && !connection.isClosed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Connection getConnection() {
|
||||
return connection;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean closeConnection() throws SQLException {
|
||||
if (connection == null) {
|
||||
return false;
|
||||
}
|
||||
connection.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultSet querySQL(String query) throws SQLException,
|
||||
ClassNotFoundException {
|
||||
if (checkConnection()) {
|
||||
openConnection();
|
||||
}
|
||||
|
||||
Statement statement = connection.createStatement();
|
||||
|
||||
ResultSet result = statement.executeQuery(query);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateSQL(String query) throws SQLException,
|
||||
ClassNotFoundException {
|
||||
if (checkConnection()) {
|
||||
openConnection();
|
||||
}
|
||||
|
||||
Statement statement = connection.createStatement();
|
||||
|
||||
int result = statement.executeUpdate(query);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user