forked from CryptoMorin/KingdomsX
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f118cb9
commit b2f541c
Showing
110 changed files
with
4,221 additions
and
441 deletions.
There are no files selected for viewing
Binary file renamed
BIN
+128 KB
addons/Kingdoms-Addon-EngineHub-1.0.0.2.jar → addons/Kingdoms-Addon-EngineHub-1.0.0.3.jar
Binary file not shown.
Binary file renamed
BIN
+179 KB
...ns/Kingdoms-Addon-Map-Viewers-2.1.0.4.jar → ...ns/Kingdoms-Addon-Map-Viewers-2.1.0.5.jar
Binary file not shown.
Binary file renamed
BIN
+53.6 KB
addons/Kingdoms-Addon-Outposts-3.0.1.6.5.jar → addons/Kingdoms-Addon-Outposts-3.0.1.6.6.jar
Binary file not shown.
Binary file renamed
BIN
+180 KB
...ngdoms-Addon-Peace-Treaties-1.2.6.0.5.jar → ...ngdoms-Addon-Peace-Treaties-1.2.6.0.6.jar
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
outposts: | ||
version: '3.0.1.6.5' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-Outposts-3.0.1.6.5.jar?raw=true' | ||
version: '3.0.1.6.6' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-Outposts-3.0.1.6.6.jar?raw=true' | ||
supported-core-version: 1.17.2-ALHPA | ||
|
||
map-viewers: | ||
version: '2.1.0.4' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-Map-Viewers-2.1.0.4.jar?raw=true' | ||
version: '2.1.0.5' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-Map-Viewers-2.1.0.5.jar?raw=true' | ||
supported-core-version: 1.17.2-ALHPA | ||
|
||
peace-treaties: | ||
version: '1.2.6.0.5' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-Peace-Treaties-1.2.6.0.5.jar?raw=true' | ||
version: '1.2.6.0.6' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-Peace-Treaties-1.2.6.0.6.jar?raw=true' | ||
supported-core-version: 1.17.2-ALHPA | ||
|
||
enginehub: | ||
version: '1.0.0.2' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-EngineHub-1.0.0.2.jar?raw=true' | ||
version: '1.0.0.3' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-EngineHub-1.0.0.3.jar?raw=true' | ||
supported-core-version: 1.17.2-ALHPA |
21 changes: 21 additions & 0 deletions
21
.../java/org/kingdoms/services/mythicmobs/conditions/KingdomsMythicMobConditionListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.kingdoms.services.mythicmobs.conditions; | ||
|
||
import io.lumine.mythic.api.skills.conditions.ISkillCondition; | ||
import io.lumine.mythic.bukkit.events.MythicConditionLoadEvent; | ||
import org.bukkit.event.EventHandler; | ||
import org.bukkit.event.Listener; | ||
|
||
import java.util.HashMap; | ||
import java.util.Locale; | ||
import java.util.Map; | ||
|
||
public final class KingdomsMythicMobConditionListener implements Listener { | ||
protected static final Map<String, ISkillCondition> CONDITIONS = new HashMap<>(); | ||
|
||
@EventHandler | ||
public void onConditionLoad(MythicConditionLoadEvent event) { | ||
String conditionName = event.getConditionName().toLowerCase(Locale.ENGLISH); | ||
ISkillCondition condition = CONDITIONS.get(conditionName); | ||
if (condition != null) event.register(condition); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...src/main/java/org/kingdoms/services/mythicmobs/conditions/MythicMobConditionRegistry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package org.kingdoms.services.mythicmobs.conditions; | ||
|
||
public final class MythicMobConditionRegistry { | ||
public static void register(String name, SimpleRelationalChecker checker) { | ||
String id = "kingdoms_" + name; | ||
KingdomsMythicMobConditionListener.CONDITIONS.put(id, new RelationalMythicMobSkillCondition(id, checker)); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...n/java/org/kingdoms/services/mythicmobs/conditions/RelationalMythicMobSkillCondition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.kingdoms.services.mythicmobs.conditions; | ||
|
||
import io.lumine.mythic.api.adapters.AbstractEntity; | ||
import io.lumine.mythic.api.skills.conditions.IEntityComparisonCondition; | ||
import io.lumine.mythic.core.skills.SkillCondition; | ||
|
||
/** | ||
* SkillCondition is an abstract class that handles many ISkillConditions that the class implements. | ||
*/ | ||
public class RelationalMythicMobSkillCondition extends SkillCondition implements IEntityComparisonCondition { | ||
private final SimpleRelationalChecker checker; | ||
|
||
public RelationalMythicMobSkillCondition(String line, SimpleRelationalChecker checker) { | ||
super(line); | ||
this.checker = checker; | ||
} | ||
|
||
@Override | ||
public boolean check(AbstractEntity caster, AbstractEntity target) { | ||
// Caster must be a player and be in a kingdom. | ||
return checker.check(caster.getBukkitEntity(), target.getBukkitEntity()); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...v5/src/main/java/org/kingdoms/services/mythicmobs/conditions/SimpleRelationalChecker.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.kingdoms.services.mythicmobs.conditions; | ||
|
||
import org.bukkit.entity.Entity; | ||
|
||
public interface SimpleRelationalChecker { | ||
boolean check(Entity caster, Entity target); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.