Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix crlf?

  • Loading branch information...
commit c6c735cfce9bce04d24679ad9aae9f5783c8fc49 1 parent 214a5f8
Joseph Verburg authored
Showing with 4,996 additions and 4,782 deletions.
  1. +0 −15 .gitignore
  2. +49 −49 Builder.xml
  3. +29 −29 db.sql
  4. +267 −267 formatting.xml
  5. +36 −36 plugin.yml
  6. +119 −114 src/com/zones/Region.java
  7. +111 −106 src/com/zones/World.java
  8. +299 −299 src/com/zones/ZoneBase.java
  9. +36 −36 src/com/zones/ZoneForm.java
  10. +292 −287 src/com/zones/ZoneManager.java
  11. +192 −187 src/com/zones/Zones.java
  12. +195 −190 src/com/zones/ZonesAccess.java
  13. +68 −63 src/com/zones/ZonesConfig.java
  14. +466 −461 src/com/zones/ZonesDummyZone.java
  15. +373 −368 src/com/zones/commands/ZoneCommand.java
  16. +93 −88 src/com/zones/commands/ZoneCommandMap.java
  17. +43 −38 src/com/zones/commands/admin/ZAddAdminCommand.java
  18. +35 −30 src/com/zones/commands/admin/ZDeleteCommand.java
  19. +28 −23 src/com/zones/commands/admin/ZGetAccessCommand.java
  20. +32 −27 src/com/zones/commands/admin/ZReloadCommand.java
  21. +36 −31 src/com/zones/commands/admin/ZRemoveAdminCommand.java
  22. +38 −33 src/com/zones/commands/admin/ZSetGroupCommand.java
  23. +47 −42 src/com/zones/commands/admin/ZSetUserCommand.java
  24. +44 −39 src/com/zones/commands/create/ZAddCommand.java
  25. +25 −20 src/com/zones/commands/create/ZConfirmCommand.java
  26. +45 −40 src/com/zones/commands/create/ZCreateCommand.java
  27. +25 −20 src/com/zones/commands/create/ZEditCommand.java
  28. +42 −37 src/com/zones/commands/create/ZMergeCommand.java
  29. +39 −34 src/com/zones/commands/create/ZRemoveCommand.java
  30. +40 −35 src/com/zones/commands/create/ZSaveCommand.java
  31. +35 −30 src/com/zones/commands/create/ZSetDepthCommand.java
  32. +35 −30 src/com/zones/commands/create/ZSetHeightCommand.java
  33. +25 −20 src/com/zones/commands/create/ZSetPlotCommand.java
  34. +41 −36 src/com/zones/commands/create/ZSetTypeCommand.java
  35. +33 −28 src/com/zones/commands/create/ZSetzCommand.java
  36. +27 −22 src/com/zones/commands/create/ZStopCommand.java
  37. +70 −65 src/com/zones/commands/general/ZHelpCommand.java
  38. +27 −22 src/com/zones/commands/general/ZRegionInfoCommand.java
  39. +54 −49 src/com/zones/commands/general/ZSelectCommand.java
  40. +45 −40 src/com/zones/commands/settings/ZSetNameCommand.java
  41. +38 −33 src/com/zones/commands/settings/ZToggleAnimalsCommand.java
  42. +118 −113 src/com/zones/commands/settings/ZToggleCommand.java
  43. +38 −33 src/com/zones/commands/settings/ZToggleDynamiteCommand.java
  44. +39 −34 src/com/zones/commands/settings/ZToggleHealthCommand.java
  45. +37 −32 src/com/zones/commands/settings/ZToggleLavaCommand.java
  46. +37 −32 src/com/zones/commands/settings/ZToggleMobsCommand.java
  47. +37 −32 src/com/zones/commands/settings/ZToggleWaterCommand.java
  48. +50 −48 src/com/zones/config/Zones.properties
  49. +152 −152 src/com/zones/forms/ZoneCuboid.java
  50. +173 −173 src/com/zones/forms/ZoneNPoly.java
  51. +1 −0  src/com/zones/listeners/ZonesBlockListener.java
  52. +2 −0  src/com/zones/listeners/ZonesEntityListener.java
  53. +2 −0  src/com/zones/listeners/ZonesPlayerListener.java
  54. +2 −0  src/com/zones/listeners/ZonesVehicleListener.java
  55. +416 −411 src/com/zones/types/ZoneNormal.java
  56. +18 −13 src/com/zones/types/ZonePlot.java
  57. +171 −166 src/com/zones/util/Properties.java
  58. +129 −124 src/com/zones/util/Settings.java
