+ * Notes: effect X multiplied by 8 + * + * @return The current Effect position X + */ + public int getEffectPositionX() { + return handle.getIntegers().read(0); + } + + /** + * Set Effect position X. + * + * @param value - new value. + */ + public void setEffectPositionX(int value) { + handle.getIntegers().write(0, value); + } + + /** + * Retrieve Effect position Y. + *
+ * Notes: effect Y multiplied by 8 + * + * @return The current Effect position Y + */ + public int getEffectPositionY() { + return handle.getIntegers().read(1); + } + + /** + * Set Effect position Y. + * + * @param value - new value. + */ + public void setEffectPositionY(int value) { + handle.getIntegers().write(1, value); + } + + /** + * Retrieve Effect position Z. + *
+ * Notes: effect Z multiplied by 8 + * + * @return The current Effect position Z + */ + public int getEffectPositionZ() { + return handle.getIntegers().read(2); + } + + /** + * Set Effect position Z. + * + * @param value - new value. + */ + public void setEffectPositionZ(int value) { + handle.getIntegers().write(2, value); + } + + /** + * Retrieve Volume. + *
+ * Notes: 1 is 100%, can be more + * + * @return The current Volume + */ + public float getVolume() { + return handle.getFloat().read(0); + } + + /** + * Set Volume. + * + * @param value - new value. + */ + public void setVolume(float value) { + handle.getFloat().write(0, value); + } + + /** + * Retrieve Pitch. + *
+ * Notes: 63 is 100%, can be more + * + * @return The current Pitch + */ + public float getPitch() { + return handle.getFloat().read(1); + } + + /** + * Set Pitch. + * + * @param value - new value. + */ + public void setPitch(float value) { + handle.getFloat().write(1, value); + } + +} + diff --git a/src/main/java/net/tylermurphy/hideAndSeek/world/WorldLoader.java b/src/main/java/net/tylermurphy/hideAndSeek/world/WorldLoader.java index 5d6e377..011d334 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/world/WorldLoader.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/world/WorldLoader.java @@ -29,6 +29,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import net.tylermurphy.hideAndSeek.util.Version; import org.bukkit.Bukkit; import org.bukkit.World; import org.bukkit.WorldCreator; @@ -63,7 +64,7 @@ public class WorldLoader { } public void loadMap(){ - Bukkit.getServer().createWorld(new WorldCreator(savename).generator(new VoidGenerator())); + Bukkit.getServer().createWorld(new WorldCreator(savename).generator(new VoidGenerator())); World world = Bukkit.getServer().getWorld(savename); if(world == null){ Main.plugin.getLogger().severe("COULD NOT LOAD " + savename); @@ -111,7 +112,10 @@ public class WorldLoader { private void copyFileFolder(String name, Boolean isMca) throws IOException { File region = new File(Main.root+File.separator+mapname+File.separator+name); File temp = new File(Main.root+File.separator+"temp_"+savename+File.separator+name); + System.out.println(region.getAbsolutePath()); + System.out.println(temp.getAbsolutePath()); if(region.exists() && region.isDirectory()) { + System.out.println("passed"); if(!temp.exists()) if(!temp.mkdirs()) throw new IOException("Couldn't create region directory!"); @@ -121,17 +125,17 @@ public class WorldLoader { return; } for (String file : files) { - + System.out.println("Testing file "+ file); if(isMca) { - int minX = (int)Math.floor(saveMinX / 32.0); - int minZ = (int)Math.floor(saveMinZ / 32.0); - int maxX = (int)Math.floor(saveMaxX / 32.0); - int maxZ = (int)Math.floor(saveMaxZ / 32.0); + int minX = (int)Math.floor(saveMinX / 512.0); + int minZ = (int)Math.floor(saveMinZ / 512.0); + int maxX = (int)Math.floor(saveMaxX / 512.0); + int maxZ = (int)Math.floor(saveMaxZ / 512.0); String[] parts = file.split("\\."); if(parts.length > 1) { Main.plugin.getLogger().info(file); - if( Integer.parseInt(parts[1]) < minX || Integer.parseInt(parts[1]) > maxX ||Integer.parseInt(parts[2]) < minZ || Integer.parseInt(parts[2]) > maxZ ) + if( Integer.parseInt(parts[1]) < minX || Integer.parseInt(parts[1]) > maxX || Integer.parseInt(parts[2]) < minZ || Integer.parseInt(parts[2]) > maxZ ) continue; } } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 778e3b4..1e3cbda 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -90,10 +90,20 @@ lobby: max: 10 enabled: true +# As a hider, the closer a seeker gets to you, the louder and faster a pining noise will play. +# There are 3 separate distances (in blocks) you can set to the 3 different levels for the noise. +# The higher the level, the closer the seeker. +seekerPing: + distances: + level1: 30 + level2: 20 + level3: 10 + enabled: true + # Changes the default plugin language. Currently, Supported localizations are: # en-US (English - United States) # de-DE (German - Germany) -local: "en-US" +locale: "en-US" # ---------------------------------------------------------- # # ONLY EDIT BEYOND THIS POINT IF YOU KNOW WHAT YOU ARE DOING # diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index bd391c9..c03205c 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,9 +1,9 @@ name: HideAndSeek main: net.tylermurphy.hideAndSeek.Main -version: 1.3.3 +version: 1.4.0 author: KenshinEto load: STARTUP -api-version: 1.14 +api-version: 1.13 depend: [ProtocolLib] commands: hideandseek: @@ -29,6 +29,8 @@ permissions: hideandseek.join: true hideandseek.leave: true hideandseek.leavebounds: true + hideandseek.wins: true + hideand.top: true hideandseek.about: description: Allows you to run the about command default: true @@ -74,3 +76,9 @@ permissions: hideandseek.leavebounds: description: Allows players to leave specified game bounderies default: op + hideandseek.wins: + description: Allows players to see a players amount of wins + default: true + hideandseek.top: + description: Allows players to see the global wins leaderboard + default: true