From 1b1ec528261fb63265e3bfb5c3e5bb85b81336b9 Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Thu, 9 Feb 2023 20:55:58 -0500 Subject: [PATCH 1/2] fix rightclick to find hider, and fix hider potion drink --- .../hideAndSeek/game/util/Disguise.java | 17 +++++++++++++---- .../hideAndSeek/world/WorldLoader.java | 1 - 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/main/java/net/tylermurphy/hideAndSeek/game/util/Disguise.java b/src/main/java/net/tylermurphy/hideAndSeek/game/util/Disguise.java index b3460d0..17ad90c 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/game/util/Disguise.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/game/util/Disguise.java @@ -20,7 +20,7 @@ public class Disguise { final Player hider; final Material material; FallingBlock block; - Horse hitBox; + AbstractHorse hitBox; Location blockLocation; boolean solid, solidify, solidifying; static Team hidden; @@ -156,15 +156,24 @@ public class Disguise { private void respawnFallingBlock(){ block = hider.getLocation().getWorld().spawnFallingBlock(hider.getLocation().add(0, 1000, 0), material, (byte)0); - block.setGravity(false); + if (Main.getInstance().supports(10)) { + block.setGravity(false); + } block.setDropItem(false); block.setInvulnerable(true); } private void respawnHitbox(){ - hitBox = (Horse) hider.getLocation().getWorld().spawnEntity(hider.getLocation().add(0, 1000, 0), EntityType.HORSE); + if (Main.getInstance().supports(11)) { + hitBox = (AbstractHorse) hider.getLocation().getWorld().spawnEntity(hider.getLocation().add(0, 1000, 0), EntityType.SKELETON_HORSE); + } else { + hitBox = (AbstractHorse) hider.getLocation().getWorld().spawnEntity(hider.getLocation().add(0, 1000, 0), EntityType.HORSE); + hitBox.setVariant(Horse.Variant.SKELETON_HORSE); + } + if (Main.getInstance().supports(10)) { + hitBox.setGravity(false); + } hitBox.setAI(false); - hitBox.setGravity(false); hitBox.setInvulnerable(true); hitBox.setCanPickupItems(false); hitBox.setCollidable(false); diff --git a/src/main/java/net/tylermurphy/hideAndSeek/world/WorldLoader.java b/src/main/java/net/tylermurphy/hideAndSeek/world/WorldLoader.java index e5913aa..821ef63 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/world/WorldLoader.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/world/WorldLoader.java @@ -112,7 +112,6 @@ public class WorldLoader { String[] parts = file.split("\\."); if (parts.length > 1) { - Main.getInstance().getLogger().info(file); if ( Integer.parseInt(parts[1]) < minX || Integer.parseInt(parts[1]) > maxX || Integer.parseInt(parts[2]) < minZ || Integer.parseInt(parts[2]) > maxZ ) continue; } From b69ee074b52035620350045786186a8c515f5f77 Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Sat, 11 Feb 2023 13:45:19 -0500 Subject: [PATCH 2/2] update ver num --- pom.xml | 2 +- .../net/tylermurphy/hideAndSeek/command/util/CommandGroup.java | 2 +- src/main/resources/plugin.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 4cf22dd..f6ad5f0 100644 --- a/pom.xml +++ b/pom.xml @@ -1,7 +1,7 @@ 4.0.0 net.tylermurphy KenshinsHideAndSeek - 1.7.1 + 1.7.2 Hide and Seek Plugin diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/util/CommandGroup.java b/src/main/java/net/tylermurphy/hideAndSeek/command/util/CommandGroup.java index 98f2f4f..06e9c33 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/command/util/CommandGroup.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/command/util/CommandGroup.java @@ -51,7 +51,7 @@ public class CommandGroup { if (data == null) { player.sendMessage( - String.format("%s%sKenshin's Hide and Seek %s(%s1.7.1%s)\n", ChatColor.AQUA, ChatColor.BOLD, ChatColor.GRAY, ChatColor.WHITE, ChatColor.GRAY) + + String.format("%s%sKenshin's Hide and Seek %s(%s1.7.2%s)\n", ChatColor.AQUA, ChatColor.BOLD, ChatColor.GRAY, ChatColor.WHITE, ChatColor.GRAY) + String.format("%sAuthor: %s[KenshinEto]\n", ChatColor.GRAY, ChatColor.WHITE) + String.format("%sHelp Command: %s/hs %shelp", ChatColor.GRAY, ChatColor.AQUA, ChatColor.WHITE) ); diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index a857be1..38555db 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,6 +1,6 @@ name: KenshinsHideAndSeek main: net.tylermurphy.hideAndSeek.Main -version: 1.7.1 +version: 1.7.2 author: KenshinEto load: STARTUP api-version: 1.13