mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 09:07:37 +00:00
Update to 1.20.6
This commit is contained in:
parent
c7225246fa
commit
e759dc2269
@ -42,7 +42,7 @@ subprojects {
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
@ -22,8 +22,7 @@ dependencies {
|
||||
library("com.zaxxer:HikariCP:5.1.0")
|
||||
library("org.apache.maven.resolver:maven-resolver-transport-http:1.9.20")
|
||||
library("org.jetbrains:annotations:24.1.0")
|
||||
|
||||
compileOnly("dev.folia:folia-api:1.20.4-R0.1-SNAPSHOT")
|
||||
compileOnly("dev.folia:folia-api:1.20.6-R0.1-SNAPSHOT")
|
||||
compileOnly("com.github.MilkBowl:VaultAPI:1.7.1") {
|
||||
exclude("org.bukkit", "bukkit")
|
||||
}
|
||||
@ -50,7 +49,7 @@ paper {
|
||||
loader = "dev.plex.PlexLibraryManager"
|
||||
website = "https://plex.us.org"
|
||||
authors = listOf("Telesphoreo", "taahanis", "supernt")
|
||||
apiVersion = "1.19"
|
||||
apiVersion = "1.20.5"
|
||||
foliaSupported = true
|
||||
generateLibrariesJson = true
|
||||
// Load BukkitTelnet and LibsDisguises before Plex so the modules register properly
|
||||
|
@ -37,14 +37,7 @@ public class MobListener extends PlexListener
|
||||
EntityType eggType;
|
||||
try
|
||||
{
|
||||
if (mat == Material.MOOSHROOM_SPAWN_EGG)
|
||||
{
|
||||
eggType = EntityType.MUSHROOM_COW;
|
||||
}
|
||||
else
|
||||
{
|
||||
eggType = EntityType.valueOf(mat.name().substring(0, mat.name().length() - 10));
|
||||
}
|
||||
eggType = EntityType.valueOf(mat.name().substring(0, mat.name().length() - 10));
|
||||
}
|
||||
catch (IllegalArgumentException ignored)
|
||||
{
|
||||
@ -56,7 +49,10 @@ public class MobListener extends PlexListener
|
||||
@EventHandler
|
||||
public void onEntitySpawn(EntitySpawnEvent event)
|
||||
{
|
||||
if (event.isCancelled()) return;
|
||||
if (event.isCancelled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (event.getEntity().getEntitySpawnReason() == CreatureSpawnEvent.SpawnReason.SPAWNER_EGG)
|
||||
{
|
||||
// for the future, we can instead filter and restrict nbt tags right here.
|
||||
@ -106,7 +102,10 @@ public class MobListener extends PlexListener
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void onEntityClick(PlayerInteractEntityEvent event)
|
||||
{
|
||||
if (event.isCancelled()) return;
|
||||
if (event.isCancelled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
Material handItem = event.getPlayer().getEquipment().getItem(event.getHand()).getType();
|
||||
if (event.getRightClicked() instanceof Ageable entity)
|
||||
{
|
||||
@ -128,8 +127,14 @@ public class MobListener extends PlexListener
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void onPlayerInteract(PlayerInteractEvent event)
|
||||
{
|
||||
if (event.useItemInHand() == Event.Result.DENY) return;
|
||||
if (event.useInteractedBlock() == Event.Result.DENY) return;
|
||||
if (event.useItemInHand() == Event.Result.DENY)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (event.useInteractedBlock() == Event.Result.DENY)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK)
|
||||
{
|
||||
if (SPAWN_EGGS.contains(event.getMaterial()))
|
||||
|
@ -34,6 +34,7 @@ public class ServerListener extends PlexListener
|
||||
{
|
||||
event.motd(PlexUtils.mmDeserialize(baseMotd.trim()));
|
||||
}
|
||||
/* - Broken on 1.20.6
|
||||
if (plugin.config.contains("server.sample"))
|
||||
{
|
||||
List<String> samples = plugin.config.getStringList("server.sample");
|
||||
@ -42,6 +43,6 @@ public class ServerListener extends PlexListener
|
||||
event.getPlayerSample().clear();
|
||||
event.getPlayerSample().addAll(samples.stream().map(string -> string.replace("&", "§")).map(Bukkit::createProfile).toList());
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user