15 .gitignore
View
@@ -1,15 +0,0 @@
-
-/build
-/bin
-/compiler.xml
-/.classpath
-/.project
-/.settings
-/nbbuild
-/nbproject
-/build.xml
-/.gitignore
-/dist
-/craftbukkit-0.0.1-SNAPSHOT.jar
-/Permissions.jar
-/bukkit-0.0.1-SNAPSHOT.jar
98 Builder.xml
View
@@ -1,50 +1,50 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="Zones" default="jar" basedir=".">
- <description>
- This script will build the plugin.
- </description>
-
- <property name="src" location="src" />
- <property name="build" location="build" />
- <property name="build.classes" location="${build}/classes" />
-
- <path id="classpath">
- <fileset dir="">
- <include name="craftbukkit-0.0.1-SNAPSHOT.jar" />
- <include name="Permissions.jar" />
- </fileset>
- </path>
-
- <target name="verifyRequirements" description="Checks if the necessary requirements for building Handler are fulfilled">
- <available classname="javax.script.ScriptContext" property="JDK6.present" />
- <fail unless="JDK6.present" message="JDK 6 or greater is required." />
- </target>
-
- <target name="init" depends="clean, verifyRequirements" description="Create the output directories.">
- <mkdir dir="${build}" />
- <mkdir dir="${build.classes}" />
- </target>
-
- <target name="compile" depends="init" description="Compile the source.">
- <javac destdir="${build.classes}" optimize="on" debug="on" source="1.6" target="1.6" nowarn="off">
- <src path="${src}" />
- <classpath refid="classpath" />
- </javac>
- </target>
-
- <target name="jar" depends="compile" description="Create the jar file">
- <jar destfile="${build}/Zones.jar">
- <fileset dir="${build.classes}" />
- <zipfileset dir="${src}/com/zones/config/" prefix="com/zones/config/" >
- <include name="Zones.properties" />
- </zipfileset >
- <zipfileset dir="" prefix="" >
- <include name="plugin.yml" />
- </zipfileset >
- </jar>
- </target>
-
- <target name="clean" description="Remove the output directories">
- <delete dir="${build}" />
- </target>
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="Zones" default="jar" basedir=".">
+ <description>
+ This script will build the plugin.
+ </description>
+
+ <property name="src" location="src" />
+ <property name="build" location="build" />
+ <property name="build.classes" location="${build}/classes" />
+
+ <path id="classpath">
+ <fileset dir="">
+ <include name="craftbukkit-0.0.1-SNAPSHOT.jar" />
+ <include name="Permissions.jar" />
+ </fileset>
+ </path>
+
+ <target name="verifyRequirements" description="Checks if the necessary requirements for building Handler are fulfilled">
+ <available classname="javax.script.ScriptContext" property="JDK6.present" />
+ <fail unless="JDK6.present" message="JDK 6 or greater is required." />
+ </target>
+
+ <target name="init" depends="clean, verifyRequirements" description="Create the output directories.">
+ <mkdir dir="${build}" />
+ <mkdir dir="${build.classes}" />
+ </target>
+
+ <target name="compile" depends="init" description="Compile the source.">
+ <javac destdir="${build.classes}" optimize="on" debug="on" source="1.6" target="1.6" nowarn="off">
+ <src path="${src}" />
+ <classpath refid="classpath" />
+ </javac>
+ </target>
+
+ <target name="jar" depends="compile" description="Create the jar file">
+ <jar destfile="${build}/Zones.jar">
+ <fileset dir="${build.classes}" />
+ <zipfileset dir="${src}/com/zones/config/" prefix="com/zones/config/" >
+ <include name="Zones.properties" />
+ </zipfileset >
+ <zipfileset dir="" prefix="" >
+ <include name="plugin.yml" />
+ </zipfileset >
+ </jar>
+ </target>
+
+ <target name="clean" description="Remove the output directories">
+ <delete dir="${build}" />
+ </target>
</project>
58 db.sql
View
@@ -1,30 +1,30 @@
---
--- Tabelstructuur voor tabel `zones`
---
-
-CREATE TABLE IF NOT EXISTS `zones` (
- `id` int(10) NOT NULL AUTO_INCREMENT,
- `name` varchar(255) DEFAULT NULL,
- `class` varchar(255) DEFAULT NULL,
- `type` int(11) DEFAULT '1',
- `world` varchar(255) NOT NULL DEFAULT 'world',
- `admins` text,
- `users` text,
- `minz` int(10) DEFAULT NULL,
- `maxz` int(10) DEFAULT NULL,
- `settings` longtext not null,
- `size` int(10) DEFAULT '2',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-
---
--- Tabelstructuur voor tabel `zones_vertices`
---
-
-CREATE TABLE IF NOT EXISTS `zones_vertices` (
- `id` int(11) NOT NULL,
- `order` int(11) NOT NULL,
- `x` int(11) NOT NULL,
- `y` int(11) NOT NULL,
- PRIMARY KEY (`id`,`order`)
+--
+-- Tabelstructuur voor tabel `zones`
+--
+
+CREATE TABLE IF NOT EXISTS `zones` (
+ `id` int(10) NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) DEFAULT NULL,
+ `class` varchar(255) DEFAULT NULL,
+ `type` int(11) DEFAULT '1',
+ `world` varchar(255) NOT NULL DEFAULT 'world',
+ `admins` text,
+ `users` text,
+ `minz` int(10) DEFAULT NULL,
+ `maxz` int(10) DEFAULT NULL,
+ `settings` longtext not null,
+ `size` int(10) DEFAULT '2',
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
+
+--
+-- Tabelstructuur voor tabel `zones_vertices`
+--
+
+CREATE TABLE IF NOT EXISTS `zones_vertices` (
+ `id` int(11) NOT NULL,
+ `order` int(11) NOT NULL,
+ `x` int(11) NOT NULL,
+ `y` int(11) NOT NULL,
+ PRIMARY KEY (`id`,`order`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
534 formatting.xml
View
@@ -1,267 +1,267 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<profiles version="11">
-<profile kind="CodeFormatterProfile" name="hMod" version="11">
-<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
-<setting id="org.eclipse.jdt.core.compiler.source" value="1.5"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="500"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
-<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
-<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
-<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
-<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.5"/>
-<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
-<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="80"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
-<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.5"/>
-<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
-</profile>
-</profiles>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<profiles version="11">
+<profile kind="CodeFormatterProfile" name="hMod" version="11">
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.jdt.core.compiler.source" value="1.5"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="500"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.5"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
+<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.5"/>
+<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+</profile>
+</profiles>
72 plugin.yml
View
@@ -1,37 +1,37 @@
-name: Zones
-main: com.zones.Zones
-version: 1.1
-author: Meaglin
-website: https://github.com/Meaglin/0xFFFF
-commands:
- zhelp
- zcreate
- zadd
- zremove
- zsetplot
- zsetheight
- zsetdepth
- zsave
- zconfirm
- zsetz
- zstop
- zsetuser
- zsetgroup
- zaddadmin
- zremoveadmin
- zselect
- zsettype
- zregion
- zgetaccess
- zdelete
- zsetname
- ztogglehealth
- ztoggledynamite
- ztogglelava
- ztogglewater
- ztogglemobs
- ztoggleanimals
- zedit
- zmerge
- zreload
+name: Zones
+main: com.zones.Zones
+version: 1.2
+author: Meaglin
+website: https://github.com/Meaglin/0xFFFF
+commands:
+ zhelp
+ zcreate
+ zadd
+ zremove
+ zsetplot
+ zsetheight
+ zsetdepth
+ zsave
+ zconfirm
+ zsetz
+ zstop
+ zsetuser
+ zsetgroup
+ zaddadmin
+ zremoveadmin
+ zselect
+ zsettype
+ zregion
+ zgetaccess
+ zdelete
+ zsetname
+ ztogglehealth
+ ztoggledynamite
+ ztogglelava
+ ztogglewater
+ ztogglemobs
+ ztoggleanimals
+ zedit
+ zmerge
+ zreload
ztoggle
233 src/com/zones/Region.java
View
@@ -1,114 +1,119 @@
-package com.zones;
-
-import java.util.ArrayList;
-import org.bukkit.Location;
-import org.bukkit.entity.Player;
-
-public class Region {
-
- private ArrayList<ZoneBase> _zones;
- private int x, y;
-
- public Region(int x, int y) {
- this.x = x;
- this.y = y;
- _zones = new ArrayList<ZoneBase>();
- }
-
- public void addZone(ZoneBase zone) {
- if (_zones.contains(zone))
- return;
-
- _zones.add(zone);
- }
-
- public void removeZone(ZoneBase zone) {
- for (int i = 0; i < _zones.size(); i++) {
- if (_zones.get(i).getId() == zone.getId())
- _zones.remove(i);
- }
- }
-
- public ArrayList<ZoneBase> getZones() {
- return _zones;
- }
-
- public ZoneBase getActiveZone(Player player) {return getActiveZone(player.getLocation());}
- public ZoneBase getActiveZone(Location loc) {return getActiveZone(loc.getX(), loc.getZ(), loc.getY(),loc.getWorld().getName());}
- public ZoneBase getActiveZone(double x, double y, double z,String world) {return getActiveZone(World.toInt(x), World.toInt(y), World.toInt(z),world);}
-
- public ArrayList<ZoneBase> getActiveZones(Player player) {return getActiveZones(player.getLocation());}
- public ArrayList<ZoneBase> getActiveZones(Location loc) {return getActiveZones(loc.getX(), loc.getZ(), loc.getY(),loc.getWorld().getName());}
- public ArrayList<ZoneBase> getActiveZones(double x, double y, double z,String world) {return getActiveZones(World.toInt(x), World.toInt(y), World.toInt(z),world);}
-
- public ZoneBase getActiveZone(int x, int y, int z,String world) {
- ZoneBase primary = null;
-
- for (ZoneBase zone : getZones())
- if (zone.isInsideZone(x, y, z,world) && (primary == null || primary.getZone().getSize() > zone.getZone().getSize()))
- primary = zone;
-
- return primary;
- }
-
- public ArrayList<ZoneBase> getActiveZones(int x, int y, int z,String world) {
- ArrayList<ZoneBase> zones = new ArrayList<ZoneBase>();
-
- for (ZoneBase zone : getZones())
- if (zone.isInsideZone(x, y, z,world))
- zones.add(zone);
-
- return zones;
- }
-
- public ArrayList<ZoneBase> getAdminZones(Player player) {
- ArrayList<ZoneBase> zones = new ArrayList<ZoneBase>();
-
- for (ZoneBase zone : getZones())
- if (zone.isInsideZone(player) && zone.canAdministrate(player))
- zones.add(zone);
-
- return zones;
- }
-
- public ArrayList<ZoneBase> getAdminZones(Player player, Location loc) {
- ArrayList<ZoneBase> zones = new ArrayList<ZoneBase>();
-
- for (ZoneBase zone : getZones())
- if (zone.isInsideZone(loc) && zone.canAdministrate(player))
- zones.add(zone);
-
- return zones;
- }
-
- public int getX() {
- return x;
- }
-
- public int getY() {
- return y;
- }
-
- public void revalidateZones(Player player) {
- for (ZoneBase z : getZones()) {
- if (z != null)
- z.revalidateInZone(player);
- }
- }
-
- public void revalidateZones(Player player, Location loc) {
- for (ZoneBase z : getZones()) {
- if (z != null)
- z.revalidateInZone(player, loc);
- }
- }
-
- public boolean equals(Object object) {
- if(!(object instanceof Region))
- return false;
-
- Region r = (Region)object;
-
- return (r.getX() == getX() && r.getY() == getY());
- }
-}
+package com.zones;
+
+import java.util.ArrayList;
+import org.bukkit.Location;
+import org.bukkit.entity.Player;
+
+/**
+ *
+ * @author Meaglin
+ *
+ */
+public class Region {
+
+ private ArrayList<ZoneBase> _zones;
+ private int x, y;
+
+ public Region(int x, int y) {
+ this.x = x;
+ this.y = y;
+ _zones = new ArrayList<ZoneBase>();
+ }
+
+ public void addZone(ZoneBase zone) {
+ if (_zones.contains(zone))
+ return;
+
+ _zones.add(zone);
+ }
+
+ public void removeZone(ZoneBase zone) {
+ for (int i = 0; i < _zones.size(); i++) {
+ if (_zones.get(i).getId() == zone.getId())
+ _zones.remove(i);
+ }
+ }
+
+ public ArrayList<ZoneBase> getZones() {
+ return _zones;
+ }
+
+ public ZoneBase getActiveZone(Player player) {return getActiveZone(player.getLocation());}
+ public ZoneBase getActiveZone(Location loc) {return getActiveZone(loc.getX(), loc.getZ(), loc.getY(),loc.getWorld().getName());}
+ public ZoneBase getActiveZone(double x, double y, double z,String world) {return getActiveZone(World.toInt(x), World.toInt(y), World.toInt(z),world);}
+
+ public ArrayList<ZoneBase> getActiveZones(Player player) {return getActiveZones(player.getLocation());}
+ public ArrayList<ZoneBase> getActiveZones(Location loc) {return getActiveZones(loc.getX(), loc.getZ(), loc.getY(),loc.getWorld().getName());}
+ public ArrayList<ZoneBase> getActiveZones(double x, double y, double z,String world) {return getActiveZones(World.toInt(x), World.toInt(y), World.toInt(z),world);}
+
+ public ZoneBase getActiveZone(int x, int y, int z,String world) {
+ ZoneBase primary = null;
+
+ for (ZoneBase zone : getZones())
+ if (zone.isInsideZone(x, y, z,world) && (primary == null || primary.getZone().getSize() > zone.getZone().getSize()))
+ primary = zone;
+
+ return primary;
+ }
+
+ public ArrayList<ZoneBase> getActiveZones(int x, int y, int z,String world) {
+ ArrayList<ZoneBase> zones = new ArrayList<ZoneBase>();
+
+ for (ZoneBase zone : getZones())
+ if (zone.isInsideZone(x, y, z,world))
+ zones.add(zone);
+
+ return zones;
+ }
+
+ public ArrayList<ZoneBase> getAdminZones(Player player) {
+ ArrayList<ZoneBase> zones = new ArrayList<ZoneBase>();
+
+ for (ZoneBase zone : getZones())
+ if (zone.isInsideZone(player) && zone.canAdministrate(player))
+ zones.add(zone);
+
+ return zones;
+ }
+
+ public ArrayList<ZoneBase> getAdminZones(Player player, Location loc) {
+ ArrayList<ZoneBase> zones = new ArrayList<ZoneBase>();
+
+ for (ZoneBase zone : getZones())
+ if (zone.isInsideZone(loc) && zone.canAdministrate(player))
+ zones.add(zone);
+
+ return zones;
+ }
+
+ public int getX() {
+ return x;
+ }
+
+ public int getY() {
+ return y;
+ }
+
+ public void revalidateZones(Player player) {
+ for (ZoneBase z : getZones()) {
+ if (z != null)
+ z.revalidateInZone(player);
+ }
+ }
+
+ public void revalidateZones(Player player, Location loc) {
+ for (ZoneBase z : getZones()) {
+ if (z != null)
+ z.revalidateInZone(player, loc);
+ }
+ }
+
+ public boolean equals(Object object) {
+ if(!(object instanceof Region))
+ return false;
+
+ Region r = (Region)object;
+
+ return (r.getX() == getX() && r.getY() == getY());
+ }
+}
217 src/com/zones/World.java
View
@@ -1,106 +1,111 @@
-package com.zones;
-
-import java.util.ArrayList;
-import org.bukkit.Location;
-import org.bukkit.entity.Player;
-
-public class World {
- public static final int MIN_X = -10240;
- public static final int MAX_X = 10240;
-
- public static final int MIN_Y = -10240;
- public static final int MAX_Y = 10240;
-
- public static final int MIN_Z = 0;
- public static final int MAX_Z = 127;
-
- public static final int SHIFT_SIZE = 8;
- public static final int BLOCK_SIZE = (int) (Math.pow(2, SHIFT_SIZE) - 1);
-
- public static final int X_REGIONS = ((MAX_X - MIN_X) >> SHIFT_SIZE) + 1;
- public static final int Y_REGIONS = ((MAX_Y - MIN_Y) >> SHIFT_SIZE) + 1;
-
- public static final int XMOD = (MIN_X < 0 ? -1 : 1);
- public static final int YMOD = (MIN_Y < 0 ? -1 : 1);
-
- public static final int OFFSET_X = ((MIN_X * XMOD) >> SHIFT_SIZE) * XMOD;
- public static final int OFFSET_Y = ((MIN_Y * YMOD) >> SHIFT_SIZE) * YMOD;
-
- private Region[][] regions;
- private Region emptyRegion = new Region(0,0);
-
- public World() {
- load();
- }
- public void load() {
- try {
- regions = new Region[X_REGIONS][Y_REGIONS];
- for (int x = 0; x < X_REGIONS; x++) {
- for (int y = 0; y < Y_REGIONS; y++) {
- regions[x][y] = new Region(x, y);
- }
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- ZoneManager.log.info("[Zones]Loaded " + X_REGIONS * Y_REGIONS + " regions.");
- }
-
- public Region getRegion(Player player) {return getRegion(player.getLocation());}
- public Region getRegion(Location loc) {return getRegion(loc.getX(),loc.getZ()); }
- public Region getRegion(double x, double y) {return getRegion(toInt(x), toInt(y));}
-
-
- public ArrayList<ZoneBase> getAdminZones(Player player) {return getRegion(player).getAdminZones(player);}
-
- public ArrayList<ZoneBase> getAdminZones(Player player,Location loc) {return getRegion(loc).getAdminZones(player,loc);}
-
- public ArrayList<ZoneBase> getActiveZones(Player player) {return getRegion(player).getActiveZones(player);}
-
- public ZoneBase getActiveZone(Player player) {return getRegion(player).getActiveZone(player);}
- public ZoneBase getActiveZone(double x, double y, double z,String world) {return getRegion(x, y).getActiveZone(x, y, z,world);}
- public ZoneBase getActiveZone(Location loc) {return getRegion(loc).getActiveZone(loc);}
-
- public boolean regionChange(Location from,Location to) {return getRegion(from).equals(getRegion(to)); }
-
- public void revalidateZones(Player player) {getRegion(player).revalidateZones(player);}
-
- public Region getRegion(int x, int y) {
- // debug only ;) .
- // System.out.println("get region " + ((x - MIN_X) >> SHIFT_SIZE) + " "
- // + ((y - MIN_Y) >> SHIFT_SIZE));
- if (x > MAX_X || x < MIN_X || y > MAX_Y || y < MIN_Y) {
- ZoneManager.log.warning("[Zones]Warning: Player moving outside world!");
- return emptyRegion;
- }
-
- return regions[(x - MIN_X) >> SHIFT_SIZE][(y - MIN_Y) >> SHIFT_SIZE];
- }
-
- public void addZone(int x, int y, ZoneBase zone) {
- regions[x][y].addZone(zone);
- }
-
- public static final World getInstance() {
- return SingletonHolder._instance;
- }
-
- @SuppressWarnings("synthetic-access")
- private static class SingletonHolder {
- protected static final World _instance = new World();
- }
-
- public void revalidateZones(Player player, Location from, Location to) {
- // region changes.
- if (regionChange(from,to)) {
- getRegion(from).revalidateZones(player, to);
- }
- // default revalidation.
- getRegion(to).revalidateZones(player, to);
- }
-
- public static int toInt(double b) {
- int r = (int) b;
- return b < r ? r - 1 : r;
- }
-}
+package com.zones;
+
+import java.util.ArrayList;
+import org.bukkit.Location;
+import org.bukkit.entity.Player;
+
+/**
+ *
+ * @author Meaglin
+ *
+ */
+public class World {
+ public static final int MIN_X = -10240;
+ public static final int MAX_X = 10240;
+
+ public static final int MIN_Y = -10240;
+ public static final int MAX_Y = 10240;
+
+ public static final int MIN_Z = 0;
+ public static final int MAX_Z = 127;
+
+ public static final int SHIFT_SIZE = 8;
+ public static final int BLOCK_SIZE = (int) (Math.pow(2, SHIFT_SIZE) - 1);
+
+ public static final int X_REGIONS = ((MAX_X - MIN_X) >> SHIFT_SIZE) + 1;
+ public static final int Y_REGIONS = ((MAX_Y - MIN_Y) >> SHIFT_SIZE) + 1;
+
+ public static final int XMOD = (MIN_X < 0 ? -1 : 1);
+ public static final int YMOD = (MIN_Y < 0 ? -1 : 1);
+
+ public static final int OFFSET_X = ((MIN_X * XMOD) >> SHIFT_SIZE) * XMOD;
+ public static final int OFFSET_Y = ((MIN_Y * YMOD) >> SHIFT_SIZE) * YMOD;
+
+ private Region[][] regions;
+ private Region emptyRegion = new Region(0,0);
+
+ public World() {
+ load();
+ }
+ public void load() {
+ try {
+ regions = new Region[X_REGIONS][Y_REGIONS];
+ for (int x = 0; x < X_REGIONS; x++) {
+ for (int y = 0; y < Y_REGIONS; y++) {
+ regions[x][y] = new Region(x, y);
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ ZoneManager.log.info("[Zones]Loaded " + X_REGIONS * Y_REGIONS + " regions.");
+ }
+
+ public Region getRegion(Player player) {return getRegion(player.getLocation());}
+ public Region getRegion(Location loc) {return getRegion(loc.getX(),loc.getZ()); }
+ public Region getRegion(double x, double y) {return getRegion(toInt(x), toInt(y));}
+
+
+ public ArrayList<ZoneBase> getAdminZones(Player player) {return getRegion(player).getAdminZones(player);}
+
+ public ArrayList<ZoneBase> getAdminZones(Player player,Location loc) {return getRegion(loc).getAdminZones(player,loc);}
+
+ public ArrayList<ZoneBase> getActiveZones(Player player) {return getRegion(player).getActiveZones(player);}
+
+ public ZoneBase getActiveZone(Player player) {return getRegion(player).getActiveZone(player);}
+ public ZoneBase getActiveZone(double x, double y, double z,String world) {return getRegion(x, y).getActiveZone(x, y, z,world);}
+ public ZoneBase getActiveZone(Location loc) {return getRegion(loc).getActiveZone(loc);}
+
+ public boolean regionChange(Location from,Location to) {return getRegion(from).equals(getRegion(to)); }
+
+ public void revalidateZones(Player player) {getRegion(player).revalidateZones(player);}
+
+ public Region getRegion(int x, int y) {
+ // debug only ;) .
+ // System.out.println("get region " + ((x - MIN_X) >> SHIFT_SIZE) + " "
+ // + ((y - MIN_Y) >> SHIFT_SIZE));
+ if (x > MAX_X || x < MIN_X || y > MAX_Y || y < MIN_Y) {
+ ZoneManager.log.warning("[Zones]Warning: Player moving outside world!");
+ return emptyRegion;
+ }
+
+ return regions[(x - MIN_X) >> SHIFT_SIZE][(y - MIN_Y) >> SHIFT_SIZE];
+ }
+
+ public void addZone(int x, int y, ZoneBase zone) {
+ regions[x][y].addZone(zone);
+ }
+
+ public static final World getInstance() {
+ return SingletonHolder._instance;
+ }
+
+ @SuppressWarnings("synthetic-access")
+ private static class SingletonHolder {
+ protected static final World _instance = new World();
+ }
+
+ public void revalidateZones(Player player, Location from, Location to) {
+ // region changes.
+ if (regionChange(from,to)) {
+ getRegion(from).revalidateZones(player, to);
+ }
+ // default revalidation.
+ getRegion(to).revalidateZones(player, to);
+ }
+
+ public static int toInt(double b) {
+ int r = (int) b;
+ return b < r ? r - 1 : r;
+ }
+}
598 src/com/zones/ZoneBase.java
View
@@ -1,299 +1,299 @@
-package com.zones;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.util.HashMap;
-import java.util.logging.Logger;
-
-import org.bukkit.Location;
-import org.bukkit.block.Block;
-import org.bukkit.entity.Entity;
-import org.bukkit.entity.Player;
-
-import com.zones.util.Settings;
-
-/**
- * Abstract base class for any zone type Handles basic operations
- *
- * @author durgus, Meaglin
- */
-public abstract class ZoneBase {
- protected static final Logger log = Logger.getLogger(ZoneBase.class.getName());
-
- private final int id;
- protected ZoneForm form;
- protected HashMap<String, Player> characterList;
-
- private String name;
- private Settings settings;
-
- protected Zones zones;
- protected String world;
-
- protected ZoneBase(Zones zones,String world, int id) {
- this.id = id;
- this.zones = zones;
- this.world = world;
- characterList = new HashMap<String, Player>();
- }
-
- public void loadSettings(String data) {
- try {
- loadSettings(Settings.unserialize(data));
- } catch(Exception e) {
- log.warning("[Zones]Error loading settings of " + name + "[" + id + "]");
- e.printStackTrace();
- }
- }
-
- public void loadSettings(Settings settings) {
- this.settings = settings;
- }
- /**
- * @return Returns the id.
- */
- public int getId() {
- return id;
- }
-
- public String getName() {
- return name;
- }
-
- /**
- * Setup new parameters for this zone
- *
- * @param type
- * @param value
- */
- public void setParameter(String name, String value) {
- if (value == null || value.equals(""))
- return;
-
- if (name.equals("name")) {
- this.name = value;
- } else
- log.info(getClass().getSimpleName() + ": Unknown parameter - " + name + " in zone: " + getId());
- }
-
- /**
- * Set the zone for this L2ZoneType Instance
- *
- * @param zone
- */
- public void setZone(ZoneForm zone) {
- form = zone;
- }
-
- /**
- * Returns this zones zone form
- *
- * @param zone
- * @return
- */
- public ZoneForm getZone() {
- return form;
- }
-
- /**
- * Checks if the given coordinates are within zone's plane
- *
- * @param x
- * @param y
- */
- public boolean isInsideZone(int x, int y,String world) {
- if (this.world.equals(world) && form.isInsideZone(x, y, form.getHighZ()))
- return true;
- else
- return false;
- }
-
- /**
- * Checks if the given coordinates are within the zone
- *
- * @param x
- * @param y
- * @param z
- */
- public boolean isInsideZone(int x, int y, int z,String world) {
- if (this.world.equals(world) && form.isInsideZone(x, y, z))
- return true;
- else
- return false;
- }
-
- /**
- * Checks if the given object is inside the zone.
- *
- * @param player
- */
- public boolean isInsideZone(Player player) {return isInsideZone(player.getLocation());}
- public boolean isInsideZone(Location loc) {return isInsideZone(World.toInt(loc.getX()), World.toInt(loc.getZ()), World.toInt(loc.getY()),loc.getWorld().getName());}
-
- public double getDistanceToZone(int x, int y) {return getZone().getDistanceToZone(x, y);}
-
- public double getDistanceToZone(Player player) {
- Location loc = player.getLocation();
- return getZone().getDistanceToZone(World.toInt(loc.getX()), World.toInt(loc.getZ()));
- }
-
- /**
- * Force fully removes a character from the zone Should use during teleport
- * / logoff
- *
- * @param player
- */
- public void removeCharacter(Player player) {
- if (characterList.containsKey(player.getName())) {
- characterList.remove(player.getName());
- onExit(player);
- }
- }
-
- /**
- * Will scan the zones char list for the character
- *
- * @param player
- * @return
- */
- public boolean isCharacterInZone(Player player) {
- return characterList.containsKey(player.getName());
- }
-
- protected abstract void onEnter(Player character);
- protected abstract void onExit(Player character);
-
- public abstract boolean allowWater(Block b);
- public abstract boolean allowLava(Block b);
- public abstract boolean allowDynamite(Block b);
- public abstract boolean allowHealth(Player player);
- public abstract boolean allowLeafDecay(Block b);
- /**
- *
- * @param player not null when fire is started by player using flintandsteel(lighter).
- * @param block
- * @return
- */
- public abstract boolean allowFire(Player player, Block block);
-
- public abstract boolean allowSpawn(Entity entity);
-
- public abstract boolean allowBlockDestroy(Player player, Block block);
- public abstract boolean allowBlockCreate(Player player, Block block);
- public abstract boolean allowBlockModify(Player player, Block block);
- public abstract boolean allowEnter(Player player, Location to);
- public abstract boolean allowTeleport(Player player, Location to);
- public abstract boolean allowEntityHit(Player attacker, Entity defender);
-
- public abstract ZonesAccess getAccess(Player player);
- public abstract ZonesAccess getAccess(String group);
-
- public abstract boolean canAdministrate(Player player);
- /**
- *
- * @param attacker
- * @param defender (music blocks, etc..)
- * @return
- */
- public abstract boolean allowBlockHit(Player attacker, Block defender);
-
-
- public HashMap<String, Player> getCharactersInside() {
- return characterList;
- }
-
- @Override
- public String toString() {
- return getClass().getSimpleName() + "[" + id + "]";
- }
-
- public boolean setName(String name) {
-
- Connection conn = null;
- PreparedStatement st = null;
- int u = 0;
- try {
- conn = zones.getConnection();
- st = conn.prepareStatement("UPDATE " + ZonesConfig.ZONES_TABLE + " SET name = ? WHERE id = ?");
- st.setString(1, name);
- st.setInt(2, getId());
- u = st.executeUpdate();
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- try {
- if(conn != null) conn.close();
- if(st != null) st.close();
- } catch (Exception e) {
- }
- }
-
- if (u < 1)
- return false;
-
- this.name = name;
-
- return true;
- }
-
- private boolean saveSettings() {
- Connection conn = null;
- PreparedStatement st = null;
- int u = 0;
- try {
- conn = zones.getConnection();
- st = conn.prepareStatement("UPDATE " + ZonesConfig.ZONES_TABLE + " SET settings = ? WHERE id = ?");
- st.setString(1, settings.serialize());
- st.setInt(2, getId());
- u = st.executeUpdate();
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- try {
- if(conn != null) conn.close();
- if(st != null) st.close();
- } catch (Exception e) {
- }
- }
-
- if (u < 1)
- return false;
-
- return true;
- }
-
-
- public void revalidateInZone(Player player) {
- revalidateInZone(player,player.getLocation());
- }
- public void revalidateInZone(Player player, Location loc) {
- if (isInsideZone(loc)) {
- if (!characterList.containsKey(player.getName())) {
- characterList.put(player.getName(), player);
- onEnter(player);
- }
- } else {
- if (characterList.containsKey(player.getName())) {
- characterList.remove(player.getName());
- onExit(player);
- }
- }
- }
-
- public Settings getSettings() {
- return settings;
- }
-
- public boolean setSetting(String name, boolean b) {
- getSettings().set(name, b);
- return saveSettings();
- }
-
- public boolean equals(Object o) {
- if(!(o instanceof ZoneBase))
- return false;
-
- return (getId() == ((ZoneBase)o).getId());
- }
-
-}
+package com.zones;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.util.HashMap;
+import java.util.logging.Logger;
+
+import org.bukkit.Location;
+import org.bukkit.block.Block;
+import org.bukkit.entity.Entity;
+import org.bukkit.entity.Player;
+
+import com.zones.util.Settings;
+
+/**
+ * Abstract base class for any zone type Handles basic operations
+ *
+ * @author durgus, Meaglin
+ */
+public abstract class ZoneBase {
+ protected static final Logger log = Logger.getLogger(ZoneBase.class.getName());
+
+ private final int id;
+ protected ZoneForm form;
+ protected HashMap<String, Player> characterList;
+
+ private String name;
+ private Settings settings;
+
+ protected Zones zones;
+ protected String world;
+
+ protected ZoneBase(Zones zones,String world, int id) {
+ this.id = id;
+ this.zones = zones;
+ this.world = world;
+ characterList = new HashMap<String, Player>();
+ }
+
+ public void loadSettings(String data) {
+ try {
+ loadSettings(Settings.unserialize(data));
+ } catch(Exception e) {
+ log.warning("[Zones]Error loading settings of " + name + "[" + id + "]");
+ e.printStackTrace();
+ }
+ }
+
+ public void loadSettings(Settings settings) {
+ this.settings = settings;
+ }
+ /**
+ * @return Returns the id.
+ */
+ public int getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Setup new parameters for this zone
+ *
+ * @param type
+ * @param value
+ */
+ public void setParameter(String name, String value) {
+ if (value == null || value.equals(""))
+ return;
+
+ if (name.equals("name")) {
+ this.name = value;
+ } else
+ log.info(getClass().getSimpleName() + ": Unknown parameter - " + name + " in zone: " + getId());
+ }
+
+ /**
+ * Set the zone for this L2ZoneType Instance
+ *
+ * @param zone
+ */
+ public void setZone(ZoneForm zone) {
+ form = zone;
+ }
+
+ /**
+ * Returns this zones zone form
+ *
+ * @param zone
+ * @return
+ */
+ public ZoneForm getZone() {
+ return form;
+ }
+
+ /**
+ * Checks if the given coordinates are within zone's plane
+ *
+ * @param x
+ * @param y
+ */
+ public boolean isInsideZone(int x, int y,String world) {
+ if (this.world.equals(world) && form.isInsideZone(x, y, form.getHighZ()))
+ return true;
+ else
+ return false;
+ }
+
+ /**
+ * Checks if the given coordinates are within the zone
+ *
+ * @param x
+ * @param y
+ * @param z
+ */
+ public boolean isInsideZone(int x, int y, int z,String world) {
+ if (this.world.equals(world) && form.isInsideZone(x, y, z))
+ return true;
+ else
+ return false;
+ }
+
+ /**
+ * Checks if the given object is inside the zone.
+ *
+ * @param player
+ */
+ public boolean isInsideZone(Player player) {return isInsideZone(player.getLocation());}
+ public boolean isInsideZone(Location loc) {return isInsideZone(World.toInt(loc.getX()), World.toInt(loc.getZ()), World.toInt(loc.getY()),loc.getWorld().getName());}
+
+ public double getDistanceToZone(int x, int y) {return getZone().getDistanceToZone(x, y);}
+
+ public double getDistanceToZone(Player player) {
+ Location loc = player.getLocation();
+ return getZone().getDistanceToZone(World.toInt(loc.getX()), World.toInt(loc.getZ()));
+ }
+
+ /**
+ * Force fully removes a character from the zone Should use during teleport
+ * / logoff
+ *
+ * @param player
+ */
+ public void removeCharacter(Player player) {
+ if (characterList.containsKey(player.getName())) {
+ characterList.remove(player.getName());
+ onExit(player);
+ }
+ }
+
+ /**
+ * Will scan the zones char list for the character
+ *
+ * @param player
+ * @return
+ */
+ public boolean isCharacterInZone(Player player) {
+ return characterList.containsKey(player.getName());
+ }
+
+ protected abstract void onEnter(Player character);
+ protected abstract void onExit(Player character);
+
+ public abstract boolean allowWater(Block b);
+ public abstract boolean allowLava(Block b);
+ public abstract boolean allowDynamite(Block b);
+ public abstract boolean allowHealth(Player player);
+ public abstract boolean allowLeafDecay(Block b);
+ /**
+ *
+ * @param player not null when fire is started by player using flintandsteel(lighter).
+ * @param block
+ * @return
+ */
+ public abstract boolean allowFire(Player player, Block block);
+
+ public abstract boolean allowSpawn(Entity entity);
+
+ public abstract boolean allowBlockDestroy(Player player, Block block);
+ public abstract boolean allowBlockCreate(Player player, Block block);
+ public abstract boolean allowBlockModify(Player player, Block block);
+ public abstract boolean allowEnter(Player player, Location to);
+ public abstract boolean allowTeleport(Player player, Location to);
+ public abstract boolean allowEntityHit(Player attacker, Entity defender);
+
+ public abstract ZonesAccess getAccess(Player player);
+ public abstract ZonesAccess getAccess(String group);
+
+ public abstract boolean canAdministrate(Player player);
+ /**
+ *
+ * @param attacker
+ * @param defender (music blocks, etc..)
+ * @return
+ */
+ public abstract boolean allowBlockHit(Player attacker, Block defender);
+
+
+ public HashMap<String, Player> getCharactersInside() {
+ return characterList;
+ }
+
+ @Override
+ public String toString() {
+ return getClass().getSimpleName() + "[" + id + "]";
+ }
+
+ public boolean setName(String name) {
+
+ Connection conn = null;
+ PreparedStatement st = null;
+ int u = 0;
+ try {
+ conn = zones.getConnection();
+ st = conn.prepareStatement("UPDATE " + ZonesConfig.ZONES_TABLE + " SET name = ? WHERE id = ?");
+ st.setString(1, name);
+ st.setInt(2, getId());
+ u = st.executeUpdate();
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ try {
+ if(conn != null) conn.close();
+ if(st != null) st.close();
+ } catch (Exception e) {
+ }
+ }
+
+ if (u < 1)
+ return false;
+
+ this.name = name;
+
+ return true;
+ }
+
+ private boolean saveSettings() {
+ Connection conn = null;
+ PreparedStatement st = null;
+ int u = 0;
+ try {
+ conn = zones.getConnection();
+ st = conn.prepareStatement("UPDATE " + ZonesConfig.ZONES_TABLE + " SET settings = ? WHERE id = ?");
+ st.setString(1, settings.serialize());
+ st.setInt(2, getId());
+ u = st.executeUpdate();
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ try {
+ if(conn != null) conn.close();
+ if(st != null) st.close();
+ } catch (Exception e) {
+ }
+ }
+
+ if (u < 1)
+ return false;
+
+ return true;
+ }
+
+
+ public void revalidateInZone(Player player) {
+ revalidateInZone(player,player.getLocation());
+ }
+ public void revalidateInZone(Player player, Location loc) {
+ if (isInsideZone(loc)) {
+ if (!characterList.containsKey(player.getName())) {
+ characterList.put(player.getName(), player);
+ onEnter(player);
+ }
+ } else {
+ if (characterList.containsKey(player.getName())) {
+ characterList.remove(player.getName());
+ onExit(player);
+ }
+ }
+ }
+
+ public Settings getSettings() {
+ return settings;
+ }
+
+ public boolean setSetting(String name, boolean b) {
+ getSettings().set(name, b);
+ return saveSettings();
+ }
+
+ public boolean equals(Object o) {
+ if(!(o instanceof ZoneBase))
+ return false;
+
+ return (getId() == ((ZoneBase)o).getId());
+ }
+
+}
72 src/com/zones/ZoneForm.java
View
@@ -1,36 +1,36 @@
-package com.zones;
-
-/**
- * Abstract base class for any zone form
- *
- * @author durgus
- */
-public abstract class ZoneForm {
- public abstract boolean isInsideZone(int x, int y, int z);
-
- public abstract boolean intersectsRectangle(int x1, int x2, int y1, int y2);
-
- public abstract double getDistanceToZone(int x, int y);
-
- public abstract int getLowZ(); // Support for the ability to extract the z
-
- // coordinates of zones.
-
- public abstract int getHighZ();
-
- public abstract int getSize();
-
- // landing coordinates.
-
- protected boolean lineSegmentsIntersect(int ax1, int ay1, int ax2, int ay2, int bx1, int by1, int bx2, int by2) {
- return java.awt.geom.Line2D.linesIntersect(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2);
- }
-
- public abstract int getLowX();
-
- public abstract int getHighX();
-
- public abstract int getLowY();
-
- public abstract int getHighY();
-}
+package com.zones;
+
+/**
+ * Abstract base class for any zone form
+ *
+ * @author durgus , Meaglin
+ */
+public abstract class ZoneForm {
+ public abstract boolean isInsideZone(int x, int y, int z);
+
+ public abstract boolean intersectsRectangle(int x1, int x2, int y1, int y2);
+
+ public abstract double getDistanceToZone(int x, int y);
+
+ public abstract int getLowZ(); // Support for the ability to extract the z
+
+ // coordinates of zones.
+
+ public abstract int getHighZ();
+
+ public abstract int getSize();
+
+ // landing coordinates.
+
+ protected boolean lineSegmentsIntersect(int ax1, int ay1, int ax2, int ay2, int bx1, int by1, int bx2, int by2) {
+ return java.awt.geom.Line2D.linesIntersect(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2);
+ }
+
+ public abstract int getLowX();
+
+ public abstract int getHighX();
+
+ public abstract int getLowY();
+
+ public abstract int getHighY();
+}
579 src/com/zones/ZoneManager.java
View
@@ -1,287 +1,292 @@
-package com.zones;
-
-import com.zones.forms.ZoneNPoly;
-import com.zones.forms.ZoneCuboid;
-import java.lang.reflect.Constructor;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.logging.Logger;
-
-public class ZoneManager {
- private HashMap<Integer, ZoneBase> zones;
- private HashMap<String, ZonesDummyZone> dummyZones;
- private HashMap<String, Integer> selectedZones;
- protected static final Logger log = Logger.getLogger("Minecraft");
- private Zones plugin;
-
- private ZoneManager() {
- zones = new HashMap<Integer, ZoneBase>();
- dummyZones = new HashMap<String, ZonesDummyZone>();
- selectedZones = new HashMap<String, Integer>();
- }
-
- public void load(Zones plugin) {
- zones.clear();
- dummyZones.clear();
- selectedZones.clear();
- this.plugin = plugin;
- World.getInstance();
- Connection conn = null;
- try {
- conn = plugin.getConnection();
- PreparedStatement st = conn.prepareStatement("SELECT * FROM " + ZonesConfig.ZONES_TABLE);
- PreparedStatement st2 = conn.prepareStatement("SELECT `x`,`y` FROM " + ZonesConfig.ZONES_VERTICES_TABLE + " WHERE id = ? ORDER BY `order` ASC LIMIT ? ");
- ResultSet rset = st.executeQuery();
-
- int id, type, size, minz, maxz;
- String zoneClass, admins, users, name, world, settings;
- ArrayList<int[]> points = new ArrayList<int[]>();
-
- while (rset.next()) {
- id = rset.getInt("id");
- name = rset.getString("name");
- zoneClass = rset.getString("class");
- world = rset.getString("world");
- type = rset.getInt("type");
- size = rset.getInt("size");
- admins = rset.getString("admins");
- users = rset.getString("users");
- minz = rset.getInt("minz");
- maxz = rset.getInt("maxz");
- settings = rset.getString("settings");
- Class<?> newZone;
- try {
- newZone = Class.forName("com.zones.types."+zoneClass);
- } catch (ClassNotFoundException e) {
- log.warning("[Zones]No such zone class: " + zoneClass + " id: " + id);
- continue;
- }
- Constructor<?> zoneConstructor = newZone.getConstructor(Zones.class, String.class, int.class);
- ZoneBase temp = (ZoneBase) zoneConstructor.newInstance(zones,world,id);
-
- points.clear();
-
- try {
-
- st2.setInt(1, id);
- st2.setInt(2, size);
-
- ResultSet rset2 = st2.executeQuery();
- while (rset2.next()) {
- int[] point = new int[2];
- point[0] = rset2.getInt("x");
- point[1] = rset2.getInt("y");
- points.add(point);
- }
- rset2.close();
- } finally {
- st2.clearParameters();
- }
- int[][] coords = points.toArray(new int[points.size()][]);
- switch (type) {
- case 1:
- if (points.size() == 2) {
- temp.setZone(new ZoneCuboid(coords[0][0], coords[1][0], coords[0][1], coords[1][1], minz, maxz));
- } else {
- log.info("[Zones]Missing zone vertex for cuboid zone id: " + id);
- continue;
- }
- break;
- case 2:
- if (coords.length > 2) {
- final int[] aX = new int[coords.length];
- final int[] aY = new int[coords.length];
- for (int i = 0; i < coords.length; i++) {
- aX[i] = coords[i][0];
- aY[i] = coords[i][1];
- }
- temp.setZone(new ZoneNPoly(aX, aY, minz, maxz));
- } else {
- log.warning("[Zones]Bad data for zone: " + id);
- continue;
- }
- break;
- default:
- log.severe("[Zones]Unknown zone form " + type + " for id " + id);
- break;
- }
-
- temp.setParameter("admins", admins);
- temp.setParameter("users", users);
- temp.setParameter("name", name);
- temp.loadSettings(settings);
- addZone(temp);
- }
- rset.close();
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- try {
- conn.close();
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- if (zones.size() == 1)
- log.info("[Zones]Loaded " + zones.size() + " Zone.");
- else
- log.info("[Zones]Loaded " + zones.size() + " Zones.");