commit
e6f86145cf
6 changed files with 24 additions and 25 deletions
4
pom.xml
4
pom.xml
|
@ -1,7 +1,7 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.tylermurphy</groupId>
|
||||
<artifactId>HideAndSeek</artifactId>
|
||||
<version>1.3.1</version>
|
||||
<version>1.3.2</version>
|
||||
<name>Hide and Seek Plugin</name>
|
||||
<build>
|
||||
<plugins>
|
||||
|
@ -30,7 +30,7 @@
|
|||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.17.1-R0.1-SNAPSHOT</version>
|
||||
<version>1.18.1-R0.1-SNAPSHOT</version>
|
||||
<type>jar</type>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
|
|
@ -2,6 +2,7 @@ package net.tylermurphy.hideAndSeek.bukkit;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
|
@ -13,7 +14,7 @@ public class TabCompleter{
|
|||
if(args.length == 1) {
|
||||
return new ArrayList<String>(CommandHandler.COMMAND_REGISTER.keySet())
|
||||
.stream()
|
||||
.filter(handle -> sender.hasPermission("hideandseek."+handle.toLowerCase()))
|
||||
.filter(handle -> sender.hasPermission("hideandseek."+handle.toLowerCase()) && handle.toLowerCase().startsWith(args[0].toLowerCase(Locale.ROOT)))
|
||||
.collect(Collectors.toList());
|
||||
} else if(args.length > 1) {
|
||||
if(!CommandHandler.COMMAND_REGISTER.containsKey(args[0].toLowerCase())) {
|
||||
|
|
|
@ -7,7 +7,7 @@ public class About implements ICommand {
|
|||
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
sender.sendMessage(
|
||||
String.format("%s%sHide and Seek %s(1.3.1%s)\n", ChatColor.AQUA, ChatColor.BOLD, ChatColor.GRAY,ChatColor.WHITE,ChatColor.GRAY) +
|
||||
String.format("%s%sHide and Seek %s(1.3.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)
|
||||
);
|
||||
|
|
|
@ -19,6 +19,10 @@ public class ConfigManager {
|
|||
this.file = new File(Main.plugin.getDataFolder(), filename);
|
||||
this.defaultFilename = file.getName();
|
||||
|
||||
File folder = Main.plugin.getDataFolder();
|
||||
if(!folder.exists())
|
||||
folder.mkdirs();
|
||||
|
||||
if(!file.exists()){
|
||||
saveDefaultConfiguration();
|
||||
}
|
||||
|
@ -60,7 +64,7 @@ public class ConfigManager {
|
|||
|
||||
private void saveDefaultConfiguration(){
|
||||
try{
|
||||
InputStream input = Main.plugin.getResource(file.getName());
|
||||
InputStream input = Main.plugin.getResource(defaultFilename);
|
||||
java.nio.file.Files.copy(input, file.toPath());
|
||||
input.close();
|
||||
} catch(IOException e){
|
||||
|
|
|
@ -2,6 +2,7 @@ package net.tylermurphy.hideAndSeek.world;
|
|||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.generator.BlockPopulator;
|
||||
|
@ -9,49 +10,42 @@ import org.bukkit.generator.ChunkGenerator;
|
|||
|
||||
public class VoidGenerator extends ChunkGenerator{
|
||||
|
||||
@Override
|
||||
public List<BlockPopulator> getDefaultPopulators(World world) {
|
||||
return Collections.<BlockPopulator>emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldGenerateNoise() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldGenerateSurface() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldGenerateBedrock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldGenerateCaves() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldGenerateDecorations() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldGenerateMobs() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldGenerateStructures() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSpawn(World world, int x, int z) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public ChunkData generateChunkData(World world, Random random, int x, int z, BiomeGrid biome) { return createChunkData(world); }
|
||||
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
name: HideAndSeek
|
||||
main: net.tylermurphy.hideAndSeek.Main
|
||||
version: 1.3.1
|
||||
version: 1.3.2
|
||||
author: KenshinEto
|
||||
load: STARTUP
|
||||
api-version: 1.17
|
||||
api-version: 1.14
|
||||
depend: [ProtocolLib]
|
||||
commands:
|
||||
hideandseek:
|
||||
|
|
Loading…
Reference in a new issue