Merge branch 'master' of ssh://dev1.mineplex.com:7999/min/Mineplex
Conflicts: .gitignore
This commit is contained in:
commit
449fa13cc3
4
.gitignore
vendored
4
.gitignore
vendored
@ -16,5 +16,5 @@ update
|
||||
|
||||
Reference
|
||||
|
||||
/Plugins/Test
|
||||
src
|
||||
/Plugins/.idea/workspace.xml
|
||||
/Plugins/out
|
1
Plugins/.idea/.name
Normal file
1
Plugins/.idea/.name
Normal file
@ -0,0 +1 @@
|
||||
Mineplex
|
11
Plugins/.idea/artifacts/Mineplex_Bungee_Mineplexer_jar.xml
Normal file
11
Plugins/.idea/artifacts/Mineplex_Bungee_Mineplexer_jar.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact type="jar" name="Mineplex.Bungee.Mineplexer:jar">
|
||||
<output-path>$PROJECT_DIR$/bin</output-path>
|
||||
<root id="archive" name="Mineplexer.jar">
|
||||
<element id="module-output" name="Mineplex.Bungee.Mineplexer" />
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/commons-codec-1.6.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/commons-io-2.4.jar" path-in-jar="/" />
|
||||
<element id="file-copy" path="$PROJECT_DIR$/Mineplex.Bungee.Mineplexer/plugin.yml" />
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
17
Plugins/.idea/artifacts/Mineplex_Hub_jar.xml
Normal file
17
Plugins/.idea/artifacts/Mineplex_Hub_jar.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact type="jar" name="Mineplex.Hub:jar">
|
||||
<output-path>$PROJECT_DIR$/bin</output-path>
|
||||
<root id="archive" name="Hub.jar">
|
||||
<element id="module-output" name="Mineplex.Hub" />
|
||||
<element id="module-output" name="Mineplex.Core" />
|
||||
<element id="module-output" name="Mineplex.Core.Common" />
|
||||
<element id="module-output" name="Mineplex.Minecraft.Game.ClassCombat" />
|
||||
<element id="module-output" name="Mineplex.Minecraft.Game.Core" />
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/httpcore-4.2.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/commons-io-2.4.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/httpclient-4.2.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/commons-codec-1.6.jar" path-in-jar="/" />
|
||||
<element id="file-copy" path="$PROJECT_DIR$/Mineplex.Hub/plugin.yml" />
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
10
Plugins/.idea/artifacts/Mineplex_Hub_test.xml
Normal file
10
Plugins/.idea/artifacts/Mineplex_Hub_test.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact name="Mineplex.Hub:test">
|
||||
<output-path>$PROJECT_DIR$/../Testing/Hub</output-path>
|
||||
<root id="root">
|
||||
<element id="directory" name="plugins">
|
||||
<element id="artifact" artifact-name="Mineplex.Hub:jar" />
|
||||
</element>
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
12
Plugins/.idea/artifacts/Mineplex_ServerMonitor_jar.xml
Normal file
12
Plugins/.idea/artifacts/Mineplex_ServerMonitor_jar.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact type="jar" name="Mineplex.ServerMonitor:jar">
|
||||
<output-path>$PROJECT_DIR$/bin</output-path>
|
||||
<root id="archive" name="ServerMonitor.jar">
|
||||
<element id="module-output" name="Mineplex.ServerMonitor" />
|
||||
<element id="module-output" name="Mineplex.Core.Common" />
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/httpcore-4.2.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/gson-2.2.1.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/httpclient-4.2.jar" path-in-jar="/" />
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
@ -0,0 +1,9 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact type="jar" name="Nautilus.Core.Craftbukkit:jar">
|
||||
<output-path>$PROJECT_DIR$/bin</output-path>
|
||||
<root id="archive" name="craftbukkit.jar">
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/craftbukkit_official.jar" path-in-jar="/" />
|
||||
<element id="module-output" name="Nautilus.Core.CraftBukkit" />
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
17
Plugins/.idea/artifacts/Nautilus_Game_Arcade_jar.xml
Normal file
17
Plugins/.idea/artifacts/Nautilus_Game_Arcade_jar.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact type="jar" name="Nautilus.Game.Arcade:jar">
|
||||
<output-path>$PROJECT_DIR$/bin</output-path>
|
||||
<root id="archive" name="Arcade.jar">
|
||||
<element id="module-output" name="Nautilus.Game.Arcade" />
|
||||
<element id="module-output" name="Mineplex.Core" />
|
||||
<element id="module-output" name="Mineplex.Core.Common" />
|
||||
<element id="module-output" name="Mineplex.Minecraft.Game.ClassCombat" />
|
||||
<element id="module-output" name="Mineplex.Minecraft.Game.Core" />
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/commons-codec-1.6.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/httpcore-4.2.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/httpclient-4.2.jar" path-in-jar="/" />
|
||||
<element id="file-copy" path="$PROJECT_DIR$/Nautilus.Game.Arcade/plugin.yml" />
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/Libraries/commons-logging-1.1.1.jar" path-in-jar="/" />
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
10
Plugins/.idea/artifacts/Nautilus_Game_Arcade_test.xml
Normal file
10
Plugins/.idea/artifacts/Nautilus_Game_Arcade_test.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact name="Nautilus.Game.Arcade:test">
|
||||
<output-path>$PROJECT_DIR$/../Testing/Arcade</output-path>
|
||||
<root id="root">
|
||||
<element id="directory" name="plugins">
|
||||
<element id="artifact" artifact-name="Nautilus.Game.Arcade:jar" />
|
||||
</element>
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
35
Plugins/.idea/codeStyleSettings.xml
Normal file
35
Plugins/.idea/codeStyleSettings.xml
Normal file
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectCodeStyleSettingsManager">
|
||||
<option name="PER_PROJECT_SETTINGS">
|
||||
<value>
|
||||
<option name="USE_SINGLE_CLASS_IMPORTS" value="false" />
|
||||
<XML>
|
||||
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
|
||||
</XML>
|
||||
<codeStyleSettings language="JAVA">
|
||||
<option name="BRACE_STYLE" value="2" />
|
||||
<option name="CLASS_BRACE_STYLE" value="2" />
|
||||
<option name="METHOD_BRACE_STYLE" value="2" />
|
||||
<option name="ELSE_ON_NEW_LINE" value="true" />
|
||||
<option name="WHILE_ON_NEW_LINE" value="true" />
|
||||
<option name="CATCH_ON_NEW_LINE" value="true" />
|
||||
<option name="FINALLY_ON_NEW_LINE" value="true" />
|
||||
<option name="SPACE_BEFORE_IF_PARENTHESES" value="false" />
|
||||
<option name="SPACE_BEFORE_WHILE_PARENTHESES" value="false" />
|
||||
<option name="SPACE_BEFORE_FOR_PARENTHESES" value="false" />
|
||||
<option name="SPACE_BEFORE_TRY_PARENTHESES" value="false" />
|
||||
<option name="SPACE_BEFORE_CATCH_PARENTHESES" value="false" />
|
||||
<option name="SPACE_BEFORE_SWITCH_PARENTHESES" value="false" />
|
||||
<option name="SPACE_BEFORE_SYNCHRONIZED_PARENTHESES" value="false" />
|
||||
<option name="ENUM_CONSTANTS_WRAP" value="2" />
|
||||
<indentOptions>
|
||||
<option name="USE_TAB_CHARACTER" value="true" />
|
||||
</indentOptions>
|
||||
</codeStyleSettings>
|
||||
</value>
|
||||
</option>
|
||||
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||
</component>
|
||||
</project>
|
||||
|
23
Plugins/.idea/compiler.xml
Normal file
23
Plugins/.idea/compiler.xml
Normal file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<option name="DEFAULT_COMPILER" value="Javac" />
|
||||
<resourceExtensions />
|
||||
<wildcardResourcePatterns>
|
||||
<entry name="!?*.java" />
|
||||
<entry name="!?*.form" />
|
||||
<entry name="!?*.class" />
|
||||
<entry name="!?*.groovy" />
|
||||
<entry name="!?*.scala" />
|
||||
<entry name="!?*.flex" />
|
||||
<entry name="!?*.kt" />
|
||||
<entry name="!?*.clj" />
|
||||
</wildcardResourcePatterns>
|
||||
<annotationProcessing>
|
||||
<profile default="true" name="Default" enabled="false">
|
||||
<processorPath useClasspath="true" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
</project>
|
||||
|
5
Plugins/.idea/encodings.xml
Normal file
5
Plugins/.idea/encodings.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
|
||||
</project>
|
||||
|
9
Plugins/.idea/libraries/BungeeCord.xml
Normal file
9
Plugins/.idea/libraries/BungeeCord.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<component name="libraryTable">
|
||||
<library name="BungeeCord">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/Libraries/BungeeCord.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
13
Plugins/.idea/libraries/bukkit.xml
Normal file
13
Plugins/.idea/libraries/bukkit.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="bukkit">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/Libraries/bukkit.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="http://jd.bukkit.org/dev/apidocs/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/Libraries/bukkit.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
9
Plugins/.idea/libraries/commons_codec.xml
Normal file
9
Plugins/.idea/libraries/commons_codec.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<component name="libraryTable">
|
||||
<library name="commons-codec">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/Libraries/commons-codec-1.6.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
9
Plugins/.idea/libraries/commons_io.xml
Normal file
9
Plugins/.idea/libraries/commons_io.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<component name="libraryTable">
|
||||
<library name="commons-io">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/Libraries/commons-io-2.4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
13
Plugins/.idea/libraries/craftbukkit.xml
Normal file
13
Plugins/.idea/libraries/craftbukkit.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="craftbukkit">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/Libraries/craftbukkit_official.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="http://jd.bukkit.org/dev/apidocs/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/Libraries/craftbukkit_official.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
9
Plugins/.idea/libraries/gson.xml
Normal file
9
Plugins/.idea/libraries/gson.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<component name="libraryTable">
|
||||
<library name="gson">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/Libraries/gson-2.2.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
9
Plugins/.idea/libraries/httpclient.xml
Normal file
9
Plugins/.idea/libraries/httpclient.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<component name="libraryTable">
|
||||
<library name="httpclient">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/Libraries/httpclient-4.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
9
Plugins/.idea/libraries/httpcore.xml
Normal file
9
Plugins/.idea/libraries/httpcore.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<component name="libraryTable">
|
||||
<library name="httpcore">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/Libraries/httpcore-4.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
10
Plugins/.idea/misc.xml
Normal file
10
Plugins/.idea/misc.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="EntryPointsManager">
|
||||
<entry_points version="2.0" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
|
18
Plugins/.idea/modules.xml
Normal file
18
Plugins/.idea/modules.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/Mineplex.Bungee.Mineplexer/Mineplex.Bungee.Mineplexer.iml" filepath="$PROJECT_DIR$/Mineplex.Bungee.Mineplexer/Mineplex.Bungee.Mineplexer.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Mineplex.Core/Mineplex.Core.iml" filepath="$PROJECT_DIR$/Mineplex.Core/Mineplex.Core.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Mineplex.Core.Common/Mineplex.Core.Common.iml" filepath="$PROJECT_DIR$/Mineplex.Core.Common/Mineplex.Core.Common.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Mineplex.Hub/Mineplex.Hub.iml" filepath="$PROJECT_DIR$/Mineplex.Hub/Mineplex.Hub.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Mineplex.Minecraft.BungeeSigns/Mineplex.Minecraft.BungeeSigns.iml" filepath="$PROJECT_DIR$/Mineplex.Minecraft.BungeeSigns/Mineplex.Minecraft.BungeeSigns.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Mineplex.Minecraft.Game.ClassCombat/Mineplex.Minecraft.Game.ClassCombat.iml" filepath="$PROJECT_DIR$/Mineplex.Minecraft.Game.ClassCombat/Mineplex.Minecraft.Game.ClassCombat.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Mineplex.Minecraft.Game.Core/Mineplex.Minecraft.Game.Core.iml" filepath="$PROJECT_DIR$/Mineplex.Minecraft.Game.Core/Mineplex.Minecraft.Game.Core.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Mineplex.ServerMonitor/Mineplex.ServerMonitor.iml" filepath="$PROJECT_DIR$/Mineplex.ServerMonitor/Mineplex.ServerMonitor.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Nautilus.Core.CraftBukkit/Nautilus.Core.CraftBukkit.iml" filepath="$PROJECT_DIR$/Nautilus.Core.CraftBukkit/Nautilus.Core.CraftBukkit.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Nautilus.Game.Arcade/Nautilus.Game.Arcade.iml" filepath="$PROJECT_DIR$/Nautilus.Game.Arcade/Nautilus.Game.Arcade.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
|
27
Plugins/.idea/runConfigurations/Arcade.xml
Normal file
27
Plugins/.idea/runConfigurations/Arcade.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Arcade" type="Application" factoryName="Application" singleton="true">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<option name="MAIN_CLASS_NAME" value="org.bukkit.craftbukkit.Main" />
|
||||
<option name="VM_PARAMETERS" value="" />
|
||||
<option name="PROGRAM_PARAMETERS" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../Testing/Arcade" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" value="" />
|
||||
<option name="ENABLE_SWING_INSPECTOR" value="false" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<module name="Nautilus.Core.CraftBukkit" />
|
||||
<envs />
|
||||
<RunnerSettings RunnerId="Debug">
|
||||
<option name="DEBUG_PORT" value="" />
|
||||
<option name="TRANSPORT" value="0" />
|
||||
<option name="LOCAL" value="true" />
|
||||
</RunnerSettings>
|
||||
<ConfigurationWrapper RunnerId="Debug" />
|
||||
<method>
|
||||
<option name="BuildArtifacts" enabled="true">
|
||||
<artifact name="Nautilus.Game.Arcade:test" />
|
||||
</option>
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
5
Plugins/.idea/scopes/scope_settings.xml
Normal file
5
Plugins/.idea/scopes/scope_settings.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<component name="DependencyValidationManager">
|
||||
<state>
|
||||
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
|
||||
</state>
|
||||
</component>
|
7
Plugins/.idea/vcs.xml
Normal file
7
Plugins/.idea/vcs.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="" />
|
||||
</component>
|
||||
</project>
|
||||
|
2
Plugins/Core/.settings/org.eclipse.core.resources.prefs
Normal file
2
Plugins/Core/.settings/org.eclipse.core.resources.prefs
Normal file
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
@ -192,7 +192,7 @@ public abstract class LootBase implements Listener
|
||||
|
||||
public ItemStack Get()
|
||||
{
|
||||
ItemStack loot = ItemStackFactory.Instance.CreateStack(_mat.getId(), (byte)0, 1, "§r" + ChatColor.RESET + C.mLoot +_name, _lore);
|
||||
ItemStack loot = ItemStackFactory.Instance.CreateStack(_mat.getId(), (byte)0, 1, "§r" + ChatColor.RESET + C.mLoot +_name, _lore);
|
||||
|
||||
loot.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, _enchLevel);
|
||||
|
||||
|
@ -251,7 +251,7 @@ public class PointManager extends AModule implements IScheduleListener
|
||||
|
||||
if (capped)
|
||||
{
|
||||
UtilPlayer.message(cur, "§c§lYou have already earned the max of " + _maxPPH + " Points today.");
|
||||
UtilPlayer.message(cur, "§c§lYou have already earned the max of " + _maxPPH + " Points today.");
|
||||
UtilPlayer.message(cur, F.value("You will earn more in:", UtilTime.convertString(Scheduler.Instance.GetTimeTilNextAppt(this), 1, TimeUnit.FIT)));
|
||||
continue;
|
||||
}
|
||||
@ -281,14 +281,14 @@ public class PointManager extends AModule implements IScheduleListener
|
||||
totalPoints = _maxPPH - _pointTotals.get(cur.getName());
|
||||
}
|
||||
|
||||
UtilPlayer.message(cur, "§c§lOffline Point Reward - " + UtilTime.convertString(System.currentTimeMillis() - _quitMap.get(name), 1, TimeUnit.FIT));
|
||||
UtilPlayer.message(cur, "§c§lOffline Point Reward - " + UtilTime.convertString(System.currentTimeMillis() - _quitMap.get(name), 1, TimeUnit.FIT));
|
||||
UtilPlayer.message(cur, F.value("Clan Age", clanPoints + " Points"));
|
||||
UtilPlayer.message(cur, F.value("Battle Pet", petPoints + " Points"));
|
||||
UtilPlayer.message(cur, "You received " + F.count(totalPoints + " Points") + ".");
|
||||
|
||||
if (hitCap)
|
||||
{
|
||||
UtilPlayer.message(cur, "§c§lYou have already earned the max of " + _maxPPH + " Points today.");
|
||||
UtilPlayer.message(cur, "§c§lYou have already earned the max of " + _maxPPH + " Points today.");
|
||||
UtilPlayer.message(cur, F.value("You will earn more in:", UtilTime.convertString(Scheduler.Instance.GetTimeTilNextAppt(this), 1, TimeUnit.FIT)));
|
||||
}
|
||||
|
||||
@ -331,7 +331,7 @@ public class PointManager extends AModule implements IScheduleListener
|
||||
|
||||
if (capped)
|
||||
{
|
||||
UtilPlayer.message(cur, "§c§lYou have already earned the max of " + _maxPPH + " Points today.");
|
||||
UtilPlayer.message(cur, "§c§lYou have already earned the max of " + _maxPPH + " Points today.");
|
||||
UtilPlayer.message(cur, F.value("You will earn more in:", UtilTime.convertString(Scheduler.Instance.GetTimeTilNextAppt(this), 1, TimeUnit.FIT)));
|
||||
continue;
|
||||
}
|
||||
@ -366,7 +366,7 @@ public class PointManager extends AModule implements IScheduleListener
|
||||
totalPoints = _maxPPH - _pointTotals.get(cur.getName());
|
||||
}
|
||||
|
||||
UtilPlayer.message(cur, "§a§lOnline Point Reward - " + UtilTime.convertString(_interval, 1, TimeUnit.FIT));
|
||||
UtilPlayer.message(cur, "§a§lOnline Point Reward - " + UtilTime.convertString(_interval, 1, TimeUnit.FIT));
|
||||
UtilPlayer.message(cur, F.value("Online", onlinePoints + " Points"));
|
||||
UtilPlayer.message(cur, F.value("NAC User", NACPoints + " Points"));
|
||||
UtilPlayer.message(cur, F.value("Clan Age", clanPoints + " Points"));
|
||||
@ -375,7 +375,7 @@ public class PointManager extends AModule implements IScheduleListener
|
||||
|
||||
if (hitCap)
|
||||
{
|
||||
UtilPlayer.message(cur, "§c§lYou have already earned the max of " + _maxPPH + " Points today.");
|
||||
UtilPlayer.message(cur, "§c§lYou have already earned the max of " + _maxPPH + " Points today.");
|
||||
UtilPlayer.message(cur, F.value("You will earn more in:", UtilTime.convertString(Scheduler.Instance.GetTimeTilNextAppt(this), 1, TimeUnit.FIT)));
|
||||
}
|
||||
|
||||
|
@ -43,10 +43,10 @@ public class ListCommand extends CommandBase<Server>
|
||||
if (other.length() == 0) other = "None";
|
||||
else other = other.substring(0, other.length() - 1);
|
||||
|
||||
UtilPlayer.message(caller, "§c§l" + "Staff");
|
||||
UtilPlayer.message(caller, "§c§l" + "Staff");
|
||||
UtilPlayer.message(caller, staff);
|
||||
|
||||
UtilPlayer.message(caller, "§a§l" + "Players");
|
||||
UtilPlayer.message(caller, "§a§l" + "Players");
|
||||
UtilPlayer.message(caller, other);
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="BungeeCord" level="project" />
|
||||
<orderEntry type="library" name="commons-codec" level="project" />
|
||||
<orderEntry type="library" name="commons-io" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
@ -12,7 +12,7 @@ public class MotdManager implements Listener, Runnable
|
||||
private Plugin _plugin;
|
||||
private MotdRepository _repository;
|
||||
|
||||
private String _motd = "§b§l§m §8§l§m[ §r §9§lMineplex§r §f§lGames§r §8§l§m ]§b§l§m §r §c§l§m§kZ§6§l§m§kZ§e§l§m§kZ§a§l§m§kZ§b§l§m§kZ§r §f§lPLAY NOW§r §b§l§m§kZ§a§l§m§kZ§e§l§m§kZ§6§l§m§kZ§c§l§m§kZ";
|
||||
private String _motd = "§b§l§m §8§l§m[ §r §9§lMineplex§r §f§lGames§r §8§l§m ]§b§l§m §r §c§l§m§kZ§6§l§m§kZ§e§l§m§kZ§a§l§m§kZ§b§l§m§kZ§r §f§lPLAY NOW§r §b§l§m§kZ§a§l§m§kZ§e§l§m§kZ§6§l§m§kZ§c§l§m§kZ";
|
||||
|
||||
public MotdManager(Plugin plugin)
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ public class MotdRepository
|
||||
|
||||
public String retrieveMotd()
|
||||
{
|
||||
String motd = "§b§l§m §8§l§m[ §r §9§lMineplex§r §f§lGames§r §8§l§m ]§b§l§m §r §c§l§m§kZ§6§l§m§kZ§e§l§m§kZ§a§l§m§kZ§b§l§m§kZ§r §f§lPLAY NOW§r §b§l§m§kZ§a§l§m§kZ§e§l§m§kZ§6§l§m§kZ§c§l§m§kZ";
|
||||
String motd = "§b§l§m §8§l§m[ §r §9§lMineplex§r §f§lGames§r §8§l§m ]§b§l§m §r §c§l§m§kZ§6§l§m§kZ§e§l§m§kZ§a§l§m§kZ§b§l§m§kZ§r §f§lPLAY NOW§r §b§l§m§kZ§a§l§m§kZ§e§l§m§kZ§6§l§m§kZ§c§l§m§kZ";
|
||||
ResultSet resultSet = null;
|
||||
PreparedStatement preparedStatement = null;
|
||||
|
||||
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
14
Plugins/Mineplex.Core.Common/Mineplex.Core.Common.iml
Normal file
14
Plugins/Mineplex.Core.Common/Mineplex.Core.Common.iml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="Nautilus.Core.CraftBukkit" />
|
||||
<orderEntry type="library" name="craftbukkit" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
@ -4,11 +4,11 @@ import org.bukkit.ChatColor;
|
||||
|
||||
public class C
|
||||
{
|
||||
public static String Scramble = "§k";
|
||||
public static String Bold = "§l";
|
||||
public static String Strike = "§m";
|
||||
public static String Line = "§n";
|
||||
public static String Italics = "§o";
|
||||
public static String Scramble = "§k";
|
||||
public static String Bold = "§l";
|
||||
public static String Strike = "§m";
|
||||
public static String Line = "§n";
|
||||
public static String Italics = "§o";
|
||||
|
||||
public static String cAqua = "" + ChatColor.AQUA;
|
||||
public static String cBlack = "" + ChatColor.BLACK;
|
||||
|
@ -27,7 +27,7 @@ public class UtilServer
|
||||
{
|
||||
for (Player cur : getPlayers())
|
||||
{
|
||||
UtilPlayer.message(cur, "§b§l" + event);
|
||||
UtilPlayer.message(cur, "§b§l" + event);
|
||||
UtilPlayer.message(cur, message);
|
||||
cur.playSound(cur.getLocation(), Sound.ORB_PICKUP, 2f, 0f);
|
||||
cur.playSound(cur.getLocation(), Sound.ORB_PICKUP, 2f, 0f);
|
||||
@ -36,12 +36,12 @@ public class UtilServer
|
||||
|
||||
public static void broadcast(String sender, String message)
|
||||
{
|
||||
broadcast("§f§l" + sender + " " + "§b" + message);
|
||||
broadcast("§f§l" + sender + " " + "§b" + message);
|
||||
}
|
||||
|
||||
public static void broadcastMagic(String sender, String message)
|
||||
{
|
||||
broadcast("§2§k" + message);
|
||||
broadcast("§2§k" + message);
|
||||
}
|
||||
|
||||
public static double getFilledPercent()
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
|
||||
<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AFTER_CLEAN_TARGETS" value="Dominate,Arcade,Hub,MineKart,"/>
|
||||
<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_MANUAL_TARGETS" value="Dominate,Arcade,Hub,MineKart,"/>
|
||||
<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AFTER_CLEAN_TARGETS" value="Arcade,Hub,"/>
|
||||
<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_MANUAL_TARGETS" value="Arcade,Hub,"/>
|
||||
<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/>
|
||||
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
18
Plugins/Mineplex.Core/Mineplex.Core.iml
Normal file
18
Plugins/Mineplex.Core/Mineplex.Core.iml
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="httpclient" level="project" />
|
||||
<orderEntry type="library" name="httpcore" level="project" />
|
||||
<orderEntry type="library" name="commons-codec" level="project" />
|
||||
<orderEntry type="module" module-name="Mineplex.Core.Common" />
|
||||
<orderEntry type="module" module-name="Nautilus.Core.CraftBukkit" />
|
||||
<orderEntry type="library" name="craftbukkit" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
@ -44,7 +44,7 @@ public class ItemStackFactory extends MiniPlugin
|
||||
private HashMap<Integer, HashMap<Byte, Entry<String, Boolean>>> _names;
|
||||
private HashMap<Integer, HashMap<Byte, String[]>> _lores;
|
||||
|
||||
private String _nameFormat = "§r" + C.mItem;
|
||||
private String _nameFormat = "§r" + C.mItem;
|
||||
|
||||
private HashSet<Listener> _statListeners = new HashSet<Listener>();
|
||||
|
||||
|
@ -112,7 +112,7 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
|
||||
public void DoMessage(Player from, Player to, String message)
|
||||
{
|
||||
//Inform
|
||||
UtilPlayer.message(from, C.cGold + "§l" + from.getName() + " > " + to.getName() + C.cYellow + " §l" + message);
|
||||
UtilPlayer.message(from, C.cGold + "§l" + from.getName() + " > " + to.getName() + C.cYellow + " §l" + message);
|
||||
|
||||
//Save
|
||||
Get(from).LastTo = to.getName();
|
||||
@ -153,7 +153,7 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
|
||||
to.playSound(to.getLocation(), Sound.NOTE_PIANO, 2f, 2f);
|
||||
|
||||
//Send
|
||||
UtilPlayer.message(to, C.cGold + "§l" + from.getName() + " > " + to.getName() + C.cYellow + " §l" + message);
|
||||
UtilPlayer.message(to, C.cGold + "§l" + from.getName() + " > " + to.getName() + C.cYellow + " §l" + message);
|
||||
}
|
||||
|
||||
public void DoMessageAdmin(Player from, Player to, String message)
|
||||
|
@ -112,11 +112,11 @@ public class ShopItem extends CraftItemStack
|
||||
{
|
||||
if (_locked && !_displayItem)
|
||||
{
|
||||
this.getHandle().c(ChatColor.RED + "§l" + _name);
|
||||
this.getHandle().c(ChatColor.RED + "§l" + _name);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.getHandle().c(ChatColor.GREEN + "§l" + _name);
|
||||
this.getHandle().c(ChatColor.GREEN + "§l" + _name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
21
Plugins/Mineplex.Hub/Mineplex.Hub.iml
Normal file
21
Plugins/Mineplex.Hub/Mineplex.Hub.iml
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="bukkit" level="project" />
|
||||
<orderEntry type="library" name="commons-codec" level="project" />
|
||||
<orderEntry type="library" name="commons-io" level="project" />
|
||||
<orderEntry type="module" module-name="Mineplex.Core" />
|
||||
<orderEntry type="module" module-name="Mineplex.Core.Common" />
|
||||
<orderEntry type="module" module-name="Mineplex.Minecraft.Game.ClassCombat" />
|
||||
<orderEntry type="module" module-name="Mineplex.Minecraft.Game.Core" />
|
||||
<orderEntry type="module" module-name="Nautilus.Core.CraftBukkit" />
|
||||
<orderEntry type="library" name="craftbukkit" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
@ -80,9 +80,9 @@ import mineplex.minecraft.game.core.condition.ConditionManager;
|
||||
public class HubManager extends MiniClientPlugin<HubClient>
|
||||
{
|
||||
public String Mode = "Normal";
|
||||
|
||||
|
||||
private BlockRestore _blockRestore;
|
||||
private CoreClientManager _clientManager;
|
||||
private CoreClientManager _clientManager;
|
||||
private ConditionManager _conditionManager;
|
||||
private DonationManager _donationManager;
|
||||
private DisguiseManager _disguiseManager;
|
||||
@ -98,30 +98,30 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
|
||||
private Location _spawn;
|
||||
private int _scoreboardTick = 0;
|
||||
|
||||
|
||||
private HashMap<Player, Scoreboard> _scoreboards = new HashMap<Player, Scoreboard>();
|
||||
|
||||
private String _pigStacker = "0 - Nobody";
|
||||
|
||||
|
||||
private boolean _shuttingDown;
|
||||
|
||||
private HashMap<String, Long> _portalTime = new HashMap<String, Long>();
|
||||
|
||||
|
||||
private int _slot = 7;
|
||||
private HashSet<Player> _disabled = new HashSet<Player>();
|
||||
|
||||
|
||||
//Admin
|
||||
private boolean _gadgetsEnabled = true;
|
||||
private HashSet<Player> _forcefield = new HashSet<Player>();
|
||||
|
||||
public HubManager(JavaPlugin plugin, BlockRestore blockRestore, CoreClientManager clientManager, DonationManager donationManager, ConditionManager conditionManager, DisguiseManager disguiseManager, TaskManager taskManager, Portal portal, PartyManager partyManager)
|
||||
public HubManager(JavaPlugin plugin, BlockRestore blockRestore, CoreClientManager clientManager, DonationManager donationManager, ConditionManager conditionManager, DisguiseManager disguiseManager, TaskManager taskManager, Portal portal, PartyManager partyManager)
|
||||
{
|
||||
super("Hub Manager", plugin);
|
||||
|
||||
_blockRestore = blockRestore;
|
||||
_clientManager = clientManager;
|
||||
_conditionManager = conditionManager;
|
||||
_donationManager = donationManager;
|
||||
_donationManager = donationManager;
|
||||
_disguiseManager = disguiseManager;
|
||||
|
||||
_portal = portal;
|
||||
@ -135,26 +135,26 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
new WorldManager(this);
|
||||
new JumpManager(this);
|
||||
new NewsManager(this);
|
||||
|
||||
|
||||
_mountManager = new MountManager(this);
|
||||
_gadgetManager = new GadgetManager(this, _mountManager);
|
||||
|
||||
_partyManager = partyManager;
|
||||
_tutorialManager = new TutorialManager(this, donationManager, taskManager, _textCreator);
|
||||
_visibilityManager = new VisibilityManager(this);
|
||||
|
||||
|
||||
_statsManager = new StatsManager(plugin);
|
||||
|
||||
((CraftWorld)Bukkit.getWorlds().get(0)).getHandle().pvpMode = true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void AddCommands()
|
||||
public void AddCommands()
|
||||
{
|
||||
AddCommand(new GadgetToggle(this));
|
||||
AddCommand(new ForcefieldToggle(this));
|
||||
}
|
||||
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void reflectMotd(ServerListPingEvent event)
|
||||
{
|
||||
@ -167,54 +167,54 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
@EventHandler
|
||||
public void BumpJoin(PlayerJoinEvent event)
|
||||
{
|
||||
event.getPlayer().getInventory().setItem(_slot, ItemStackFactory.Instance.CreateStack(Material.SLIME_BALL, (byte)0, 1,
|
||||
event.getPlayer().getInventory().setItem(_slot, ItemStackFactory.Instance.CreateStack(Material.SLIME_BALL, (byte)0, 1,
|
||||
C.cYellow + "Stacker" + C.cWhite + " - " + C.cGreen + "Enabled"));
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void BumpQuit(PlayerQuitEvent event)
|
||||
{
|
||||
_disabled.remove(event.getPlayer());
|
||||
}
|
||||
|
||||
|
||||
public boolean BumpDisabled(Entity ent)
|
||||
{
|
||||
if (ent == null)
|
||||
return false;
|
||||
|
||||
|
||||
return _disabled.contains(ent);
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void BumpToggle(PlayerInteractEvent event)
|
||||
{
|
||||
if (event.getAction() == Action.PHYSICAL)
|
||||
return;
|
||||
|
||||
|
||||
Player player = event.getPlayer();
|
||||
|
||||
|
||||
if (player.getInventory().getHeldItemSlot() != _slot)
|
||||
return;
|
||||
|
||||
|
||||
event.setCancelled(true);
|
||||
|
||||
|
||||
if (_disabled.remove(player))
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Hub Games", "You are back in the Hub Games!"));
|
||||
|
||||
player.getInventory().setItem(_slot, ItemStackFactory.Instance.CreateStack(Material.SLIME_BALL, (byte)0, 1,
|
||||
|
||||
player.getInventory().setItem(_slot, ItemStackFactory.Instance.CreateStack(Material.SLIME_BALL, (byte)0, 1,
|
||||
C.cYellow + "Stacker" + C.cWhite + " - " + C.cGreen + "Enabled"));
|
||||
}
|
||||
else
|
||||
{
|
||||
_disabled.add(player);
|
||||
UtilPlayer.message(player, F.main("Hub Games", "You are no longer partaking in Hub Games."));
|
||||
|
||||
player.getInventory().setItem(_slot, ItemStackFactory.Instance.CreateStack(Material.MAGMA_CREAM, (byte)0, 1,
|
||||
|
||||
player.getInventory().setItem(_slot, ItemStackFactory.Instance.CreateStack(Material.MAGMA_CREAM, (byte)0, 1,
|
||||
C.cYellow + "Stacker" + C.cWhite + " - " + C.cRed + "Disabled"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void orderThatItem(final PlayerDropItemEvent event)
|
||||
{
|
||||
@ -234,20 +234,20 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void redirectStopCommand(PlayerCommandPreprocessEvent event)
|
||||
{
|
||||
if (event.getPlayer().isOp() && event.getMessage().equalsIgnoreCase("/stop"))
|
||||
{
|
||||
_shuttingDown = true;
|
||||
|
||||
|
||||
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(_plugin, new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
_portal.SendAllPlayers("Lobby");
|
||||
|
||||
|
||||
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(_plugin, new Runnable()
|
||||
{
|
||||
public void run()
|
||||
@ -257,11 +257,11 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
}, 40L);
|
||||
}
|
||||
}, 60L);
|
||||
|
||||
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void preventEggSpawn(ItemSpawnEvent event)
|
||||
{
|
||||
@ -302,12 +302,12 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
public void login(final PlayerLoginEvent event)
|
||||
{
|
||||
CoreClient client = _clientManager.Get(event.getPlayer().getName());
|
||||
|
||||
|
||||
// Reserved Slot Check
|
||||
if (Bukkit.getOnlinePlayers().length >= Bukkit.getServer().getMaxPlayers())
|
||||
{
|
||||
@ -332,31 +332,31 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
try
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
|
||||
|
||||
//Survival
|
||||
player.setGameMode(GameMode.SURVIVAL);
|
||||
|
||||
|
||||
//Public Message
|
||||
event.setJoinMessage(null);
|
||||
|
||||
|
||||
//Teleport
|
||||
player.teleport(GetSpawn());
|
||||
|
||||
|
||||
//Allow Double Jump
|
||||
player.setAllowFlight(true);
|
||||
|
||||
|
||||
UtilInv.Clear(player);
|
||||
|
||||
|
||||
//Scoreboard
|
||||
Scoreboard board = Bukkit.getScoreboardManager().getNewScoreboard();
|
||||
player.setScoreboard(board);
|
||||
_scoreboards.put(player, board);
|
||||
|
||||
|
||||
//Objective
|
||||
Objective obj = board.registerNewObjective(C.Bold + "Player Data", "dummy");
|
||||
obj.setDisplaySlot(DisplaySlot.SIDEBAR);
|
||||
|
||||
|
||||
|
||||
|
||||
for (Rank rank : Rank.values())
|
||||
{
|
||||
if (rank != Rank.ALL)
|
||||
@ -364,32 +364,32 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
else
|
||||
board.registerNewTeam(rank.Name).setPrefix("");
|
||||
}
|
||||
|
||||
|
||||
for (Player otherPlayer : Bukkit.getOnlinePlayers())
|
||||
{
|
||||
if (_clientManager.Get(otherPlayer) == null)
|
||||
continue;
|
||||
|
||||
|
||||
String rankName = _clientManager.Get(player).GetRank().Name;
|
||||
String otherRankName = _clientManager.Get(otherPlayer).GetRank().Name;
|
||||
|
||||
|
||||
if (!_clientManager.Get(player).GetRank().Has(Rank.ULTRA) && _donationManager.Get(player.getName()).OwnsUltraPackage())
|
||||
{
|
||||
rankName = Rank.ULTRA.Name;
|
||||
}
|
||||
|
||||
|
||||
if (!_clientManager.Get(otherPlayer).GetRank().Has(Rank.ULTRA) && _donationManager.Get(otherPlayer.getName()).OwnsUltraPackage())
|
||||
{
|
||||
otherRankName = Rank.ULTRA.Name;
|
||||
}
|
||||
|
||||
|
||||
//Add Other to Self
|
||||
board.getTeam(otherRankName).addPlayer(otherPlayer);
|
||||
|
||||
|
||||
//Add Self to Other
|
||||
otherPlayer.getScoreboard().getTeam(rankName).addPlayer(player);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -451,9 +451,9 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
player.getScoreboard().resetScores(event.getPlayer().getName());
|
||||
|
||||
|
||||
_scoreboards.remove(event.getPlayer());
|
||||
|
||||
|
||||
_portalTime.remove(event.getPlayer().getName());
|
||||
}
|
||||
|
||||
@ -487,13 +487,13 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
|
||||
event.setMessage(event.getMessage().substring(1, event.getMessage().length()));
|
||||
event.setFormat(C.cDPurple + C.Bold + "Party " + C.cWhite + C.Bold + "%1$s " + C.cPurple + "%2$s");
|
||||
|
||||
|
||||
for (String name : party.GetPlayers())
|
||||
{
|
||||
Player other = UtilPlayer.searchExact(name);
|
||||
|
||||
|
||||
if (other != null)
|
||||
event.getRecipients().add(other);
|
||||
event.getRecipients().add(other);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -501,7 +501,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
UtilPlayer.message(player, F.main("Party", "You are not in a Party."));
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
@ -513,7 +513,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
event.getRecipients().remove(other);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
event.setMessage(event.getMessage());
|
||||
event.setFormat(rankStr + C.cYellow + "%1$s " + C.cWhite + "%2$s");
|
||||
}
|
||||
@ -530,7 +530,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
event.getEntity().leaveVehicle();
|
||||
event.getEntity().teleport(GetSpawn());
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
event.getEntity().remove();
|
||||
|
||||
@ -607,11 +607,11 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
//Dont Waste Time
|
||||
if (_partyManager.GetParty(player) != null)
|
||||
continue;
|
||||
|
||||
|
||||
//Return to Main Scoreboard
|
||||
if (!player.getScoreboard().equals(_scoreboards.get(player)))
|
||||
player.setScoreboard(_scoreboards.get(player));
|
||||
|
||||
|
||||
//Objective
|
||||
Objective obj = player.getScoreboard().getObjective(DisplaySlot.SIDEBAR);
|
||||
|
||||
@ -705,11 +705,11 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
}
|
||||
|
||||
@Override
|
||||
protected HubClient AddPlayer(String player)
|
||||
{
|
||||
protected HubClient AddPlayer(String player)
|
||||
{
|
||||
return new HubClient(player);
|
||||
}
|
||||
|
||||
|
||||
public BlockRestore GetBlockRestore()
|
||||
{
|
||||
return _blockRestore;
|
||||
@ -719,7 +719,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
{
|
||||
return _clientManager;
|
||||
}
|
||||
|
||||
|
||||
public ConditionManager GetCondition()
|
||||
{
|
||||
return _conditionManager;
|
||||
@ -729,22 +729,22 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
{
|
||||
return _donationManager;
|
||||
}
|
||||
|
||||
|
||||
public DisguiseManager GetDisguise()
|
||||
{
|
||||
return _disguiseManager;
|
||||
}
|
||||
|
||||
|
||||
public GadgetManager GetGadget()
|
||||
{
|
||||
return _gadgetManager;
|
||||
}
|
||||
|
||||
|
||||
public MountManager GetMount()
|
||||
{
|
||||
return _mountManager;
|
||||
}
|
||||
|
||||
|
||||
public ParkourManager GetParkour()
|
||||
{
|
||||
return _parkour;
|
||||
@ -755,17 +755,17 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
return _spawn.clone();
|
||||
}
|
||||
|
||||
public TutorialManager GetTutorial()
|
||||
public TutorialManager GetTutorial()
|
||||
{
|
||||
return _tutorialManager;
|
||||
}
|
||||
|
||||
|
||||
public StatsManager GetStats()
|
||||
{
|
||||
return _statsManager;
|
||||
}
|
||||
|
||||
public VisibilityManager GetVisibility()
|
||||
public VisibilityManager GetVisibility()
|
||||
{
|
||||
return _visibilityManager;
|
||||
}
|
||||
@ -788,61 +788,61 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
|
||||
return UtilTime.elapsed(_portalTime.get(player.getName()), 5000);
|
||||
}
|
||||
|
||||
|
||||
public boolean CanBump(LivingEntity ent)
|
||||
{
|
||||
if (!(ent instanceof Player))
|
||||
return true;
|
||||
|
||||
|
||||
if (BumpDisabled(ent))
|
||||
return false;
|
||||
|
||||
|
||||
if (GetVisibility().IsHiding(ent))
|
||||
return false;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void HeartDisplay(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.FASTER)
|
||||
return;
|
||||
|
||||
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
{
|
||||
if (!player.isOp())
|
||||
continue;
|
||||
|
||||
|
||||
for (Player other : UtilServer.getPlayers())
|
||||
{
|
||||
if (player.getName().equalsIgnoreCase("Chiss"))
|
||||
UtilParticle.PlayParticle(other, ParticleType.HEART, player.getLocation().add(0, 1, 0), 0.25f, 0.5f, 0.25f, 0, 1);
|
||||
|
||||
|
||||
else if (player.getName().equalsIgnoreCase("defek7"))
|
||||
UtilParticle.PlayParticle(other, ParticleType.FIREWORKS_SPARK, player.getLocation().add(0, 1, 0), 0.25f, 0.5f, 0.25f, 0, 2);
|
||||
|
||||
|
||||
else if (player.getName().equalsIgnoreCase("Spu_"))
|
||||
UtilParticle.PlayParticle(other, ParticleType.FLAME, player.getLocation().add(0, 1, 0), 0.25f, 0.5f, 0.25f, 0, 2);
|
||||
|
||||
|
||||
else if (player.getName().equalsIgnoreCase("sterling_"))
|
||||
UtilParticle.PlayParticle(other, ParticleType.WITCH_MAGIC, player.getLocation().add(0, 1, 0), 0.25f, 0.5f, 0.25f, 0, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void SkillTrigger(SkillTriggerEvent event)
|
||||
{
|
||||
event.SetCancelled(true);
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void ItemTrigger(ItemTriggerEvent event)
|
||||
{
|
||||
event.SetCancelled(true);
|
||||
}
|
||||
|
||||
|
||||
public boolean IsGadgetEnabled()
|
||||
{
|
||||
return _gadgetsEnabled;
|
||||
@ -857,30 +857,30 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
{
|
||||
if (_forcefield.add(caller))
|
||||
return true;
|
||||
|
||||
|
||||
_forcefield.remove(caller);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void ForcefieldUpdate(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.FAST)
|
||||
return;
|
||||
|
||||
|
||||
for (Player player : _forcefield)
|
||||
{
|
||||
for (Player other : UtilServer.getPlayers())
|
||||
{
|
||||
if (player.equals(other))
|
||||
continue;
|
||||
|
||||
|
||||
if (UtilMath.offset(other, player) > 5)
|
||||
continue;
|
||||
|
||||
|
||||
if (GetClients().Get(other).GetRank().Has(Rank.ADMIN))
|
||||
continue;
|
||||
|
||||
|
||||
if (Recharge.Instance.use(other, "Forcefield Bump", 500, false, false))
|
||||
{
|
||||
UtilAction.velocity(other, UtilAlg.getTrajectory2d(player, other), 1.6, true, 0.8, 0, 10, true);
|
||||
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="bukkit" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="Mineplex.Core" />
|
||||
<orderEntry type="module" module-name="Mineplex.Core.Common" />
|
||||
<orderEntry type="module" module-name="Mineplex.Minecraft.Game.Core" />
|
||||
<orderEntry type="module" module-name="Nautilus.Core.CraftBukkit" />
|
||||
<orderEntry type="library" name="craftbukkit" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
@ -1,92 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Chicken;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.FormBase;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
|
||||
public class ChickenForm extends FormBase
|
||||
{
|
||||
public ChickenForm(SkillFactory skills, String name, ClassType classType,
|
||||
SkillType skillType, int cost, int levels)
|
||||
{
|
||||
super(skills, name, classType, skillType, cost, levels,
|
||||
EntityType.CHICKEN, new String[]
|
||||
{
|
||||
"Flap"
|
||||
});
|
||||
|
||||
SetDesc(new String[]
|
||||
{
|
||||
ChatColor.WHITE + "Passives:",
|
||||
"* Slow I",
|
||||
"* +10 Damage taken from Arrows",
|
||||
"",
|
||||
"",
|
||||
ChatColor.WHITE + "Attack: " + ChatColor.GREEN + "None",
|
||||
"",
|
||||
"",
|
||||
ChatColor.WHITE + "Sword Skill: " + ChatColor.GREEN + "Fly",
|
||||
"Push Block to Flap;",
|
||||
"* Velocity of 0.5 + 0.05pL",
|
||||
"",
|
||||
"Hold Block to Glide;",
|
||||
"* Min speed of 0.3 + 0.03pL",
|
||||
"* Max speed of 0.7 + 0.07pL",
|
||||
"",
|
||||
"Glide through enemies to pick them up.",
|
||||
"Stop gliding to drop them.",
|
||||
"",
|
||||
"",
|
||||
ChatColor.WHITE + "Axe Skill: " + ChatColor.GREEN + "Spin Web",
|
||||
"Spin a temporary web;",
|
||||
"* Lasts 5 + 1pL seconds",
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void UnapplyMorph(Player player)
|
||||
{
|
||||
Flap flap = (Flap)Factory.GetSkill("Flap");
|
||||
flap.GetGrab().Release(player);
|
||||
|
||||
Factory.Condition().EndCondition(player, null, GetName());
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void Attack(CustomDamageEvent event)
|
||||
{
|
||||
if (event.IsCancelled())
|
||||
return;
|
||||
|
||||
if (event.GetCause() != DamageCause.ENTITY_ATTACK)
|
||||
return;
|
||||
|
||||
Player damager = event.GetDamagerPlayer(false);
|
||||
if (damager == null) return;
|
||||
|
||||
if (!IsMorphed(damager))
|
||||
return;
|
||||
|
||||
event.SetCancelled(GetName());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Update(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.FAST)
|
||||
return;
|
||||
|
||||
for (Player cur : GetMorphedUsers())
|
||||
Factory.Condition().Factory().Slow(GetName(), cur, cur, 1.9, 0, false, false, false);
|
||||
}
|
||||
}
|
@ -1,262 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Chicken;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
public class Flap extends SkillActive
|
||||
{
|
||||
private HashMap<Player, Vector> _active = new HashMap<Player, Vector>();
|
||||
private HashMap<Player, Long> _damaged = new HashMap<Player, Long>();
|
||||
|
||||
private long _damageDisableTime = 6000;
|
||||
|
||||
private double _flap = 0.5;
|
||||
private double _min = 0.3;
|
||||
private double _max = 0.7;
|
||||
|
||||
private FlapGrab _grab = null;
|
||||
|
||||
private int _tick = 0;
|
||||
|
||||
public Flap(SkillFactory skills, String name, ClassType classType, SkillType skillType,
|
||||
int cost, int levels,
|
||||
int energy, int energyMod,
|
||||
long recharge, long rechargeMod, boolean rechargeInform,
|
||||
Material[] itemArray,
|
||||
Action[] actionArray)
|
||||
{
|
||||
super(skills, name, classType, skillType,
|
||||
cost, levels,
|
||||
energy, energyMod,
|
||||
recharge, rechargeMod, rechargeInform,
|
||||
itemArray,
|
||||
actionArray);
|
||||
|
||||
_grab = new FlapGrab(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean CustomCheck(Player player, int level)
|
||||
{
|
||||
if (player.getLocation().getBlock().getTypeId() == 8 || player.getLocation().getBlock().getTypeId() == 9)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Skill", "You cannot use " + F.skill(GetName()) + " in water."));
|
||||
return false;
|
||||
}
|
||||
|
||||
//Wings Damaged
|
||||
if (_damaged.containsKey(player))
|
||||
{
|
||||
long damageTime = _damaged.get(player);
|
||||
|
||||
if (!UtilTime.elapsed(damageTime, _damageDisableTime))
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Skill", "You cannot use " + F.skill(GetName()) + " for " +
|
||||
F.time(UtilTime.MakeStr(_damageDisableTime - (System.currentTimeMillis() - damageTime))) + "."));
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Skill(Player player, int level)
|
||||
{
|
||||
//Initial Flap
|
||||
Vector vel = player.getLocation().getDirection();
|
||||
vel.multiply(_flap + ((_flap/10d) * level));
|
||||
vel.add(new Vector(0,0.1,0));
|
||||
|
||||
//Clutch Penalty
|
||||
if (player.getVehicle() != null)
|
||||
vel.multiply(0.5 + (level * 0.05));
|
||||
|
||||
_active.put(player, vel);
|
||||
|
||||
//Apply Velocity
|
||||
player.setVelocity(vel);
|
||||
|
||||
//Sound
|
||||
player.getWorld().playSound(player.getLocation(), Sound.BAT_TAKEOFF, 1f, 1f);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void Damage(CustomDamageEvent event)
|
||||
{
|
||||
if (event.GetProjectile() == null)
|
||||
return;
|
||||
|
||||
if (event.GetDamageePlayer() == null)
|
||||
return;
|
||||
|
||||
if (!GetUsers().containsKey(event.GetDamageePlayer()))
|
||||
return;
|
||||
|
||||
event.AddMod(UtilEnt.getName(event.GetDamagerEntity(true)), "Chicken Weakness", 10, false);
|
||||
|
||||
_damaged.put(event.GetDamageePlayer(), System.currentTimeMillis());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Glide(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.TICK)
|
||||
return;
|
||||
|
||||
_tick = (_tick + 1)%12;
|
||||
|
||||
for (Player cur : GetUsers())
|
||||
{
|
||||
if (!_active.containsKey(cur))
|
||||
{
|
||||
GetGrab().Release(cur);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!cur.isBlocking())
|
||||
{
|
||||
_active.remove(cur);
|
||||
continue;
|
||||
}
|
||||
|
||||
//Level
|
||||
int level = getLevel(cur);
|
||||
if (level == 0)
|
||||
{
|
||||
_active.remove(cur);
|
||||
continue;
|
||||
}
|
||||
|
||||
//Clutch Penalty
|
||||
if (cur.getVehicle() != null)
|
||||
{
|
||||
//Energy
|
||||
if (!Factory.Energy().Use(cur, "Glide", 1.2 - (0.02 * level), true, true))
|
||||
{
|
||||
_active.remove(cur);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Energy
|
||||
if (!Factory.Energy().Use(cur, "Glide", 0.6 - (0.02 * level), true, true))
|
||||
{
|
||||
_active.remove(cur);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
//Target to apply velocity to
|
||||
Entity target = cur;
|
||||
if (cur.getVehicle() != null)
|
||||
target = cur.getVehicle();
|
||||
|
||||
//Get Velocity
|
||||
Vector vel = _active.get(cur);
|
||||
|
||||
if (UtilEnt.isGrounded(target) && vel.getY() < 0)
|
||||
{
|
||||
_active.remove(cur);
|
||||
continue;
|
||||
}
|
||||
|
||||
//Turn
|
||||
double speed = vel.length();
|
||||
Vector turn = cur.getLocation().getDirection();
|
||||
turn.subtract(UtilAlg.Normalize(UtilAlg.Clone(vel)));
|
||||
turn.multiply(0.1);
|
||||
vel.add(turn);
|
||||
UtilAlg.Normalize(vel).multiply(speed);
|
||||
|
||||
//Gravity
|
||||
vel.setX(vel.getX() * (1 - (vel.getY() / 6)));
|
||||
vel.setZ(vel.getZ() * (1 - (vel.getY() / 6)));
|
||||
if (vel.getY() > 0) vel.setY(vel.getY() * (1 - (vel.getY() / 6)));
|
||||
|
||||
//Air Friction
|
||||
vel.multiply(0.998);
|
||||
|
||||
double minSpeed = _min + ((_min/10d) * level);
|
||||
double maxSpeed = _max + ((_max/10d) * level);
|
||||
|
||||
//Speed Min
|
||||
if (vel.length() < minSpeed)
|
||||
vel.normalize().multiply(minSpeed);
|
||||
|
||||
//Speed Max
|
||||
if (vel.length() > maxSpeed)
|
||||
vel.normalize().multiply(maxSpeed);
|
||||
|
||||
//Apply Velocity
|
||||
target.setVelocity(vel);
|
||||
|
||||
//Fall Dist
|
||||
target.setFallDistance(0f);
|
||||
|
||||
//Hit Others (only if not carrying)
|
||||
if (cur.equals(target))
|
||||
{
|
||||
for (Player other : UtilPlayer.getNearby(cur.getLocation(), 2))
|
||||
{
|
||||
if (other.equals(cur))
|
||||
continue;
|
||||
|
||||
if (!Factory.Relation().CanHurt(cur, other))
|
||||
continue;
|
||||
|
||||
_grab.Grab(cur, other);
|
||||
|
||||
if (vel.getY() < 0.1)
|
||||
vel.setY(0.1);
|
||||
}
|
||||
}
|
||||
|
||||
//Sound
|
||||
if (_tick == 0)
|
||||
cur.getWorld().playSound(cur.getLocation(), Sound.BAT_TAKEOFF, 0.4f, 1f);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void DamageRelease(CustomDamageEvent event)
|
||||
{
|
||||
GetGrab().DamageRelease(event);
|
||||
}
|
||||
|
||||
public FlapGrab GetGrab()
|
||||
{
|
||||
return _grab;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Reset(Player player)
|
||||
{
|
||||
_grab.Reset(player);
|
||||
|
||||
_active.remove(player);
|
||||
_damaged.remove(player);
|
||||
}
|
||||
}
|
@ -1,99 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Chicken;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.bukkit.EntityEffect;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.F;
|
||||
|
||||
public class FlapGrab
|
||||
{
|
||||
public Flap Host;
|
||||
|
||||
private HashMap<Player, LivingEntity> _clutch = new HashMap<Player, LivingEntity>();
|
||||
|
||||
public FlapGrab(Flap host)
|
||||
{
|
||||
Host = host;
|
||||
}
|
||||
|
||||
public void Grab(Player player, LivingEntity ent)
|
||||
{
|
||||
if (_clutch.containsKey(player))
|
||||
return;
|
||||
|
||||
if (ent == null)
|
||||
return;
|
||||
|
||||
//Ent already has LE passenger
|
||||
if (ent.getPassenger() != null)
|
||||
if (ent.getPassenger() instanceof LivingEntity)
|
||||
return;
|
||||
|
||||
//Player on something
|
||||
if (player.getVehicle() != null)
|
||||
return;
|
||||
|
||||
//Condition Indicators
|
||||
Host.Factory.Condition().SetIndicatorVisibility((LivingEntity)ent, false);
|
||||
|
||||
//Action
|
||||
player.leaveVehicle();
|
||||
ent.eject();
|
||||
ent.setPassenger(player);
|
||||
_clutch.put(player, (LivingEntity)ent);
|
||||
|
||||
//Inform
|
||||
UtilPlayer.message(player, F.main(Host.GetClassType().name(), "You picked up " + F.name(UtilEnt.getName(ent)) + "."));
|
||||
UtilPlayer.message(ent, F.main(Host.GetClassType().name(), F.name(player.getName()) + " picked you up."));
|
||||
|
||||
//Effect
|
||||
ent.playEffect(EntityEffect.HURT);
|
||||
|
||||
//Sound
|
||||
player.getWorld().playSound(player.getLocation(), Sound.CHICKEN_HURT, 2f, 1.5f);
|
||||
}
|
||||
|
||||
public void Release(Player player)
|
||||
{
|
||||
LivingEntity ent = _clutch.remove(player);
|
||||
if (ent == null) return;
|
||||
|
||||
player.leaveVehicle();
|
||||
ent.eject();
|
||||
|
||||
//Condition Indicators
|
||||
Host.Factory.Condition().SetIndicatorVisibility(ent, true);
|
||||
|
||||
//Inform
|
||||
UtilPlayer.message(player, F.main(Host.GetClassType().name(), "You released " + F.name(UtilEnt.getName(ent)) + "."));
|
||||
UtilPlayer.message(ent, F.main(Host.GetClassType().name(), F.name(player.getName()) + " released you."));
|
||||
|
||||
//Effect
|
||||
ent.playEffect(EntityEffect.HURT);
|
||||
}
|
||||
|
||||
public void DamageRelease(CustomDamageEvent event)
|
||||
{
|
||||
Player damagee = event.GetDamageePlayer();
|
||||
if (damagee == null) return;
|
||||
|
||||
Release(damagee);
|
||||
}
|
||||
|
||||
public void Reset(Player player)
|
||||
{
|
||||
LivingEntity ent = _clutch.remove(player);
|
||||
if (ent != null)
|
||||
{
|
||||
ent.eject();
|
||||
Host.Factory.Condition().SetIndicatorVisibility(ent, true);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Creeper;
|
||||
|
||||
public class CreeperForm {
|
||||
|
||||
}
|
@ -1,186 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Shifter.Forms;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.ClientClass;
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.minecraft.game.classcombat.Skill.ISkill;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Skill;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerDropItemEvent;
|
||||
|
||||
public abstract class FormBase extends Skill
|
||||
{
|
||||
private EntityType _type;
|
||||
private ArrayList<ISkill> _formSkills = new ArrayList<ISkill>();
|
||||
private String[] _formSkillNames;
|
||||
|
||||
private HashMap<Player, HashMap<ISkill, Integer>> _savedSkills = new HashMap<Player, HashMap<ISkill, Integer>>();
|
||||
|
||||
public FormBase(SkillFactory skills, String name, ClassType classType,
|
||||
SkillType skillType, int cost, int levels, EntityType type, String[] formSkillNames)
|
||||
{
|
||||
super(skills, name, classType, skillType, cost, levels);
|
||||
|
||||
_type = type;
|
||||
_formSkillNames = formSkillNames;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Use(PlayerDropItemEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
|
||||
int level = getLevel(player);
|
||||
if (level == 0) return;
|
||||
|
||||
if (!UtilGear.isWeapon(event.getItemDrop().getItemStack()))
|
||||
return;
|
||||
|
||||
//Shift/Non-Shift for A/B
|
||||
if (!IsMorphed(player))
|
||||
{
|
||||
if (this.GetSkillType() == SkillType.PassiveA)
|
||||
if (player.isSneaking())
|
||||
return;
|
||||
|
||||
if (this.GetSkillType() == SkillType.PassiveB)
|
||||
if (!player.isSneaking())
|
||||
return;
|
||||
}
|
||||
|
||||
event.setCancelled(true);
|
||||
|
||||
if (_savedSkills.containsKey(player))
|
||||
Unmorph(player);
|
||||
else
|
||||
Morph(player);
|
||||
}
|
||||
|
||||
public EntityType GetType()
|
||||
{
|
||||
return _type;
|
||||
}
|
||||
|
||||
public void Morph(Player player)
|
||||
{
|
||||
SaveHumanSkills(player);
|
||||
|
||||
//Set Skills
|
||||
ClientClass cc = Factory.ClassManager().Get(player);
|
||||
|
||||
for (ISkill skill : GetFormSkills())
|
||||
cc.AddSkill(skill, getLevel(player));
|
||||
|
||||
|
||||
//Inform
|
||||
UtilPlayer.message(player, F.main(GetClassType().name(), "You shapeshifted into " + F.skill(GetName() + " " + getLevel(player))));
|
||||
}
|
||||
|
||||
public void Unmorph(Player player)
|
||||
{
|
||||
//Reset Skills
|
||||
for (ISkill skill : GetFormSkills())
|
||||
skill.Reset(player);
|
||||
|
||||
UnapplyMorph(player);
|
||||
RestoreHumanSkills(player);
|
||||
|
||||
//Inform
|
||||
UtilPlayer.message(player, F.main(GetClassType().name(), "You returned to " + F.skill("Human Form")));
|
||||
}
|
||||
|
||||
public boolean IsMorphed(Player player)
|
||||
{
|
||||
return _savedSkills.containsKey(player);
|
||||
}
|
||||
|
||||
public Collection<Player> GetMorphedUsers()
|
||||
{
|
||||
return _savedSkills.keySet();
|
||||
}
|
||||
|
||||
public ArrayList<ISkill> GetFormSkills()
|
||||
{
|
||||
if (_formSkills.isEmpty())
|
||||
for (String name : _formSkillNames)
|
||||
{
|
||||
ISkill skill = Factory.GetSkill(name);
|
||||
|
||||
if (skill != null)
|
||||
_formSkills.add(skill);
|
||||
|
||||
else
|
||||
System.out.println("Invalid Skill [" + name + "] for [" + GetName() + "].");
|
||||
}
|
||||
|
||||
|
||||
return _formSkills;
|
||||
}
|
||||
|
||||
public abstract void UnapplyMorph(Player player);
|
||||
|
||||
private void SaveHumanSkills(Player player)
|
||||
{
|
||||
ClientClass cc = Factory.ClassManager().Get(player);
|
||||
|
||||
//Save Current
|
||||
_savedSkills.put(player, new HashMap<ISkill, Integer>());
|
||||
|
||||
for (Entry<ISkill, Integer> skill : cc.GetSkills())
|
||||
{
|
||||
//Save Sword/Axe
|
||||
if (skill.getKey().GetSkillType() == SkillType.Sword ||
|
||||
skill.getKey().GetSkillType() == SkillType.Axe ||
|
||||
skill.getKey().GetSkillType() == SkillType.Class)
|
||||
_savedSkills.get(player).put(skill.getKey(), skill.getValue());
|
||||
|
||||
//Save OTHER Morph
|
||||
if (this.GetSkillType() == SkillType.PassiveA)
|
||||
if (skill.getKey().GetSkillType() == SkillType.PassiveB)
|
||||
_savedSkills.get(player).put(skill.getKey(), skill.getValue());
|
||||
|
||||
if (this.GetSkillType() == SkillType.PassiveB)
|
||||
if (skill.getKey().GetSkillType() == SkillType.PassiveA)
|
||||
_savedSkills.get(player).put(skill.getKey(), skill.getValue());
|
||||
}
|
||||
|
||||
//Remove Saved
|
||||
for (ISkill skill : _savedSkills.get(player).keySet())
|
||||
cc.RemoveSkill(cc.GetSkillByType(skill.GetSkillType()));
|
||||
}
|
||||
|
||||
private void RestoreHumanSkills(Player player)
|
||||
{
|
||||
ClientClass cc = Factory.ClassManager().Get(player);
|
||||
|
||||
//Remove Morph Skills
|
||||
cc.RemoveSkill(cc.GetSkillByType(SkillType.Sword));
|
||||
cc.RemoveSkill(cc.GetSkillByType(SkillType.Axe));
|
||||
|
||||
//Restore Old
|
||||
if (!_savedSkills.containsKey(player))
|
||||
return;
|
||||
|
||||
for (ISkill skill : _savedSkills.get(player).keySet())
|
||||
cc.AddSkill(skill, _savedSkills.get(player).get(skill));
|
||||
|
||||
_savedSkills.remove(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Reset(Player player)
|
||||
{
|
||||
_savedSkills.remove(player);
|
||||
}
|
||||
}
|
@ -1,127 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Golem;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.FormBase;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
|
||||
public class GolemForm extends FormBase
|
||||
{
|
||||
public GolemForm(SkillFactory skills, String name, ClassType classType,
|
||||
SkillType skillType, int cost, int levels)
|
||||
{
|
||||
super(skills, name, classType, skillType, cost, levels,
|
||||
EntityType.IRON_GOLEM, new String[]
|
||||
{
|
||||
"Magnetic Pull",
|
||||
"Magnetic Repel"
|
||||
});
|
||||
|
||||
SetDesc(new String[]
|
||||
{
|
||||
ChatColor.WHITE + "Passives:",
|
||||
"* Slow II",
|
||||
"* Protection III",
|
||||
"* -4 Damage Dealt",
|
||||
"",
|
||||
ChatColor.WHITE + "Sword Attack: " + ChatColor.GREEN + "Iron Crush",
|
||||
"* No Knockback",
|
||||
"* Slow V for 0.5 seconds",
|
||||
"",
|
||||
"",
|
||||
ChatColor.WHITE + "Axe Attack: " + ChatColor.GREEN + "Iron Smash",
|
||||
"* Strong Knockback",
|
||||
"",
|
||||
"",
|
||||
ChatColor.WHITE + "Sword Skill: " + ChatColor.GREEN + "Magnetic Pull",
|
||||
"Pull in enemies infront of you;",
|
||||
"* Range of 4 + 2pL",
|
||||
"* Radius of 2 + 0.5pL",
|
||||
"",
|
||||
"",
|
||||
ChatColor.WHITE + "Axe Skill: " + ChatColor.GREEN + "Magnetic Repel",
|
||||
"Repel all nearby enemies;",
|
||||
"* Range of 4 + 2pL",
|
||||
"* Velocity of 1.2 + 0.2pL"
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void UnapplyMorph(Player player)
|
||||
{
|
||||
Factory.Condition().EndCondition(player, null, GetName());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Update(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.FAST)
|
||||
return;
|
||||
|
||||
for (Player cur : GetMorphedUsers())
|
||||
{
|
||||
Factory.Condition().Factory().Protection(GetName(), cur, cur, 1.9, 2, false, false);
|
||||
Factory.Condition().Factory().Slow(GetName(), cur, cur, 1.9, 1, false, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void KnockbackTaken(CustomDamageEvent event)
|
||||
{
|
||||
if (event.IsCancelled())
|
||||
return;
|
||||
|
||||
if (event.GetCause() != DamageCause.ENTITY_ATTACK)
|
||||
return;
|
||||
|
||||
Player damagee = event.GetDamageePlayer();
|
||||
if (damagee == null) return;
|
||||
|
||||
if (!IsMorphed(damagee))
|
||||
return;
|
||||
|
||||
event.SetKnockback(false);
|
||||
damagee.getWorld().playSound(damagee.getLocation(), Sound.ZOMBIE_METAL, 0.8f, 1.8f);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void KnockbackGiven(CustomDamageEvent event)
|
||||
{
|
||||
if (event.IsCancelled())
|
||||
return;
|
||||
|
||||
if (event.GetCause() != DamageCause.ENTITY_ATTACK)
|
||||
return;
|
||||
|
||||
Player damager = event.GetDamagerPlayer(false);
|
||||
if (damager == null) return;
|
||||
|
||||
if (!IsMorphed(damager))
|
||||
return;
|
||||
|
||||
event.AddMod(damager.getName(), GetName(), -4, false);
|
||||
|
||||
if (UtilGear.isSword(damager.getItemInHand()))
|
||||
{
|
||||
damager.getWorld().playSound(damager.getLocation(), Sound.IRONGOLEM_HIT, 1f, 1.6f);
|
||||
Factory.Condition().Factory().Slow(GetName(), event.GetDamageeEntity(), damager, 0.5, 4, false, false, true);
|
||||
event.SetKnockback(false);
|
||||
}
|
||||
else if (UtilGear.isAxe(damager.getItemInHand()))
|
||||
{
|
||||
damager.getWorld().playSound(damager.getLocation(), Sound.IRONGOLEM_HIT, 1f, 0.8f);
|
||||
event.AddKnockback(GetName(), 4d);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,142 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Golem;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Item;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.block.Action;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
public class MagneticPull extends SkillActive
|
||||
{
|
||||
private HashSet<Player> _active = new HashSet<Player>();
|
||||
|
||||
public MagneticPull(SkillFactory skills, String name, ClassType classType, SkillType skillType,
|
||||
int cost, int levels,
|
||||
int energy, int energyMod,
|
||||
long recharge, long rechargeMod, boolean rechargeInform,
|
||||
Material[] itemArray,
|
||||
Action[] actionArray)
|
||||
{
|
||||
super(skills, name, classType, skillType,
|
||||
cost, levels,
|
||||
energy, energyMod,
|
||||
recharge, rechargeMod, rechargeInform,
|
||||
itemArray,
|
||||
actionArray);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String GetEnergyString()
|
||||
{
|
||||
return "Energy: 16 per Second";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean CustomCheck(Player player, int level)
|
||||
{
|
||||
if (player.getLocation().getBlock().getTypeId() == 8 || player.getLocation().getBlock().getTypeId() == 9)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Skill", "You cannot use " + F.skill(GetName()) + " in water."));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Skill(Player player, int level)
|
||||
{
|
||||
_active.add(player);
|
||||
|
||||
player.getWorld().playSound(player.getLocation(), Sound.IRONGOLEM_DEATH, 0.6f, 0.6f);
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void Energy(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.TICK)
|
||||
return;
|
||||
|
||||
for (Player cur : GetUsers())
|
||||
{
|
||||
if (!_active.contains(cur))
|
||||
continue;
|
||||
|
||||
if (!cur.isBlocking())
|
||||
{
|
||||
_active.remove(cur);
|
||||
continue;
|
||||
}
|
||||
|
||||
//Level
|
||||
int level = getLevel(cur);
|
||||
if (level == 0)
|
||||
{
|
||||
_active.remove(cur);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!Factory.Energy().Use(cur, GetName(), 2 - (level * 0.1), true, true))
|
||||
{
|
||||
_active.remove(cur);
|
||||
continue;
|
||||
}
|
||||
|
||||
//Effect
|
||||
cur.getWorld().playEffect(cur.getLocation(), Effect.STEP_SOUND, 42);
|
||||
|
||||
//Pull
|
||||
for (int i=0 ; i<=4 + (2*level) ; i++)
|
||||
Pull(cur, cur.getEyeLocation().add(cur.getLocation().getDirection().multiply(i)));
|
||||
}
|
||||
}
|
||||
|
||||
public void Pull(Player player, Location loc)
|
||||
{
|
||||
for (Entity other : player.getWorld().getEntities())
|
||||
{
|
||||
if (!(other instanceof LivingEntity) && !(other instanceof Item))
|
||||
continue;
|
||||
|
||||
if (player.equals(other))
|
||||
continue;
|
||||
|
||||
if (UtilMath.offset(player, other) < 2 || UtilMath.offset(loc, other.getLocation()) > 2 + ((getLevel(player) * 0.5)))
|
||||
continue;
|
||||
|
||||
if (other instanceof Player)
|
||||
{
|
||||
if (!Factory.Relation().CanHurt(player, (Player)other))
|
||||
continue;
|
||||
}
|
||||
|
||||
UtilAction.velocity(other, UtilAlg.getTrajectory2d(other, player),
|
||||
0.2, false, 0, 0, 1, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Reset(Player player)
|
||||
{
|
||||
_active.remove(player);
|
||||
}
|
||||
}
|
@ -1,142 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Golem;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Item;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.block.Action;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
public class MagneticPull extends SkillActive
|
||||
{
|
||||
private HashSet<Player> _active = new HashSet<Player>();
|
||||
|
||||
public MagneticPull(SkillFactory skills, String name, ClassType classType, SkillType skillType,
|
||||
int cost, int levels,
|
||||
int energy, int energyMod,
|
||||
long recharge, long rechargeMod, boolean rechargeInform,
|
||||
Material[] itemArray,
|
||||
Action[] actionArray)
|
||||
{
|
||||
super(skills, name, classType, skillType,
|
||||
cost, levels,
|
||||
energy, energyMod,
|
||||
recharge, rechargeMod, rechargeInform,
|
||||
itemArray,
|
||||
actionArray);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String GetEnergyString()
|
||||
{
|
||||
return "Energy: 16 per Second";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean CustomCheck(Player player, int level)
|
||||
{
|
||||
if (player.getLocation().getBlock().getTypeId() == 8 || player.getLocation().getBlock().getTypeId() == 9)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Skill", "You cannot use " + F.skill(GetName()) + " in water."));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Skill(Player player, int level)
|
||||
{
|
||||
_active.add(player);
|
||||
|
||||
player.getWorld().playSound(player.getLocation(), Sound.IRONGOLEM_DEATH, 0.6f, 0.6f);
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void Energy(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.TICK)
|
||||
return;
|
||||
|
||||
for (Player cur : GetUsers())
|
||||
{
|
||||
if (!_active.contains(cur))
|
||||
continue;
|
||||
|
||||
if (!cur.isBlocking())
|
||||
{
|
||||
_active.remove(cur);
|
||||
continue;
|
||||
}
|
||||
|
||||
//Level
|
||||
int level = GetLevel(cur);
|
||||
if (level == 0)
|
||||
{
|
||||
_active.remove(cur);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!Factory.Energy().use(cur, GetName(), 2 - (level * 0.1), true, true))
|
||||
{
|
||||
_active.remove(cur);
|
||||
continue;
|
||||
}
|
||||
|
||||
//Effect
|
||||
cur.getWorld().playEffect(cur.getLocation(), Effect.STEP_SOUND, 42);
|
||||
|
||||
//Pull
|
||||
for (int i=0 ; i<=4 + (2*level) ; i++)
|
||||
Pull(cur, cur.getEyeLocation().add(cur.getLocation().getDirection().multiply(i)));
|
||||
}
|
||||
}
|
||||
|
||||
public void Pull(Player player, Location loc)
|
||||
{
|
||||
for (Entity other : player.getWorld().getEntities())
|
||||
{
|
||||
if (!(other instanceof LivingEntity) && !(other instanceof Item))
|
||||
continue;
|
||||
|
||||
if (player.equals(other))
|
||||
continue;
|
||||
|
||||
if (UtilMath.offset(player, other) < 2 || UtilMath.offset(loc, other.getLocation()) > 2 + ((GetLevel(player) * 0.5)))
|
||||
continue;
|
||||
|
||||
if (other instanceof Player)
|
||||
{
|
||||
if (!Factory.Relation().CanHurt(player, (Player)other))
|
||||
continue;
|
||||
}
|
||||
|
||||
UtilAction.velocity(other, UtilAlg.getTrajectory2d(other, player),
|
||||
0.2, false, 0, 0, 1, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Reset(Player player)
|
||||
{
|
||||
_active.remove(player);
|
||||
}
|
||||
}
|
@ -1,98 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Golem;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
public class MagneticRepel extends SkillActive
|
||||
{
|
||||
public MagneticRepel(SkillFactory skills, String name, ClassType classType, SkillType skillType,
|
||||
int cost, int levels,
|
||||
int energy, int energyMod,
|
||||
long recharge, long rechargeMod, boolean rechargeInform,
|
||||
Material[] itemArray,
|
||||
Action[] actionArray)
|
||||
{
|
||||
super(skills, name, classType, skillType,
|
||||
cost, levels,
|
||||
energy, energyMod,
|
||||
recharge, rechargeMod, rechargeInform,
|
||||
itemArray,
|
||||
actionArray);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean CustomCheck(Player player, int level)
|
||||
{
|
||||
if (player.getLocation().getBlock().getTypeId() == 8 || player.getLocation().getBlock().getTypeId() == 9)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Skill", "You cannot use " + F.skill(GetName()) + " in water."));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Skill(Player player, int level)
|
||||
{
|
||||
//Repel
|
||||
for (Entity other : player.getWorld().getEntities())
|
||||
{
|
||||
if (!(other instanceof LivingEntity))
|
||||
continue;
|
||||
|
||||
if (player.equals(other))
|
||||
continue;
|
||||
|
||||
double offset = UtilMath.offset(player, other);
|
||||
double maxOffset = 6 + (level * 2);
|
||||
|
||||
if (offset > maxOffset)
|
||||
continue;
|
||||
|
||||
if (other instanceof Player)
|
||||
{
|
||||
if (!Factory.Relation().CanHurt(player, (Player)other))
|
||||
continue;
|
||||
}
|
||||
|
||||
double power = 0.5 + (0.5 *((maxOffset - offset) / maxOffset));
|
||||
|
||||
Vector vel = UtilAlg.getTrajectory(player, other);
|
||||
vel.setY(Math.min(0.3, vel.getY()));
|
||||
vel.normalize();
|
||||
|
||||
UtilAction.velocity(other, vel,
|
||||
power * (2 + (level * 0.5)), false, 0, 0.8, 0.8, true);
|
||||
}
|
||||
|
||||
//Inform
|
||||
UtilPlayer.message(player, F.main(GetClassType().name(), "You used " + F.skill(GetName(level)) + "."));
|
||||
|
||||
//Sound
|
||||
for (int i=0 ; i<3 ; i++)
|
||||
player.getWorld().playSound(player.getLocation(), Sound.FIZZ, 2f, 0.6f);
|
||||
|
||||
player.getWorld().playSound(player.getLocation(), Sound.IRONGOLEM_DEATH, 2f, 2f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Reset(Player player)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -1,211 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Spider;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Arrow;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Projectile;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
public class Needler extends SkillActive
|
||||
{
|
||||
private HashMap<Player, Integer> _stored = new HashMap<Player, Integer>();
|
||||
private HashMap<Player, Long> _fired = new HashMap<Player, Long>();
|
||||
|
||||
private HashSet<Arrow> _arrows = new HashSet<Arrow>();
|
||||
|
||||
private boolean _tick = false;
|
||||
|
||||
public Needler(SkillFactory skills, String name, ClassType classType, SkillType skillType,
|
||||
int cost, int levels,
|
||||
int energy, int energyMod,
|
||||
long recharge, long rechargeMod, boolean rechargeInform,
|
||||
Material[] itemArray,
|
||||
Action[] actionArray)
|
||||
{
|
||||
super(skills, name, classType, skillType,
|
||||
cost, levels,
|
||||
energy, energyMod,
|
||||
recharge, rechargeMod, rechargeInform,
|
||||
itemArray,
|
||||
actionArray);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean CustomCheck(Player player, int level)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Skill(Player player, int level)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Update(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.TICK)
|
||||
return;
|
||||
|
||||
_tick = !_tick;
|
||||
|
||||
if (_tick)
|
||||
return;
|
||||
|
||||
for (Player cur : GetUsers())
|
||||
{
|
||||
if (!cur.isBlocking())
|
||||
continue;
|
||||
|
||||
//Level
|
||||
int level = getLevel(cur);
|
||||
if (level == 0)
|
||||
continue;
|
||||
//Water
|
||||
if (cur.getLocation().getBlock().isLiquid())
|
||||
{
|
||||
UtilPlayer.message(cur, F.main("Skill", "You cannot use " + F.skill(GetName()) + " in liquids."));
|
||||
continue;
|
||||
}
|
||||
|
||||
//Use Charge
|
||||
if (!UseCharge(cur))
|
||||
continue;
|
||||
|
||||
//Use Energy
|
||||
Factory.Energy().Use(cur, GetName(), 3 - (0.2 * level), true, false);
|
||||
|
||||
Arrow arrow = cur.getWorld().spawnArrow(cur.getEyeLocation().add(cur.getLocation().getDirection()),
|
||||
cur.getLocation().getDirection(), 1.6f + (level * 0.4f), 2);
|
||||
arrow.setShooter(cur);
|
||||
_arrows.add(arrow);
|
||||
|
||||
//Set Fired
|
||||
_fired.put(cur, System.currentTimeMillis());
|
||||
|
||||
//Sound
|
||||
cur.getWorld().playSound(cur.getLocation(), Sound.SPIDER_IDLE, 0.8f, 2f);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
public void Damage(CustomDamageEvent event)
|
||||
{
|
||||
if (event.GetCause() != DamageCause.PROJECTILE)
|
||||
return;
|
||||
|
||||
Projectile projectile = event.GetProjectile();
|
||||
if (projectile == null) return;
|
||||
|
||||
if (!_arrows.remove(projectile))
|
||||
return;
|
||||
|
||||
Player damager = event.GetDamagerPlayer(true);
|
||||
if (damager == null) return;
|
||||
|
||||
LivingEntity damagee = event.GetDamageeEntity();
|
||||
if (damagee == null) return;
|
||||
|
||||
event.SetCancelled(GetName());
|
||||
|
||||
//Damage Event
|
||||
Factory.Damage().NewDamageEvent(damagee, damager, null,
|
||||
DamageCause.THORNS, 2, true, true, false,
|
||||
damager.getName(), GetName());
|
||||
|
||||
Factory.Condition().Factory().Poison(GetName(), damagee, damager, 2, 0, false, true);
|
||||
}
|
||||
|
||||
public boolean UseCharge(Player player)
|
||||
{
|
||||
if (!_stored.containsKey(player))
|
||||
return false;
|
||||
|
||||
int charges = _stored.get(player);
|
||||
|
||||
if (charges <= 0)
|
||||
return false;
|
||||
|
||||
_stored.put(player, charges-1);
|
||||
player.setLevel(charges-1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Recharge(UpdateEvent event)
|
||||
{
|
||||
for (Player cur : GetUsers())
|
||||
if (!_stored.containsKey(cur))
|
||||
{
|
||||
_stored.put(cur, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Dont recharge while firing
|
||||
if (_fired.containsKey(cur))
|
||||
if (!UtilTime.elapsed(_fired.get(cur), 1000 - (getLevel(cur) * 50)))
|
||||
continue;
|
||||
|
||||
int charges = _stored.get(cur);
|
||||
|
||||
if (charges >= 3 + (1 * getLevel(cur)))
|
||||
continue;
|
||||
|
||||
if (!Recharge.Instance.use(cur, GetName() + " Recharge", 100 - (getLevel(cur) * 10), false))
|
||||
continue;
|
||||
|
||||
charges += 1;
|
||||
|
||||
_stored.put(cur, charges);
|
||||
|
||||
cur.setLevel(charges);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Clean(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.SEC)
|
||||
return;
|
||||
|
||||
for (Iterator<Arrow> arrowIterator = _arrows.iterator(); arrowIterator.hasNext();)
|
||||
{
|
||||
Arrow arrow = arrowIterator.next();
|
||||
|
||||
if (arrow.isDead() || !arrow.isValid() || arrow.getTicksLived() > 300)
|
||||
{
|
||||
arrowIterator.remove();
|
||||
arrow.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Reset(Player player)
|
||||
{
|
||||
_stored.remove(player);
|
||||
_fired.remove(player);
|
||||
}
|
||||
}
|
@ -1,211 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Spider;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Arrow;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Projectile;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
public class Needler extends SkillActive
|
||||
{
|
||||
private HashMap<Player, Integer> _stored = new HashMap<Player, Integer>();
|
||||
private HashMap<Player, Long> _fired = new HashMap<Player, Long>();
|
||||
|
||||
private HashSet<Arrow> _arrows = new HashSet<Arrow>();
|
||||
|
||||
private boolean _tick = false;
|
||||
|
||||
public Needler(SkillFactory skills, String name, ClassType classType, SkillType skillType,
|
||||
int cost, int levels,
|
||||
int energy, int energyMod,
|
||||
long recharge, long rechargeMod, boolean rechargeInform,
|
||||
Material[] itemArray,
|
||||
Action[] actionArray)
|
||||
{
|
||||
super(skills, name, classType, skillType,
|
||||
cost, levels,
|
||||
energy, energyMod,
|
||||
recharge, rechargeMod, rechargeInform,
|
||||
itemArray,
|
||||
actionArray);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean CustomCheck(Player player, int level)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Skill(Player player, int level)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Update(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.TICK)
|
||||
return;
|
||||
|
||||
_tick = !_tick;
|
||||
|
||||
if (_tick)
|
||||
return;
|
||||
|
||||
for (Player cur : GetUsers())
|
||||
{
|
||||
if (!cur.isBlocking())
|
||||
continue;
|
||||
|
||||
//Level
|
||||
int level = GetLevel(cur);
|
||||
if (level == 0)
|
||||
continue;
|
||||
//Water
|
||||
if (cur.getLocation().getBlock().isLiquid())
|
||||
{
|
||||
UtilPlayer.message(cur, F.main("Skill", "You cannot use " + F.skill(GetName()) + " in liquids."));
|
||||
continue;
|
||||
}
|
||||
|
||||
//Use Charge
|
||||
if (!UseCharge(cur))
|
||||
continue;
|
||||
|
||||
//Use Energy
|
||||
Factory.Energy().use(cur, GetName(), 3 - (0.2 * level), true, false);
|
||||
|
||||
Arrow arrow = cur.getWorld().spawnArrow(cur.getEyeLocation().add(cur.getLocation().getDirection()),
|
||||
cur.getLocation().getDirection(), 1.6f + (level * 0.4f), 2);
|
||||
arrow.setShooter(cur);
|
||||
_arrows.add(arrow);
|
||||
|
||||
//Set Fired
|
||||
_fired.put(cur, System.currentTimeMillis());
|
||||
|
||||
//Sound
|
||||
cur.getWorld().playSound(cur.getLocation(), Sound.SPIDER_IDLE, 0.8f, 2f);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
public void Damage(CustomDamageEvent event)
|
||||
{
|
||||
if (event.GetCause() != DamageCause.PROJECTILE)
|
||||
return;
|
||||
|
||||
Projectile projectile = event.GetProjectile();
|
||||
if (projectile == null) return;
|
||||
|
||||
if (!_arrows.remove(projectile))
|
||||
return;
|
||||
|
||||
Player damager = event.GetDamagerPlayer(true);
|
||||
if (damager == null) return;
|
||||
|
||||
LivingEntity damagee = event.GetDamageeEntity();
|
||||
if (damagee == null) return;
|
||||
|
||||
event.SetCancelled(GetName());
|
||||
|
||||
//Damage Event
|
||||
Factory.Damage().NewDamageEvent(damagee, damager, null,
|
||||
DamageCause.THORNS, 2, true, true, false,
|
||||
damager.getName(), GetName());
|
||||
|
||||
Factory.Condition().Factory().Poison(GetName(), damagee, damager, 2, 0, false, true);
|
||||
}
|
||||
|
||||
public boolean UseCharge(Player player)
|
||||
{
|
||||
if (!_stored.containsKey(player))
|
||||
return false;
|
||||
|
||||
int charges = _stored.get(player);
|
||||
|
||||
if (charges <= 0)
|
||||
return false;
|
||||
|
||||
_stored.put(player, charges-1);
|
||||
player.setLevel(charges-1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Recharge(UpdateEvent event)
|
||||
{
|
||||
for (Player cur : GetUsers())
|
||||
if (!_stored.containsKey(cur))
|
||||
{
|
||||
_stored.put(cur, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Dont recharge while firing
|
||||
if (_fired.containsKey(cur))
|
||||
if (!UtilTime.elapsed(_fired.get(cur), 1000 - (GetLevel(cur) * 50)))
|
||||
continue;
|
||||
|
||||
int charges = _stored.get(cur);
|
||||
|
||||
if (charges >= 3 + (1 * GetLevel(cur)))
|
||||
continue;
|
||||
|
||||
if (!Recharge.Instance.use(cur, GetName() + " Recharge", 100 - (GetLevel(cur) * 10), false))
|
||||
continue;
|
||||
|
||||
charges += 1;
|
||||
|
||||
_stored.put(cur, charges);
|
||||
|
||||
cur.setLevel(charges);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Clean(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.SEC)
|
||||
return;
|
||||
|
||||
for (Iterator<Arrow> arrowIterator = _arrows.iterator(); arrowIterator.hasNext();)
|
||||
{
|
||||
Arrow arrow = arrowIterator.next();
|
||||
|
||||
if (arrow.isDead() || !arrow.isValid() || arrow.getTicksLived() > 300)
|
||||
{
|
||||
arrowIterator.remove();
|
||||
arrow.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Reset(Player player)
|
||||
{
|
||||
_stored.remove(player);
|
||||
_fired.remove(player);
|
||||
}
|
||||
}
|
@ -1,89 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Spider;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
public class Pounce extends SkillActive
|
||||
{
|
||||
public Pounce(SkillFactory skills, String name, ClassType classType, SkillType skillType,
|
||||
int cost, int levels,
|
||||
int energy, int energyMod,
|
||||
long recharge, long rechargeMod, boolean rechargeInform,
|
||||
Material[] itemArray,
|
||||
Action[] actionArray)
|
||||
{
|
||||
super(skills, name, classType, skillType,
|
||||
cost, levels,
|
||||
energy, energyMod,
|
||||
recharge, rechargeMod, rechargeInform,
|
||||
itemArray,
|
||||
actionArray);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean CustomCheck(Player player, int level)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
public void EndDamager(CustomDamageEvent event)
|
||||
{
|
||||
if (event.IsCancelled())
|
||||
return;
|
||||
|
||||
if (event.GetCause() != DamageCause.ENTITY_ATTACK)
|
||||
return;
|
||||
|
||||
Player damager = event.GetDamagerPlayer(true);
|
||||
if (damager == null) return;
|
||||
|
||||
int level = getLevel(damager);
|
||||
if (level == 0) return;
|
||||
|
||||
event.SetCancelled(GetName());
|
||||
|
||||
Skill(damager, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Skill(Player player, int level)
|
||||
{
|
||||
if (player.getLocation().getBlock().isLiquid())
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Skill", "You cannot use " + F.skill(GetName()) + " in liquids."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (UtilTime.elapsed(Factory.Movement().Get(player).LastGrounded, 1000))
|
||||
{
|
||||
UtilPlayer.message(player, F.main(GetClassType().name(), "You cannot use " + F.skill(GetName()) + " while airborne."));
|
||||
}
|
||||
|
||||
//Action
|
||||
UtilAction.velocity(player, 0.7 + (0.1 * level), 0.2, 0.8, true);
|
||||
|
||||
//Effect
|
||||
player.getWorld().playSound(player.getLocation(), Sound.SPIDER_DEATH, 0.5f, 2f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Reset(Player player)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -1,66 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Spider;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.FormBase;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
||||
public class SpiderForm extends FormBase
|
||||
{
|
||||
public SpiderForm(SkillFactory skills, String name, ClassType classType,
|
||||
SkillType skillType, int cost, int levels)
|
||||
{
|
||||
super(skills, name, classType, skillType, cost, levels,
|
||||
EntityType.SPIDER, new String[]
|
||||
{
|
||||
"Venomous Spines",
|
||||
"Spin Web",
|
||||
"Pounce"
|
||||
});
|
||||
|
||||
SetDesc(new String[]
|
||||
{
|
||||
ChatColor.WHITE + "Passives:",
|
||||
"* Slow II",
|
||||
"",
|
||||
"",
|
||||
ChatColor.WHITE + "Attack: " + ChatColor.GREEN + "Pounce",
|
||||
"Pounce with 0.7 + 0.1pL Velocity",
|
||||
"",
|
||||
"",
|
||||
ChatColor.WHITE + "Sword Skill: " + ChatColor.GREEN + "Needler",
|
||||
"Spit out a flurry of needles;",
|
||||
"* Capacity of 3 + 1pL",
|
||||
"",
|
||||
"",
|
||||
ChatColor.WHITE + "Axe Skill: " + ChatColor.GREEN + "Spin Web",
|
||||
"Spin a temporary web;",
|
||||
"* Lasts 5 + 1pL seconds"
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void UnapplyMorph(Player player)
|
||||
{
|
||||
Factory.Condition().EndCondition(player, null, GetName());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Update(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.FAST)
|
||||
return;
|
||||
|
||||
for (Player cur : GetMorphedUsers())
|
||||
{
|
||||
Factory.Condition().Factory().Protection(GetName(), cur, cur, 1.9, 0, false, false);
|
||||
Factory.Condition().Factory().Slow(GetName(), cur, cur, 1.9, 0, false, false, false);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,110 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Spider;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
public class SpinWeb extends SkillActive
|
||||
{
|
||||
public SpinWeb(SkillFactory skills, String name, ClassType classType, SkillType skillType,
|
||||
int cost, int levels,
|
||||
int energy, int energyMod,
|
||||
long recharge, long rechargeMod, boolean rechargeInform,
|
||||
Material[] itemArray,
|
||||
Action[] actionArray)
|
||||
{
|
||||
super(skills, name, classType, skillType,
|
||||
cost, levels,
|
||||
energy, energyMod,
|
||||
recharge, rechargeMod, rechargeInform,
|
||||
itemArray,
|
||||
actionArray);
|
||||
}
|
||||
|
||||
@Override
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
public void Interact(PlayerInteractEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
|
||||
//Check Block
|
||||
if (UtilBlock.usable(event.getClickedBlock()))
|
||||
return;
|
||||
|
||||
//Check Action
|
||||
if (!_actionSet.contains(event.getAction()))
|
||||
return;
|
||||
|
||||
//Check Material
|
||||
if (!_itemSet.contains(player.getItemInHand().getType()))
|
||||
return;
|
||||
|
||||
//Level
|
||||
int level = getLevel(player);
|
||||
if (level <= 0) return;
|
||||
|
||||
if (!CustomCheck(player, level))
|
||||
return;
|
||||
|
||||
//Unique Weapon
|
||||
if (player.getItemInHand().getEnchantments().containsKey(Enchantment.ARROW_DAMAGE))
|
||||
return;
|
||||
|
||||
//Block
|
||||
Block block = event.getClickedBlock();
|
||||
if (block == null) return;
|
||||
|
||||
block = block.getRelative(event.getBlockFace());
|
||||
|
||||
//Check Energy
|
||||
if (!Factory.Energy().Use(player, GetName(), 20 - (level * 2), true, true))
|
||||
return;
|
||||
|
||||
//Block
|
||||
Factory.BlockRestore().Add(block, 30, (byte)0, 5000 + (1000 * level));
|
||||
|
||||
//Effect
|
||||
block.getWorld().playEffect(block.getLocation(), Effect.STEP_SOUND, 30);
|
||||
|
||||
//Sound
|
||||
player.getWorld().playSound(player.getLocation(), Sound.SPIDER_IDLE, 1f, 0.3f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean CustomCheck(Player player, int level)
|
||||
{
|
||||
if (player.getLocation().getBlock().getTypeId() == 8 || player.getLocation().getBlock().getTypeId() == 9)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Skill", "You cannot use " + F.skill(GetName()) + " in water."));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Skill(Player player, int level)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Reset(Player player)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -1,119 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Squid;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
public class Construction extends SkillActive
|
||||
{
|
||||
public Construction(SkillFactory skills, String name, ClassType classType, SkillType skillType,
|
||||
int cost, int levels,
|
||||
int energy, int energyMod,
|
||||
long recharge, long rechargeMod, boolean rechargeInform,
|
||||
Material[] itemArray,
|
||||
Action[] actionArray)
|
||||
{
|
||||
super(skills, name, classType, skillType,
|
||||
cost, levels,
|
||||
energy, energyMod,
|
||||
recharge, rechargeMod, rechargeInform,
|
||||
itemArray,
|
||||
actionArray);
|
||||
}
|
||||
|
||||
@Override
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
public void Interact(PlayerInteractEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
|
||||
//Check Block
|
||||
if (UtilBlock.usable(event.getClickedBlock()))
|
||||
return;
|
||||
|
||||
//Check Action
|
||||
if (!_actionSet.contains(event.getAction()))
|
||||
return;
|
||||
|
||||
//Check Material
|
||||
if (!_itemSet.contains(player.getItemInHand().getType()))
|
||||
return;
|
||||
|
||||
//Level
|
||||
int level = getLevel(player);
|
||||
if (level <= 0) return;
|
||||
|
||||
if (!CustomCheck(player, level))
|
||||
return;
|
||||
|
||||
//Unique Weapon
|
||||
if (player.getItemInHand().getEnchantments().containsKey(Enchantment.ARROW_DAMAGE))
|
||||
return;
|
||||
|
||||
//Block
|
||||
Block block = event.getClickedBlock();
|
||||
if (block == null) return;
|
||||
|
||||
if (event.getAction() == Action.RIGHT_CLICK_BLOCK)
|
||||
block = block.getRelative(event.getBlockFace());
|
||||
|
||||
if (block.getTypeId() != 8 && block.getTypeId() != 9 && event.getAction() == Action.RIGHT_CLICK_BLOCK)
|
||||
return;
|
||||
|
||||
if (block.getTypeId() != 79 && event.getAction() == Action.LEFT_CLICK_BLOCK)
|
||||
return;
|
||||
|
||||
//Check Energy
|
||||
if (!Factory.Energy().Use(player, GetName(), 12 - (level * 2), true, true))
|
||||
return;
|
||||
|
||||
//Block
|
||||
if (block.getTypeId() == 79)
|
||||
{
|
||||
block.setTypeId(8);
|
||||
|
||||
//Sound
|
||||
player.getWorld().playSound(player.getLocation(), Sound.SPLASH, 0.5f, 0.5f);
|
||||
}
|
||||
else
|
||||
{
|
||||
block.setTypeId(79);
|
||||
|
||||
//Sound
|
||||
player.getWorld().playSound(player.getLocation(), Sound.ORB_PICKUP, 0.5f, 3f);
|
||||
}
|
||||
|
||||
//Effect
|
||||
block.getWorld().playEffect(block.getLocation(), Effect.STEP_SOUND, 80);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean CustomCheck(Player player, int level)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Skill(Player player, int level)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Reset(Player player)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -1,118 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Squid;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.block.Action;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
public class Propel extends SkillActive
|
||||
{
|
||||
private HashMap<Player, Long> _active = new HashMap<Player, Long>();
|
||||
|
||||
public Propel(SkillFactory skills, String name, ClassType classType, SkillType skillType,
|
||||
int cost, int levels,
|
||||
int energy, int energyMod,
|
||||
long recharge, long rechargeMod, boolean rechargeInform,
|
||||
Material[] itemArray,
|
||||
Action[] actionArray)
|
||||
{
|
||||
super(skills, name, classType, skillType,
|
||||
cost, levels,
|
||||
energy, energyMod,
|
||||
recharge, rechargeMod, rechargeInform,
|
||||
itemArray,
|
||||
actionArray);
|
||||
|
||||
SetDesc(new String[]
|
||||
{
|
||||
""
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean CustomCheck(Player player, int level)
|
||||
{
|
||||
if (!player.getLocation().getBlock().isLiquid())
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Skill", "You cannot use " + F.skill(GetName()) + " out of water."));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Skill(Player player, int level)
|
||||
{
|
||||
//Velocity
|
||||
UtilAction.velocity(player, 0.6 + (0.2 * level), 0.2, 2, false);
|
||||
|
||||
//Store
|
||||
_active.put(player, System.currentTimeMillis());
|
||||
|
||||
//Sound
|
||||
player.getWorld().playSound(player.getLocation(), Sound.SPLASH2, 1.5f, 1.5f);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Reuse(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.TICK)
|
||||
return;
|
||||
|
||||
for (Player cur : GetUsers())
|
||||
{
|
||||
if (!_active.containsKey(cur))
|
||||
continue;
|
||||
|
||||
if (!cur.isBlocking())
|
||||
{
|
||||
_active.remove(cur);
|
||||
continue;
|
||||
}
|
||||
|
||||
//Level
|
||||
int level = getLevel(cur);
|
||||
if (level == 0)
|
||||
{
|
||||
_active.remove(cur);
|
||||
continue;
|
||||
}
|
||||
|
||||
//Time
|
||||
if (!UtilTime.elapsed(_active.get(cur), 400))
|
||||
continue;
|
||||
|
||||
if (!cur.getLocation().getBlock().isLiquid())
|
||||
continue;
|
||||
|
||||
//Thrust
|
||||
UtilAction.velocity(cur, 0.3 + (0.1 * level), 0.1, 2, false);
|
||||
|
||||
//Store
|
||||
_active.put(cur, System.currentTimeMillis());
|
||||
|
||||
//Sound
|
||||
cur.getWorld().playSound(cur.getLocation(), Sound.SPLASH2, 0.5f, 1f);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Reset(Player player)
|
||||
{
|
||||
_active.remove(player);
|
||||
}
|
||||
}
|
@ -1,115 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Squid;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.FormBase;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class SquidForm extends FormBase
|
||||
{
|
||||
public SquidForm(SkillFactory skills, String name, ClassType classType,
|
||||
SkillType skillType, int cost, int levels)
|
||||
{
|
||||
super(skills, name, classType, skillType, cost, levels,
|
||||
EntityType.SQUID, new String[]
|
||||
{
|
||||
"Propel",
|
||||
"Ice Construction"
|
||||
});
|
||||
|
||||
SetDesc(new String[]
|
||||
{
|
||||
ChatColor.WHITE + "Passives:",
|
||||
"* Unlimited Air",
|
||||
"* Protection II",
|
||||
"",
|
||||
"",
|
||||
ChatColor.WHITE + "Attack: " + ChatColor.GREEN + "Suffocate",
|
||||
"* Target has 1.5 second of air removed",
|
||||
"* Target is pushed downward slightly",
|
||||
"",
|
||||
"",
|
||||
ChatColor.WHITE + "Sword Skill: " + ChatColor.GREEN + "Swim",
|
||||
"Push Block to thrust forwards;",
|
||||
"* Velocity of 0.6 + 0.2pL",
|
||||
"",
|
||||
"Hold Block to swim;",
|
||||
"* Velocity of 0.3 + 0.1pL",
|
||||
"",
|
||||
"",
|
||||
ChatColor.WHITE + "Axe Skill: " + ChatColor.GREEN + "Ice Construction",
|
||||
"Right-Click to freeze water",
|
||||
"Left-Click to melt ice"
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void Unmorph(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.TICK)
|
||||
return;
|
||||
|
||||
for (Player cur : UtilServer.getPlayers())
|
||||
{
|
||||
if (!IsMorphed(cur))
|
||||
continue;
|
||||
|
||||
if (UtilEnt.isGrounded(cur) && !cur.getLocation().getBlock().isLiquid())
|
||||
Unmorph(cur);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void UnapplyMorph(Player player)
|
||||
{
|
||||
Factory.Condition().EndCondition(player, null, GetName());
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void Attack(CustomDamageEvent event)
|
||||
{
|
||||
if (event.IsCancelled())
|
||||
return;
|
||||
|
||||
if (event.GetCause() != DamageCause.ENTITY_ATTACK)
|
||||
return;
|
||||
|
||||
Player damager = event.GetDamagerPlayer(false);
|
||||
if (damager == null) return;
|
||||
|
||||
if (!IsMorphed(damager))
|
||||
return;
|
||||
|
||||
event.SetKnockback(false);
|
||||
|
||||
//Attack
|
||||
event.GetDamageeEntity().setRemainingAir(Math.max(0, event.GetDamageeEntity().getRemainingAir() - 30));
|
||||
event.GetDamageeEntity().setVelocity(new Vector(0, -0.5, 0));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Update(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.FAST)
|
||||
return;
|
||||
|
||||
for (Player cur : GetMorphedUsers())
|
||||
{
|
||||
cur.setRemainingAir(cur.getMaximumAir());
|
||||
Factory.Condition().Factory().Protection(GetName(), cur, cur, 1.9, 1, false, false);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Wolf;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.FormBase;
|
||||
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
||||
public class WolfForm extends FormBase
|
||||
{
|
||||
public WolfForm(SkillFactory skills, String name, ClassType classType,
|
||||
SkillType skillType, int cost, int levels)
|
||||
{
|
||||
super(skills, name, classType, skillType, cost, levels,
|
||||
EntityType.WOLF, new String[]
|
||||
{
|
||||
//skills.GetSkill("Magnetic Pull"),
|
||||
//skills.GetSkill("Magnetic Repel")
|
||||
});
|
||||
|
||||
SetDesc(new String[]
|
||||
{
|
||||
"Dire Wolf Form (Harass / Ganking);",
|
||||
"* Speed I",
|
||||
"* Protection I",
|
||||
"* Regeneration I",
|
||||
"",
|
||||
"",
|
||||
"Axe Skill: Howl",
|
||||
"Nearby allies receive;",
|
||||
"* Speed III for 3 + 1pL seconds",
|
||||
"",
|
||||
"",
|
||||
"Sword Skill: Bite",
|
||||
"Hold Block to bite target;",
|
||||
"* Slow IV for 2 seconds",
|
||||
"* You are pulled along with target"
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void UnapplyMorph(Player player)
|
||||
{
|
||||
Factory.Condition().EndCondition(player, null, GetName());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Update(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.FAST)
|
||||
return;
|
||||
|
||||
for (Player cur : GetMorphedUsers())
|
||||
{
|
||||
Factory.Condition().Factory().Protection(GetName(), cur, cur, 1.9, 0, false, false);
|
||||
Factory.Condition().Factory().Speed(GetName(), cur, cur, 1.9, 0, false, false);
|
||||
Factory.Condition().Factory().Regen(GetName(), cur, cur, 1.9, 0, false, false);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,146 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Shifter;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
import mineplex.minecraft.game.classcombat.Skill.event.SkillTriggerEvent;
|
||||
|
||||
public class Polysmash extends SkillActive
|
||||
{
|
||||
private HashSet<Player> _used = new HashSet<Player>();
|
||||
|
||||
public Polysmash(SkillFactory skills, String name, ClassType classType, SkillType skillType,
|
||||
int cost, int levels,
|
||||
int energy, int energyMod,
|
||||
long recharge, long rechargeMod, boolean rechargeInform,
|
||||
Material[] itemArray,
|
||||
Action[] actionArray)
|
||||
{
|
||||
super(skills, name, classType, skillType,
|
||||
cost, levels,
|
||||
energy, energyMod,
|
||||
recharge, rechargeMod, rechargeInform,
|
||||
itemArray,
|
||||
actionArray);
|
||||
|
||||
SetDesc(new String[]
|
||||
{
|
||||
"Turn target enemy into a sheep",
|
||||
"for 6 seconds. While in sheep form,",
|
||||
"players have Slow and Silence."
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean CustomCheck(Player player, int level)
|
||||
{
|
||||
if (_used.contains(player))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Skill(Player player, int level)
|
||||
{
|
||||
//Inform
|
||||
UtilPlayer.message(player, F.main(GetClassType().name(), "You missed " + F.skill(GetName()) + "."));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Miss(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.TICK)
|
||||
return;
|
||||
|
||||
_used.clear();
|
||||
}
|
||||
|
||||
public boolean CanUse(Player player)
|
||||
{
|
||||
int level = getLevel(player);
|
||||
if (level == 0)
|
||||
return false;
|
||||
|
||||
//Check Material
|
||||
if (!_itemSet.contains(player.getItemInHand().getType()))
|
||||
return false;
|
||||
|
||||
//Check Allowed
|
||||
SkillTriggerEvent trigger = new SkillTriggerEvent(player, GetName(), GetClassType());
|
||||
UtilServer.getServer().getPluginManager().callEvent(trigger);
|
||||
if (trigger.IsCancelled())
|
||||
return false;
|
||||
|
||||
//Check Energy/Recharge
|
||||
if (!EnergyRechargeCheck(player, level))
|
||||
return false;
|
||||
|
||||
//Allow
|
||||
return true;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Hit(PlayerInteractEntityEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
|
||||
//Level
|
||||
int level = getLevel(player);
|
||||
if (level == 0) return;
|
||||
|
||||
if (!CanUse(player))
|
||||
return;
|
||||
|
||||
if (event.getRightClicked() == null)
|
||||
return;
|
||||
|
||||
if (!(event.getRightClicked() instanceof LivingEntity))
|
||||
return;
|
||||
|
||||
LivingEntity ent = (LivingEntity)event.getRightClicked();
|
||||
|
||||
if (UtilMath.offset(player, ent) > 3)
|
||||
{
|
||||
UtilPlayer.message(player, F.main(GetClassType().name(), "You missed " + F.skill(GetName()) + "."));
|
||||
return;
|
||||
}
|
||||
|
||||
//Set Used
|
||||
_used.add(player);
|
||||
|
||||
//Condition
|
||||
Factory.Condition().Factory().Slow(GetName(), ent, player, 5, 0, false, true, false, false);
|
||||
Factory.Condition().Factory().Silence(GetName(), ent, player, 5, false, true);
|
||||
|
||||
//Effect
|
||||
ent.getWorld().playSound(ent.getLocation(), Sound.SHEEP_IDLE, 2f, 1f);
|
||||
ent.getWorld().playSound(ent.getLocation(), Sound.SHEEP_IDLE, 2f, 1f);
|
||||
|
||||
//Inform
|
||||
UtilPlayer.message(player, F.main(GetClassType().name(), "You used " + F.skill(GetName()) + "."));
|
||||
UtilPlayer.message(ent, F.main(GetClassType().name(), F.name(player.getName()) + " hit you with " + F.skill(GetName(level)) + "."));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Reset(Player player)
|
||||
{
|
||||
_used.remove(player);
|
||||
}
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Shifter;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.inventory.PlayerInventory;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Skill;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
public class Shifter extends Skill
|
||||
{
|
||||
public Shifter(SkillFactory skills, String name, ClassType classType, SkillType skillType, int cost, int levels)
|
||||
{
|
||||
super(skills, name, classType, skillType, cost, levels);
|
||||
|
||||
SetDesc(new String[]
|
||||
{
|
||||
"Permanent Protection II."
|
||||
});
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Update(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() == UpdateType.FAST)
|
||||
for (Player cur : GetUsers())
|
||||
Factory.Condition().Factory().Protection(GetName(), cur, cur, 1.9, 1, false, false, false);
|
||||
|
||||
if (event.getType() == UpdateType.SLOWER)
|
||||
for (Player cur : GetUsers())
|
||||
{
|
||||
PlayerInventory inv = cur.getInventory();
|
||||
|
||||
if (inv.getHelmet() != null && inv.getHelmet().getDurability() > 0)
|
||||
inv.getHelmet().setDurability((short) (inv.getHelmet().getDurability()-1));
|
||||
|
||||
if (inv.getChestplate() != null && inv.getChestplate().getDurability() > 0)
|
||||
inv.getChestplate().setDurability((short) (inv.getChestplate().getDurability()-1));
|
||||
|
||||
if (inv.getLeggings() != null && inv.getLeggings().getDurability() > 0)
|
||||
inv.getLeggings().setDurability((short) (inv.getLeggings().getDurability()-1));
|
||||
|
||||
if (inv.getBoots() != null && inv.getBoots().getDurability() > 0)
|
||||
inv.getBoots().setDurability((short) (inv.getBoots().getDurability()-1));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Reset(Player player)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -1,170 +0,0 @@
|
||||
package mineplex.minecraft.game.classcombat.Skill.Shifter;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.block.Action;
|
||||
|
||||
import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillActive;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
|
||||
public class TreeShift extends SkillActive
|
||||
{
|
||||
private HashMap<Location, Long> trees = new HashMap<Location, Long>();
|
||||
|
||||
public TreeShift(SkillFactory skills, String name, ClassType classType, SkillType skillType,
|
||||
int cost, int levels,
|
||||
int energy, int energyMod,
|
||||
long recharge, long rechargeMod, boolean rechargeInform,
|
||||
Material[] itemArray,
|
||||
Action[] actionArray)
|
||||
{
|
||||
super(skills, name, classType, skillType,
|
||||
cost, levels,
|
||||
energy, energyMod,
|
||||
recharge, rechargeMod, rechargeInform,
|
||||
itemArray,
|
||||
actionArray);
|
||||
|
||||
SetDesc(new String[]
|
||||
{
|
||||
"Creates an illusionary tree at target location.",
|
||||
"Other players cannot attack or see through it.",
|
||||
"You view it as a sapling, and can attack over it.",
|
||||
"Lasts 2 + 2pL seconds."
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean CustomCheck(Player player, int level)
|
||||
{
|
||||
if (player.getLocation().getBlock().getTypeId() == 8 || player.getLocation().getBlock().getTypeId() == 9)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Skill", "You cannot use " + F.skill(GetName()) + " in water."));
|
||||
return false;
|
||||
}
|
||||
|
||||
Block block = player.getTargetBlock(null, 0);
|
||||
if (UtilMath.offset(block.getLocation().add(0.5, 0.5, 0.5), player.getLocation()) > 8 + level)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Skill", "You cannot use " + F.skill(GetName()) + " so far away."));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Skill(Player player, int level)
|
||||
{
|
||||
HashMap<Location, Material> tree = new HashMap<Location, Material>();
|
||||
|
||||
Block block = player.getTargetBlock(null, 0);
|
||||
|
||||
//Show to Player
|
||||
final Player fPlayer = player;
|
||||
final Location fLoc = block.getLocation().add(0, 1, 0);
|
||||
UtilServer.getServer().getScheduler().scheduleSyncDelayedTask(Factory.GetPlugin(), new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
fPlayer.sendBlockChange(fLoc, 6, (byte)0);
|
||||
}
|
||||
}, 0);
|
||||
|
||||
|
||||
|
||||
//Generate Tree
|
||||
for (int i=0 ; i<6 ; i++)
|
||||
{
|
||||
block = block.getRelative(BlockFace.UP);
|
||||
|
||||
if (block.getTypeId() != 0)
|
||||
{
|
||||
block = block.getRelative(BlockFace.DOWN);
|
||||
break;
|
||||
}
|
||||
|
||||
tree.put(block.getLocation(), Material.LOG);
|
||||
}
|
||||
|
||||
if (tree.size() > 5)
|
||||
{
|
||||
for (Block leaf : UtilBlock.getInRadius(block.getLocation(), 2.5d).keySet())
|
||||
{
|
||||
if (!tree.containsKey(leaf.getLocation()) && leaf.getTypeId() == 0)
|
||||
{
|
||||
tree.put(leaf.getLocation(), Material.LEAVES);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Show Tree
|
||||
for (Location loc : tree.keySet())
|
||||
{
|
||||
trees.put(loc, System.currentTimeMillis() + (2000 + (2000 * level)));
|
||||
|
||||
for (Player other : player.getWorld().getPlayers())
|
||||
{
|
||||
if (other.equals(player))
|
||||
continue;
|
||||
|
||||
other.sendBlockChange(loc, tree.get(loc), (byte)0);
|
||||
|
||||
if (tree.get(loc) == Material.LOG)
|
||||
other.playEffect(loc, Effect.STEP_SOUND, 17);
|
||||
}
|
||||
}
|
||||
|
||||
//Inform
|
||||
UtilPlayer.message(player, F.main(GetClassType().name(), "You used " + F.skill(GetName(level)) + "."));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void Detree(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.FAST)
|
||||
return;
|
||||
|
||||
if (trees.isEmpty())
|
||||
return;
|
||||
|
||||
HashSet<Location> remove = new HashSet<Location>();
|
||||
|
||||
for (Location loc : trees.keySet())
|
||||
{
|
||||
if (System.currentTimeMillis() > trees.get(loc))
|
||||
remove.add(loc);
|
||||
}
|
||||
|
||||
for (Location loc : remove)
|
||||
{
|
||||
for (Player player : loc.getWorld().getPlayers())
|
||||
player.sendBlockChange(loc, 0, (byte)0);
|
||||
|
||||
trees.remove(loc);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Reset(Player player)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -23,19 +23,6 @@ import mineplex.minecraft.game.classcombat.Skill.Knight.*;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Mage.*;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Mage.Void;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Ranger.*;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Shifter.*;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Chicken.ChickenForm;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Chicken.Flap;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Golem.GolemForm;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Golem.MagneticPull;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Golem.MagneticRepel;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Spider.Needler;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Spider.Pounce;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Spider.SpiderForm;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Spider.SpinWeb;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Squid.Construction;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Squid.Propel;
|
||||
import mineplex.minecraft.game.classcombat.Skill.Shifter.Forms.Squid.SquidForm;
|
||||
import mineplex.minecraft.game.classcombat.Skill.repository.SkillRepository;
|
||||
import mineplex.minecraft.game.classcombat.Skill.repository.token.SkillToken;
|
||||
import mineplex.minecraft.game.core.IRelation;
|
||||
@ -509,99 +496,6 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory
|
||||
//AddSkill(new Fletcher(this, "Fletcher", ClassType.Ranger, SkillType.PassiveB, 5, 3));
|
||||
}
|
||||
|
||||
public void AddShifter()
|
||||
{
|
||||
AddSkill(new Shifter(this, "Shifter Class", ClassType.Shifter, SkillType.Class, 0, 1));
|
||||
|
||||
//Axe
|
||||
AddSkill(new TreeShift(this, "Tree Shift", ClassType.Shifter, SkillType.Axe,
|
||||
0, 1,
|
||||
40, 0,
|
||||
4000, 0, true,
|
||||
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
|
||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||
|
||||
//Sword
|
||||
AddSkill(new Polysmash(this, "Polysmash", ClassType.Shifter, SkillType.Sword,
|
||||
0, 1,
|
||||
30, 0,
|
||||
16000, 0, true,
|
||||
new Material[] {Material.IRON_SWORD, Material.GOLD_SWORD, Material.DIAMOND_SWORD},
|
||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||
|
||||
//CHICKEN=========================================================================================
|
||||
AddSkill(new ChickenForm(this, "Chicken Form", ClassType.Shifter, SkillType.PassiveB, 0, 5));
|
||||
|
||||
AddSkill(new Flap(this, "Flap", ClassType.Shifter, SkillType.Sword,
|
||||
0, 1,
|
||||
5, 0,
|
||||
0, 0, true,
|
||||
new Material[] {Material.IRON_SWORD, Material.GOLD_SWORD, Material.DIAMOND_SWORD},
|
||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||
|
||||
|
||||
|
||||
//SQUID=========================================================================================
|
||||
AddSkill(new SquidForm(this, "Squid Form", ClassType.Shifter, SkillType.PassiveB, 0, 5));
|
||||
|
||||
AddSkill(new Propel(this, "Propel", ClassType.Shifter, SkillType.Sword,
|
||||
0, 1,
|
||||
12, 0,
|
||||
250, 0, false,
|
||||
new Material[] {Material.IRON_SWORD, Material.GOLD_SWORD, Material.DIAMOND_SWORD},
|
||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||
|
||||
AddSkill(new Construction(this, "Ice Construction", ClassType.Shifter, SkillType.Axe,
|
||||
0, 1,
|
||||
8, 0,
|
||||
0, 0, true,
|
||||
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
|
||||
new Action[] {Action.LEFT_CLICK_BLOCK, Action.RIGHT_CLICK_BLOCK}));
|
||||
|
||||
|
||||
//GOLEM=========================================================================================
|
||||
AddSkill(new GolemForm(this, "Magnetic Golem Form", ClassType.Shifter, SkillType.PassiveA, 0, 5));
|
||||
|
||||
AddSkill(new MagneticPull(this, "Magnetic Pull", ClassType.Shifter, SkillType.Sword,
|
||||
0, 1,
|
||||
0, 0,
|
||||
0, 0, true,
|
||||
new Material[] {Material.IRON_SWORD, Material.GOLD_SWORD, Material.DIAMOND_SWORD},
|
||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||
|
||||
AddSkill(new MagneticRepel(this, "Magnetic Repel", ClassType.Shifter, SkillType.Axe,
|
||||
0, 1,
|
||||
60, 0,
|
||||
30000, -3000, true,
|
||||
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
|
||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||
|
||||
|
||||
//SPIDER=========================================================================================
|
||||
AddSkill(new SpiderForm(this, "Spitting Spider Form", ClassType.Shifter, SkillType.PassiveA, 0, 5));
|
||||
|
||||
AddSkill(new Needler(this, "Needler", ClassType.Shifter, SkillType.Sword,
|
||||
0, 1,
|
||||
0, 0,
|
||||
0, 0, true,
|
||||
new Material[] {Material.IRON_SWORD, Material.GOLD_SWORD, Material.DIAMOND_SWORD},
|
||||
new Action[] {Action.RIGHT_CLICK_AIR, Action.RIGHT_CLICK_BLOCK}));
|
||||
|
||||
AddSkill(new SpinWeb(this, "Spin Web", ClassType.Shifter, SkillType.Axe,
|
||||
0, 1,
|
||||
20, -1,
|
||||
0, 0, true,
|
||||
new Material[] {Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
|
||||
new Action[] {Action.RIGHT_CLICK_BLOCK}));
|
||||
|
||||
AddSkill(new Pounce(this, "Pounce", ClassType.Shifter, SkillType.PassiveB,
|
||||
0, 1,
|
||||
20, 0,
|
||||
6000, 0, true,
|
||||
new Material[] {Material.IRON_SWORD, Material.GOLD_SWORD, Material.DIAMOND_SWORD, Material.IRON_AXE, Material.GOLD_AXE, Material.DIAMOND_AXE},
|
||||
new Action[] {Action.LEFT_CLICK_AIR, Action.LEFT_CLICK_BLOCK}));
|
||||
}
|
||||
|
||||
public ISkill GetSkillBySalesPackageId(int id)
|
||||
{
|
||||
return _skillSalesPackageMap.get(id);
|
||||
|
@ -56,7 +56,7 @@ public class CustomBuildPage extends ShopPageBase<ClassShopManager, ClassCombatS
|
||||
if (!Client.GetRank().Has(Rank.ULTRA) && !DonationManager.Get(Player.getName()).OwnsUnknownPackage("Competitive ULTRA"))
|
||||
{
|
||||
locked = true;
|
||||
lockedText = new String[] { "§rGet Ultra rank to access this slot" };
|
||||
lockedText = new String[] { "§rGet Ultra rank to access this slot" };
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
@ -65,7 +65,7 @@ public class CustomBuildPage extends ShopPageBase<ClassShopManager, ClassCombatS
|
||||
if (!Client.GetRank().Has(Rank.ULTRA) && !DonationManager.Get(Player.getName()).OwnsUnknownPackage("Competitive ULTRA"))
|
||||
{
|
||||
locked = true;
|
||||
lockedText = new String[] { "§rGet Ultra rank to access this slot" };
|
||||
lockedText = new String[] { "§rGet Ultra rank to access this slot" };
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -74,7 +74,7 @@ public class CustomBuildPage extends ShopPageBase<ClassShopManager, ClassCombatS
|
||||
if (!Client.GetRank().Has(Rank.ULTRA) && !DonationManager.Get(Player.getName()).OwnsUnknownPackage("Competitive ULTRA"))
|
||||
{
|
||||
locked = true;
|
||||
lockedText = new String[] { "§rGet Ultra rank to access this slot" };
|
||||
lockedText = new String[] { "§rGet Ultra rank to access this slot" };
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -105,13 +105,13 @@ public class CustomBuildPage extends ShopPageBase<ClassShopManager, ClassCombatS
|
||||
if (i != 0)
|
||||
{
|
||||
AddButton(slot + 18, new ShopItem(Material.ANVIL, "Edit Build", new String[] { }, 1, locked, true), new EditAndSaveCustomBuildButton(this, customBuild));
|
||||
AddButton(slot + 36, new ShopItem(Material.FIRE, "Delete Build", new String[] { "§rIt will never come back..."}, 1, locked, true), new DeleteCustomBuildButton(this, customBuild));
|
||||
AddButton(slot + 36, new ShopItem(Material.FIRE, "Delete Build", new String[] { "§rIt will never come back..."}, 1, locked, true), new DeleteCustomBuildButton(this, customBuild));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
getInventory().setItem(slot + 18, new ShopItem(Material.ANVIL, "Edit Build", new String[] { }, 1, locked, true).getHandle());
|
||||
getInventory().setItem(slot + 36, new ShopItem(Material.FIRE, "Delete Build", new String[] { "§rIt will never come back..."}, 1, locked, true).getHandle());
|
||||
getInventory().setItem(slot + 36, new ShopItem(Material.FIRE, "Delete Build", new String[] { "§rIt will never come back..."}, 1, locked, true).getHandle());
|
||||
}
|
||||
|
||||
slot += 2;
|
||||
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="Mineplex.Core" />
|
||||
<orderEntry type="module" module-name="Mineplex.Core.Common" />
|
||||
<orderEntry type="module" module-name="Nautilus.Core.CraftBukkit" />
|
||||
<orderEntry type="library" name="craftbukkit" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
16
Plugins/Mineplex.ServerMonitor/Mineplex.ServerMonitor.iml
Normal file
16
Plugins/Mineplex.ServerMonitor/Mineplex.ServerMonitor.iml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="gson" level="project" />
|
||||
<orderEntry type="library" name="httpclient" level="project" />
|
||||
<orderEntry type="library" name="httpcore" level="project" />
|
||||
<orderEntry type="module" module-name="Mineplex.Core.Common" />
|
||||
</component>
|
||||
</module>
|
||||
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
@ -0,0 +1,11 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="craftbukkit" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
@ -57,6 +57,7 @@ import org.bukkit.metadata.MetadataValue;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.messaging.StandardMessenger;
|
||||
import org.bukkit.scoreboard.Scoreboard;
|
||||
import org.bukkit.util.NumberConversions;
|
||||
|
||||
@DelegateDeserialization(CraftOfflinePlayer.class)
|
||||
public class CraftPlayer extends CraftHumanEntity implements Player
|
||||
@ -67,7 +68,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player
|
||||
private final ConversationTracker conversationTracker = new ConversationTracker();
|
||||
private final Set<String> channels = new HashSet<String>();
|
||||
private final Set<UUID> hiddenPlayers = new HashSet<UUID>();
|
||||
|
||||
|
||||
private int hash = 0;
|
||||
private double health = 20;
|
||||
private boolean scaledHealth = false;
|
||||
@ -84,7 +85,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player
|
||||
{
|
||||
return getHandle().getProfile();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isOp()
|
||||
{
|
||||
@ -353,7 +354,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player
|
||||
break;
|
||||
}
|
||||
getHandle().playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect("note." + instrumentName, loc
|
||||
.getBlockX(), loc.getBlockY(), loc.getBlockZ(), 3.0f, note));
|
||||
.getBlockX(), loc.getBlockY(), loc.getBlockZ(), 3.0f, note));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -480,7 +481,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player
|
||||
String[] astring = CraftSign.sanitizeLines(lines);
|
||||
|
||||
getHandle().playerConnection.sendPacket(new PacketPlayOutUpdateSign(loc.getBlockX(), loc.getBlockY(), loc
|
||||
.getBlockZ(), astring));
|
||||
.getBlockZ(), astring));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1113,9 +1114,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player
|
||||
}
|
||||
|
||||
getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(player.getPlayerListName(), true,
|
||||
getHandle().ping));
|
||||
getHandle().ping));
|
||||
}
|
||||
|
||||
|
||||
public void removeDisconnectingPlayer(Player player)
|
||||
{
|
||||
hiddenPlayers.remove(player.getUniqueId());
|
||||
@ -1239,7 +1240,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player
|
||||
public void abandonConversation(Conversation conversation)
|
||||
{
|
||||
conversationTracker.abandonConversation(conversation, new ConversationAbandonedEvent(conversation,
|
||||
new ManuallyAbandonedConversationCanceller()));
|
||||
new ManuallyAbandonedConversationCanceller()));
|
||||
}
|
||||
|
||||
public void abandonConversation(Conversation conversation, ConversationAbandonedEvent details)
|
||||
@ -1694,4 +1695,60 @@ public class CraftPlayer extends CraftHumanEntity implements Player
|
||||
return spigot;
|
||||
}
|
||||
// Spigot end
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public int _INVALID_getLastDamage()
|
||||
{
|
||||
return NumberConversions.ceil(getLastDamage());
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public void _INVALID_setLastDamage(int damage)
|
||||
{
|
||||
setLastDamage(damage);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public void _INVALID_damage(int amount)
|
||||
{
|
||||
damage(amount);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public void _INVALID_damage(int amount, org.bukkit.entity.Entity source)
|
||||
{
|
||||
damage(amount, source);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public int _INVALID_getHealth()
|
||||
{
|
||||
return NumberConversions.ceil(getHealth());
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public void _INVALID_setHealth(int health)
|
||||
{
|
||||
setHealth(health);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public int _INVALID_getMaxHealth()
|
||||
{
|
||||
return NumberConversions.ceil(getMaxHealth());
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public void _INVALID_setMaxHealth(int health)
|
||||
{
|
||||
setMaxHealth(health);
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
18
Plugins/Nautilus.Game.Arcade/Nautilus.Game.Arcade.iml
Normal file
18
Plugins/Nautilus.Game.Arcade/Nautilus.Game.Arcade.iml
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="Mineplex.Core" />
|
||||
<orderEntry type="module" module-name="Mineplex.Core.Common" />
|
||||
<orderEntry type="module" module-name="Mineplex.Minecraft.Game.Core" />
|
||||
<orderEntry type="module" module-name="Mineplex.Minecraft.Game.ClassCombat" />
|
||||
<orderEntry type="module" module-name="Nautilus.Core.CraftBukkit" />
|
||||
<orderEntry type="library" name="craftbukkit" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
@ -934,7 +934,7 @@ public abstract class Game implements Listener
|
||||
UtilPlayer.message(player, "");
|
||||
UtilPlayer.message(player, ArcadeFormat.Line);
|
||||
|
||||
UtilPlayer.message(player, "§aGame - §f§l" + this.GetName());
|
||||
UtilPlayer.message(player, "§aGame - §f§l" + this.GetName());
|
||||
UtilPlayer.message(player, "");
|
||||
UtilPlayer.message(player, "");
|
||||
|
||||
@ -946,13 +946,13 @@ public abstract class Game implements Listener
|
||||
}
|
||||
else
|
||||
{
|
||||
UtilPlayer.message(player, ChatColor.WHITE + "§lNobody won the game...");
|
||||
UtilPlayer.message(player, ChatColor.WHITE + "§lNobody won the game...");
|
||||
}
|
||||
|
||||
|
||||
UtilPlayer.message(player, _customWinLine);
|
||||
UtilPlayer.message(player, "");
|
||||
UtilPlayer.message(player, "§aMap - §f§l" + WorldData.MapName + C.cGray + " created by " + "§f§l" + WorldData.MapAuthor);
|
||||
UtilPlayer.message(player, "§aMap - §f§l" + WorldData.MapName + C.cGray + " created by " + "§f§l" + WorldData.MapAuthor);
|
||||
|
||||
UtilPlayer.message(player, ArcadeFormat.Line);
|
||||
}
|
||||
@ -970,13 +970,13 @@ public abstract class Game implements Listener
|
||||
UtilPlayer.message(player, "");
|
||||
UtilPlayer.message(player, ArcadeFormat.Line);
|
||||
|
||||
UtilPlayer.message(player, "§aGame - §f§l" + this.GetName());
|
||||
UtilPlayer.message(player, "§aGame - §f§l" + this.GetName());
|
||||
UtilPlayer.message(player, "");
|
||||
|
||||
if (places == null || places.isEmpty())
|
||||
{
|
||||
UtilPlayer.message(player, "");
|
||||
UtilPlayer.message(player, ChatColor.WHITE + "§lNobody won the game...");
|
||||
UtilPlayer.message(player, ChatColor.WHITE + "§lNobody won the game...");
|
||||
UtilPlayer.message(player, "");
|
||||
}
|
||||
else
|
||||
@ -996,7 +996,7 @@ public abstract class Game implements Listener
|
||||
}
|
||||
|
||||
UtilPlayer.message(player, "");
|
||||
UtilPlayer.message(player, "§aMap - §f§l" + WorldData.MapName + C.cGray + " created by " + "§f§l" + WorldData.MapAuthor);
|
||||
UtilPlayer.message(player, "§aMap - §f§l" + WorldData.MapName + C.cGray + " created by " + "§f§l" + WorldData.MapAuthor);
|
||||
|
||||
UtilPlayer.message(player, ArcadeFormat.Line);
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ public class GameTeam
|
||||
|
||||
public String GetFormattedName()
|
||||
{
|
||||
return GetColor() + "§l" + GetName();
|
||||
return GetColor() + "§l" + GetName();
|
||||
}
|
||||
|
||||
public void SpawnTeleport(Player player)
|
||||
|
@ -962,11 +962,11 @@ public class Bridge extends TeamGame implements OreObsfucation
|
||||
|
||||
if (time > 0)
|
||||
GetObjectiveSide().setDisplayName(
|
||||
ChatColor.WHITE + "§lBridges in " + C.cGreen + "§l"
|
||||
ChatColor.WHITE + "§lBridges in " + C.cGreen + "§l"
|
||||
+ UtilTime.MakeStr(time));
|
||||
else
|
||||
GetObjectiveSide().setDisplayName(
|
||||
ChatColor.WHITE + "§lBridges are down!");
|
||||
ChatColor.WHITE + "§lBridges are down!");
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
|
@ -822,12 +822,12 @@ public class CastleSiege extends TeamGame
|
||||
|
||||
if (timeLeft > 0)
|
||||
GetObjectiveSide().setDisplayName(
|
||||
ChatColor.WHITE + "§lSun Rise: " + C.cGreen + "§l"
|
||||
ChatColor.WHITE + "§lSun Rise: " + C.cGreen + "§l"
|
||||
+ UtilTime.MakeStr(timeLeft));
|
||||
else
|
||||
{
|
||||
GetObjectiveSide().setDisplayName(
|
||||
ChatColor.WHITE + "§lSun has risen!");
|
||||
ChatColor.WHITE + "§lSun has risen!");
|
||||
|
||||
for (Player player : GetTeam(ChatColor.RED).GetPlayers(true))
|
||||
Manager.GetCondition().Factory().Ignite("Sun Damage", player, player, 5, false, false);
|
||||
|
@ -956,7 +956,7 @@ public class HideSeek extends TeamGame
|
||||
if (timeLeft > 0)
|
||||
{
|
||||
GetObjectiveSide().setDisplayName(
|
||||
ChatColor.WHITE + "§lHide Time: " + C.cGreen + "§l"
|
||||
ChatColor.WHITE + "§lHide Time: " + C.cGreen + "§l"
|
||||
+ UtilTime.MakeStr(timeLeft));
|
||||
}
|
||||
else
|
||||
@ -981,13 +981,13 @@ public class HideSeek extends TeamGame
|
||||
if (timeLeft > 0)
|
||||
{
|
||||
GetObjectiveSide().setDisplayName(
|
||||
ChatColor.WHITE + "§lHunt Time: " + C.cGreen + "§l"
|
||||
ChatColor.WHITE + "§lHunt Time: " + C.cGreen + "§l"
|
||||
+ UtilTime.MakeStr(timeLeft));
|
||||
}
|
||||
else
|
||||
{
|
||||
GetObjectiveSide().setDisplayName(
|
||||
ChatColor.WHITE + "§lHunt Time: " + C.cGreen + "§l"
|
||||
ChatColor.WHITE + "§lHunt Time: " + C.cGreen + "§l"
|
||||
+ UtilTime.MakeStr(0));
|
||||
|
||||
SetState(GameState.End);
|
||||
|
@ -186,7 +186,7 @@ public class MineWare extends SoloGame
|
||||
Announce(C.cYellow + C.Bold + _order.GetOrder().toUpperCase());
|
||||
|
||||
GetObjectiveSide().setDisplayName(
|
||||
ChatColor.WHITE + "§lMineWare " + C.cGreen + "§l"
|
||||
ChatColor.WHITE + "§lMineWare " + C.cGreen + "§l"
|
||||
+ "Round " + _orderCount);
|
||||
}
|
||||
//Update Order
|
||||
|
@ -470,11 +470,11 @@ public class SheepGame extends TeamGame
|
||||
|
||||
if (time > 0)
|
||||
GetObjectiveSide().setDisplayName(
|
||||
ChatColor.WHITE + "§lTime Left " + C.cGreen + "§l"
|
||||
ChatColor.WHITE + "§lTime Left " + C.cGreen + "§l"
|
||||
+ UtilTime.MakeStr(time));
|
||||
else
|
||||
GetObjectiveSide().setDisplayName(
|
||||
ChatColor.WHITE + "§lTime Up!");
|
||||
ChatColor.WHITE + "§lTime Up!");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -300,7 +300,7 @@ public class SuperSmash extends SoloGame
|
||||
|
||||
UtilPlayer.message(player, ArcadeFormat.Line);
|
||||
|
||||
UtilPlayer.message(player, "§aAbility - §f§l" + player.getItemInHand().getItemMeta().getDisplayName());
|
||||
UtilPlayer.message(player, "§aAbility - §f§l" + player.getItemInHand().getItemMeta().getDisplayName());
|
||||
|
||||
//Perk Descs
|
||||
for (String line : player.getItemInHand().getItemMeta().getLore())
|
||||
|
@ -293,7 +293,7 @@ public class SuperSmashTeam extends TeamGame
|
||||
|
||||
UtilPlayer.message(player, ArcadeFormat.Line);
|
||||
|
||||
UtilPlayer.message(player, "§aAbility - §f§l" + player.getItemInHand().getItemMeta().getDisplayName());
|
||||
UtilPlayer.message(player, "§aAbility - §f§l" + player.getItemInHand().getItemMeta().getDisplayName());
|
||||
|
||||
//Perk Descs
|
||||
for (String line : player.getItemInHand().getItemMeta().getLore())
|
||||
|
@ -1210,13 +1210,13 @@ public class SurvivalGames extends SoloGame
|
||||
if (timeLeft > 0)
|
||||
{
|
||||
GetObjectiveSide().setDisplayName(
|
||||
ChatColor.WHITE + "§lDeathmatch: " + C.cGreen + "§l"
|
||||
ChatColor.WHITE + "§lDeathmatch: " + C.cGreen + "§l"
|
||||
+ UtilTime.MakeStr(timeLeft));
|
||||
}
|
||||
else
|
||||
{
|
||||
GetObjectiveSide().setDisplayName(
|
||||
ChatColor.WHITE + "§lDeathmatch");
|
||||
ChatColor.WHITE + "§lDeathmatch");
|
||||
|
||||
_deathmatchLive = true;
|
||||
|
||||
|
@ -1214,13 +1214,13 @@ public class SurvivalGamesTeams extends TeamGame
|
||||
if (timeLeft > 0)
|
||||
{
|
||||
GetObjectiveSide().setDisplayName(
|
||||
ChatColor.WHITE + "§lDeathmatch: " + C.cGreen + "§l"
|
||||
ChatColor.WHITE + "§lDeathmatch: " + C.cGreen + "§l"
|
||||
+ UtilTime.MakeStr(timeLeft));
|
||||
}
|
||||
else
|
||||
{
|
||||
GetObjectiveSide().setDisplayName(
|
||||
ChatColor.WHITE + "§lDeathmatch");
|
||||
ChatColor.WHITE + "§lDeathmatch");
|
||||
|
||||
_deathmatchLive = true;
|
||||
|
||||
|
@ -1117,7 +1117,7 @@ public class UHC extends TeamGame
|
||||
}
|
||||
else
|
||||
{
|
||||
UtilPlayer.message(player, ChatColor.WHITE + "§lNobody won the game...");
|
||||
UtilPlayer.message(player, ChatColor.WHITE + "§lNobody won the game...");
|
||||
}
|
||||
|
||||
UtilPlayer.message(player, "");
|
||||
@ -1141,7 +1141,7 @@ public class UHC extends TeamGame
|
||||
UtilPlayer.message(player, "");
|
||||
UtilPlayer.message(player, "");
|
||||
|
||||
UtilPlayer.message(player, ChatColor.WHITE + "§lEnder Dragon has won the game...");
|
||||
UtilPlayer.message(player, ChatColor.WHITE + "§lEnder Dragon has won the game...");
|
||||
|
||||
UtilPlayer.message(player, "");
|
||||
UtilPlayer.message(player, "");
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user