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
ba67389
commit 6f8501b
Showing
508 changed files
with
9,655 additions
and
3,526 deletions.
There are no files selected for viewing
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
Binary file renamed
BIN
+179 KB
...ns/Kingdoms-Addon-Map-Viewers-2.1.0.1.jar → ...ns/Kingdoms-Addon-Map-Viewers-2.1.0.2.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
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,14 +1,16 @@ | ||
outposts: | ||
version: '3.0.1.6.2' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-Outposts-3.0.1.6.2.jar?raw=true' | ||
version: '3.0.1.6.3' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-Outposts-3.0.1.6.3.jar?raw=true' | ||
supported-core-version: 1.16.20.1 | ||
|
||
map-viewers: | ||
version: '2.1.0.1' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-Map-Viewers-2.1.0.1.jar?raw=true' | ||
version: '2.1.0.2' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-Map-Viewers-2.1.0.2.jar?raw=true' | ||
supported-core-version: 1.16.20.1 | ||
|
||
peace-treaties: | ||
version: '1.2.6.0.2' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-Peace-Treaties-1.2.6.0.2.jar?raw=true' | ||
supported-core-version: 1.16.20.1 | ||
version: '1.2.6.0.3' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-Peace-Treaties-1.2.6.0.3.jar?raw=true' | ||
supported-core-version: 1.16.20.1 | ||
enginehub: | ||
version: '1.0.0' | ||
url: 'https://github.com/CryptoMorin/KingdomsX/blob/master/addons/Kingdoms-Addon-EngineHub-1.0.0.jar?raw=true' | ||
supported-core-version: 1.17.0-ALHPA |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
plugins { | ||
commons | ||
spigot | ||
} | ||
|
||
group = "org.kingdoms.services" | ||
version = "unspecified" | ||
|
||
repositories { | ||
maven("https://repo.xenondevs.xyz/releases") | ||
} | ||
|
||
dependencies { | ||
compileOnly(project(":core:service")) | ||
compileOnly(project(":platform:bukkit")) | ||
compileOnly(project(":shared")) | ||
|
||
// https://xenondevs.xyz/docs/nova/api/ | ||
// https://repo.xenondevs.xyz/#/releases/xyz/xenondevs/nova/nova-api/ | ||
// What's "Nova-Api"? | ||
compileOnly("xyz.xenondevs.nova:nova-api:0.16.1") | ||
} |
56 changes: 56 additions & 0 deletions
56
core/service/nova/src/main/java/org/kingdoms/services/ServiceNova.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,56 @@ | ||
package org.kingdoms.services; | ||
|
||
import org.bukkit.Location; | ||
import org.bukkit.OfflinePlayer; | ||
import org.bukkit.entity.Entity; | ||
import org.bukkit.inventory.ItemStack; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
import org.kingdoms.api.KingdomsAPI; | ||
import org.kingdoms.api.KingdomsActionProcessor; | ||
import org.kingdoms.platform.bukkit.adapters.BukkitAdapter; | ||
import xyz.xenondevs.nova.api.Nova; | ||
import xyz.xenondevs.nova.api.protection.ProtectionIntegration; | ||
|
||
/** | ||
* https://github.com/xenondevs/Nova | ||
* https://github.com/xenondevs/Nova/tree/main/nova-hooks | ||
*/ | ||
public final class ServiceNova implements Service, ProtectionIntegration { | ||
private static final KingdomsActionProcessor API = KingdomsAPI.getApi().getActionProcessor(); | ||
|
||
@Override | ||
public void enable() { | ||
Nova.getNova().registerProtectionIntegration(this); | ||
} | ||
|
||
@Override | ||
public boolean canBreak(@NotNull OfflinePlayer offlinePlayer, @Nullable ItemStack itemStack, @NotNull Location location) { | ||
return API.canBreak(offlinePlayer, itemStack, BukkitAdapter.adapt(location)); | ||
} | ||
|
||
@Override | ||
public boolean canPlace(@NotNull OfflinePlayer offlinePlayer, @NotNull ItemStack itemStack, @NotNull Location location) { | ||
return API.canPlace(offlinePlayer, itemStack, BukkitAdapter.adapt(location)); | ||
} | ||
|
||
@Override | ||
public boolean canUseBlock(@NotNull OfflinePlayer offlinePlayer, @Nullable ItemStack itemStack, @NotNull Location location) { | ||
return API.canUseBlock(offlinePlayer, itemStack, BukkitAdapter.adapt(location)); | ||
} | ||
|
||
@Override | ||
public boolean canUseItem(@NotNull OfflinePlayer offlinePlayer, @NotNull ItemStack itemStack, @NotNull Location location) { | ||
return API.canUseItem(offlinePlayer, itemStack, BukkitAdapter.adapt(location)); | ||
} | ||
|
||
@Override | ||
public boolean canInteractWithEntity(@NotNull OfflinePlayer offlinePlayer, @NotNull Entity entity, @Nullable ItemStack itemStack) { | ||
return API.canInteractWithEntity(offlinePlayer, entity, itemStack); | ||
} | ||
|
||
@Override | ||
public boolean canHurtEntity(@NotNull OfflinePlayer offlinePlayer, @NotNull Entity entity, @Nullable ItemStack itemStack) { | ||
return true; | ||
} | ||
} |
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
16 changes: 16 additions & 0 deletions
16
core/service/pets/src/main/java/org/kingdoms/services/pets/ServiceCombatPets.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,16 @@ | ||
package org.kingdoms.services.pets; | ||
|
||
import org.bukkit.entity.Entity; | ||
import org.bukkit.entity.LivingEntity; | ||
import su.nightexpress.combatpets.api.pet.IPetHolder; | ||
import su.nightexpress.combatpets.pet.PetManager; | ||
|
||
public final class ServiceCombatPets implements ServicePet { | ||
@Override | ||
public PetInfo getPetInfo(Entity entity) { | ||
if (!(entity instanceof LivingEntity)) return null; | ||
IPetHolder pet = PetManager.getPet((LivingEntity) entity); | ||
if (pet == null) return null; | ||
return new PetInfo(pet.getOwner().getUniqueId(), true); | ||
} | ||
} |
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
8 changes: 4 additions & 4 deletions
8
core/service/pets/src/main/java/org/kingdoms/services/pets/ServiceMyPet.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
10 changes: 0 additions & 10 deletions
10
core/service/pets/src/main/java/org/kingdoms/services/pets/ServicePet.java
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
core/service/pets/src/main/java/org/kingdoms/services/pets/ServicePet.kt
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,11 @@ | ||
package org.kingdoms.services.pets | ||
|
||
import org.bukkit.entity.Entity | ||
import org.kingdoms.services.Service | ||
import java.util.* | ||
|
||
interface ServicePet : Service { | ||
fun getPetInfo(entity: Entity): PetInfo? | ||
} | ||
|
||
class PetInfo(val owner: UUID?, @get:JvmName("canBeAttacked") val canBeAttacked: Boolean) |
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
35 changes: 23 additions & 12 deletions
35
core/service/skins-restorer/src/main/java/org/kingdoms/services/ServiceSkins.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
6 changes: 4 additions & 2 deletions
6
core/service/src/main/java/org/kingdoms/services/Service.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
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.