mirror of
https://github.com/trainerlord/WorldSystem.git
synced 2024-11-30 13:03:23 +01:00
2.1.2 see spigotmc.org
This commit is contained in:
parent
8a875e3a55
commit
b1f1d1c313
@ -1,11 +1,11 @@
|
||||
nopermission: "&cYou don't have permissions!"
|
||||
nopermission: "&cYou do not have permission to that command!"
|
||||
unknown_error: "&cSomething went wrong..."
|
||||
lagdetection: "Lagdetection in world: &c%world"
|
||||
wrong_usage: "&c%usage"
|
||||
not_registered: "&cThis player hasn't joined yet!"
|
||||
|
||||
world:
|
||||
reseted: "Your world was reseted!"
|
||||
reseted: "You would was reset!"
|
||||
still_loaded: "&cYour world is still loaded!"
|
||||
not_on: "&cYou are not on a world!"
|
||||
created: "Your world is now ready. Get there with &a/ws home"
|
||||
@ -16,8 +16,8 @@ world:
|
||||
does_not_exists:
|
||||
own: "&cYou don't have a world!"
|
||||
other: "&cThis player doesn't has a world!"
|
||||
setting_up: "&aSetting up world..."
|
||||
playerlist: "Player in this world: %players"
|
||||
setting_up: "&aLoading world..."
|
||||
playerlist: "Players in this world: %players"
|
||||
|
||||
member:
|
||||
removed: "You removed &c%player&6 from your world!"
|
||||
@ -25,20 +25,20 @@ member:
|
||||
already_added: "&cThis player is already a member!"
|
||||
not_added:
|
||||
own: "&cThis player isn't a member!"
|
||||
other: "&cYou are not added to this world"
|
||||
other: "&cYou have not been added to this world!"
|
||||
|
||||
request:
|
||||
expired: "&cYou request is expired!"
|
||||
confirm: "&cPlease confirm reset of your world: %command"
|
||||
expired: "&cYour request has expired!"
|
||||
confirm: "WARNING - Please confirm reset of your world: %command"
|
||||
until_expire: "&cYour request expires in %time seconds!"
|
||||
already_sent: "&cYou already sent a request!"
|
||||
not_sent: "&cYou didn't send a request!"
|
||||
invalid_input: "&c%input is not a valid input!"
|
||||
not_sent: "&cYou have not sent a request!"
|
||||
invalid_input: "&c%input is not a valid request!"
|
||||
|
||||
toggle:
|
||||
gamemode:
|
||||
enabled: "&a%player&6 can now change his gamemode!"
|
||||
disabled: "&c%player&6 can no longer change his gamemode!"
|
||||
enabled: "&a%player&6 can now change their gamemode!"
|
||||
disabled: "&c%player&6 can no longer change their gamemode!"
|
||||
teleport:
|
||||
enabled: "&a%player&6 can now teleport!"
|
||||
disabled: "&c%player&6 can no longer teleport!"
|
||||
@ -65,16 +65,16 @@ command_help:
|
||||
list:
|
||||
- "/ws get &8- &7Will give you a world"
|
||||
- "/ws home &8- &7Teleports you on your world"
|
||||
- "/ws gui &8- &7Opens the GUI menu if you are the worldowner"
|
||||
- "/ws gui &8- &7Opens the GUI menu if you are the world owner"
|
||||
- "/ws tp &8- &7Teleports you on a specific world"
|
||||
- "/ws addmember &8- &7Adds a player to your world"
|
||||
- "/ws delmember &8- &7Removes a player from your world"
|
||||
- "/ws leave &8- &7Leave a world"
|
||||
- "/ws tnt &8- &7Allows/Denys TNT on your world"
|
||||
- "/ws fire &8- &7Allows/Denys Fire on your world"
|
||||
- "/ws togglegm &8- &7Allows/Denys a player changing gamemode"
|
||||
- "/ws togglebuild &8- &7Allows/Denys a player building"
|
||||
- "/ws toggletp &8- &7Allows/Denys a player teleporting"
|
||||
- "/ws tnt &8- &7Allows/Denies TNT on your world"
|
||||
- "/ws fire &8- &7Allows/Denies Fire on your world"
|
||||
- "/ws togglegm &8- &7Allows/Denies a player changing gamemode"
|
||||
- "/ws togglebuild &8- &7Allows/Denies a player building on your world"
|
||||
- "/ws toggletp &8- &7Allows/Denies a player teleporting on your world"
|
||||
- "/ws info &8- &7Shows information about the world"
|
||||
- "/ws reset &8- &7Will reset your world"
|
||||
delete_command: "/ws delete &8- &7Will delete a world"
|
@ -1,5 +1,5 @@
|
||||
name: WorldSystem
|
||||
version: 2.1.1
|
||||
version: 2.1.2
|
||||
author: Butzlabben
|
||||
main: de.butzlabben.world.WorldSystem
|
||||
|
||||
@ -9,6 +9,7 @@ commands:
|
||||
usage: /ws
|
||||
ws get:
|
||||
usage: /ws get
|
||||
permission: ws.get
|
||||
ws help:
|
||||
usage: /ws help
|
||||
ws home:
|
||||
@ -50,6 +51,7 @@ permissions:
|
||||
description: Gives '*'-Perms to all Commands
|
||||
children:
|
||||
ws.tp.*: true
|
||||
ws.get: true
|
||||
ws.tp.world: true
|
||||
ws.tp.toother: true
|
||||
ws.tp.other: true
|
||||
@ -70,6 +72,9 @@ permissions:
|
||||
ws.build:
|
||||
default: op
|
||||
description: You can build on other Worlds without WorldPermissions
|
||||
ws.get:
|
||||
default: true
|
||||
description: You can create a world via /ws get
|
||||
ws.delete:
|
||||
default: op
|
||||
description: You can delete a world
|
||||
|
@ -9,7 +9,7 @@ worldborder:
|
||||
# Size with ws.large permission
|
||||
large: 5000
|
||||
|
||||
# Set a specialized center wich is not the spawn
|
||||
# Set a specialized center which is not the spawn
|
||||
center:
|
||||
as_spawn: true
|
||||
x: 0
|
||||
|
@ -9,6 +9,8 @@ import java.nio.charset.Charset;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
import de.butzlabben.world.WorldSystem;
|
||||
|
||||
/**
|
||||
* @author Butzlabben
|
||||
* @since 02.05.2018
|
||||
@ -19,7 +21,7 @@ public class UpdateInformations {
|
||||
private final boolean silent;
|
||||
|
||||
public static synchronized UpdateInformations getInformations() {
|
||||
String json = callURL("https://seagiants.eu/worldsystem/info.php");
|
||||
String json = callURL("https://seagiants.eu/worldsystem/info.php?version=" + WorldSystem.getInstance().getDescription().getVersion());
|
||||
Gson gson = new GsonBuilder().create();
|
||||
UpdateInformations ui = gson.fromJson(json, UpdateInformations.class);
|
||||
return ui;
|
||||
|
@ -173,6 +173,7 @@ public class WorldSystem extends JavaPlugin {
|
||||
if (languages.exists() == false)
|
||||
languages.mkdirs();
|
||||
PluginConfig.checkConfig(config);
|
||||
// Done with #6
|
||||
MessageConfig.checkConfig(new File(languages, "en.yml"));
|
||||
MessageConfig.checkConfig(new File(languages, "de.yml"));
|
||||
MessageConfig.checkConfig(new File(languages, "hu.yml"));
|
||||
|
@ -37,7 +37,7 @@ public class WSAddmemberCommand implements CommandExecutor{
|
||||
OfflinePlayer a = Bukkit.getOfflinePlayer(args[1]);
|
||||
WorldConfig wc = WorldConfig.getWorldConfig(dc.getWorldname());
|
||||
if (a == null) {
|
||||
p.sendMessage(MessageConfig.getNotRegistered());
|
||||
p.sendMessage(MessageConfig.getNotRegistered().replaceAll("%player", args[1]));
|
||||
return true;
|
||||
} else if (wc.isMember(a.getUniqueId())) {
|
||||
p.sendMessage(MessageConfig.getAlreadyMember());
|
||||
|
@ -37,7 +37,7 @@ public class WSDelmemberCommand implements CommandExecutor {
|
||||
OfflinePlayer a = Bukkit.getOfflinePlayer(args[1]);
|
||||
WorldConfig wc = WorldConfig.getWorldConfig(dc.getWorldname());
|
||||
if (a == null) {
|
||||
p.sendMessage(MessageConfig.getNotRegistered());
|
||||
p.sendMessage(MessageConfig.getNotRegistered().replaceAll("%player", args[1]));
|
||||
return true;
|
||||
} else if (!wc.isMember(a.getUniqueId())) {
|
||||
p.sendMessage(MessageConfig.getNoMemberOwn());
|
||||
|
@ -1,8 +1,12 @@
|
||||
package de.butzlabben.world.config;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.text.SimpleDateFormat;
|
||||
@ -86,7 +90,12 @@ public class PluginConfig {
|
||||
}
|
||||
|
||||
private static YamlConfiguration getConfig() {
|
||||
return YamlConfiguration.loadConfiguration(file);
|
||||
try {
|
||||
return YamlConfiguration.loadConfiguration(new InputStreamReader(new FileInputStream(file), Charset.forName("UTF-8")));
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getLicenseKey() {
|
||||
|
@ -18,6 +18,10 @@ public class GuiCommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
WorldPlayer wp = new WorldPlayer((Player) sender);
|
||||
if(!wp.isOnSystemWorld()) {
|
||||
sender.sendMessage(MessageConfig.getNotOnWorld());
|
||||
return true;
|
||||
}
|
||||
if (!wp.isOwnerofWorld()) {
|
||||
sender.sendMessage(MessageConfig.getNoPermission());
|
||||
return true;
|
||||
|
@ -242,7 +242,7 @@ public class SystemWorld {
|
||||
DependenceConfig dc = new DependenceConfig(p);
|
||||
|
||||
String uuid = p.getUniqueId().toString();
|
||||
int id = dc.getHighestID();
|
||||
int id = dc.getHighestID() + 1;
|
||||
String worldname = "ID" + id + "-" + uuid;
|
||||
|
||||
WorldCreator creator = new WorldCreator(worldname);
|
||||
|
@ -1,11 +1,11 @@
|
||||
nopermission: "&cYou don't have permissions!"
|
||||
nopermission: "&cYou do not have permission to that command!"
|
||||
unknown_error: "&cSomething went wrong..."
|
||||
lagdetection: "Lagdetection in world: &c%world"
|
||||
wrong_usage: "&c%usage"
|
||||
not_registered: "&cThis player hasn't joined yet!"
|
||||
|
||||
world:
|
||||
reseted: "Your world was reseted!"
|
||||
reseted: "You would was reset!"
|
||||
still_loaded: "&cYour world is still loaded!"
|
||||
not_on: "&cYou are not on a world!"
|
||||
created: "Your world is now ready. Get there with &a/ws home"
|
||||
@ -16,8 +16,8 @@ world:
|
||||
does_not_exists:
|
||||
own: "&cYou don't have a world!"
|
||||
other: "&cThis player doesn't has a world!"
|
||||
setting_up: "&aSetting up world..."
|
||||
playerlist: "Player in this world: %players"
|
||||
setting_up: "&aLoading world..."
|
||||
playerlist: "Players in this world: %players"
|
||||
|
||||
member:
|
||||
removed: "You removed &c%player&6 from your world!"
|
||||
@ -25,20 +25,20 @@ member:
|
||||
already_added: "&cThis player is already a member!"
|
||||
not_added:
|
||||
own: "&cThis player isn't a member!"
|
||||
other: "&cYou are not added to this world"
|
||||
other: "&cYou have not been added to this world!"
|
||||
|
||||
request:
|
||||
expired: "&cYou request is expired!"
|
||||
confirm: "&cPlease confirm reset of your world: %command"
|
||||
expired: "&cYour request has expired!"
|
||||
confirm: "WARNING - Please confirm reset of your world: %command"
|
||||
until_expire: "&cYour request expires in %time seconds!"
|
||||
already_sent: "&cYou already sent a request!"
|
||||
not_sent: "&cYou didn't send a request!"
|
||||
invalid_input: "&c%input is not a valid input!"
|
||||
not_sent: "&cYou have not sent a request!"
|
||||
invalid_input: "&c%input is not a valid request!"
|
||||
|
||||
toggle:
|
||||
gamemode:
|
||||
enabled: "&a%player&6 can now change his gamemode!"
|
||||
disabled: "&c%player&6 can no longer change his gamemode!"
|
||||
enabled: "&a%player&6 can now change their gamemode!"
|
||||
disabled: "&c%player&6 can no longer change their gamemode!"
|
||||
teleport:
|
||||
enabled: "&a%player&6 can now teleport!"
|
||||
disabled: "&c%player&6 can no longer teleport!"
|
||||
@ -65,16 +65,16 @@ command_help:
|
||||
list:
|
||||
- "/ws get &8- &7Will give you a world"
|
||||
- "/ws home &8- &7Teleports you on your world"
|
||||
- "/ws gui &8- &7Opens the GUI menu if you are the worldowner"
|
||||
- "/ws gui &8- &7Opens the GUI menu if you are the world owner"
|
||||
- "/ws tp &8- &7Teleports you on a specific world"
|
||||
- "/ws addmember &8- &7Adds a player to your world"
|
||||
- "/ws delmember &8- &7Removes a player from your world"
|
||||
- "/ws leave &8- &7Leave a world"
|
||||
- "/ws tnt &8- &7Allows/Denys TNT on your world"
|
||||
- "/ws fire &8- &7Allows/Denys Fire on your world"
|
||||
- "/ws togglegm &8- &7Allows/Denys a player changing gamemode"
|
||||
- "/ws togglebuild &8- &7Allows/Denys a player building"
|
||||
- "/ws toggletp &8- &7Allows/Denys a player teleporting"
|
||||
- "/ws tnt &8- &7Allows/Denies TNT on your world"
|
||||
- "/ws fire &8- &7Allows/Denies Fire on your world"
|
||||
- "/ws togglegm &8- &7Allows/Denies a player changing gamemode"
|
||||
- "/ws togglebuild &8- &7Allows/Denies a player building on your world"
|
||||
- "/ws toggletp &8- &7Allows/Denies a player teleporting on your world"
|
||||
- "/ws info &8- &7Shows information about the world"
|
||||
- "/ws reset &8- &7Will reset your world"
|
||||
delete_command: "/ws delete &8- &7Will delete a world"
|
@ -1,5 +1,5 @@
|
||||
name: WorldSystem
|
||||
version: 2.1.1
|
||||
version: 2.1.2
|
||||
author: Butzlabben
|
||||
main: de.butzlabben.world.WorldSystem
|
||||
|
||||
@ -9,6 +9,7 @@ commands:
|
||||
usage: /ws
|
||||
ws get:
|
||||
usage: /ws get
|
||||
permission: ws.get
|
||||
ws help:
|
||||
usage: /ws help
|
||||
ws home:
|
||||
@ -50,6 +51,7 @@ permissions:
|
||||
description: Gives '*'-Perms to all Commands
|
||||
children:
|
||||
ws.tp.*: true
|
||||
ws.get: true
|
||||
ws.tp.world: true
|
||||
ws.tp.toother: true
|
||||
ws.tp.other: true
|
||||
@ -70,6 +72,9 @@ permissions:
|
||||
ws.build:
|
||||
default: op
|
||||
description: You can build on other Worlds without WorldPermissions
|
||||
ws.get:
|
||||
default: true
|
||||
description: You can create a world via /ws get
|
||||
ws.delete:
|
||||
default: op
|
||||
description: You can delete a world
|
||||
|
@ -9,7 +9,7 @@ worldborder:
|
||||
# Size with ws.large permission
|
||||
large: 5000
|
||||
|
||||
# Set a specialized center wich is not the spawn
|
||||
# Set a specialized center which is not the spawn
|
||||
center:
|
||||
as_spawn: true
|
||||
x: 0
|
||||
|
Loading…
Reference in New Issue
Block a user