mirror of
https://github.com/RonanPlugins/BetterRTP.git
synced 2025-08-17 09:05:47 +00:00
Added Effects and invincibility
- If delays are disabled, cooldown will not add delay time to cooldown - Added potion effects and invincibility upon rtp'ing - While in debugger mode, be able to execute '/rtp test' to test potion effects and particles - Fixed an issue with explode particle shape
This commit is contained in:
parent
2ffe2b5cb3
commit
fe12cb802b
@ -8,16 +8,27 @@ public enum CommandTypes {
|
|||||||
INFO(new CmdInfo()),
|
INFO(new CmdInfo()),
|
||||||
PLAYER(new CmdPlayer()),
|
PLAYER(new CmdPlayer()),
|
||||||
RELOAD(new CmdReload()),
|
RELOAD(new CmdReload()),
|
||||||
//SETTINGS(new CmdSettings()),
|
//SETTINGS(new CmdSettings(), true),
|
||||||
VERSION(new CmdVersion()),
|
VERSION(new CmdVersion()),
|
||||||
WORLD(new CmdWorld());
|
WORLD(new CmdWorld()),
|
||||||
|
TEST(new CmdTest(), true); //Only gets added if debugger enabled
|
||||||
|
|
||||||
private RTPCommand cmd;
|
private final RTPCommand cmd;
|
||||||
|
private boolean debugOnly = false;
|
||||||
|
|
||||||
CommandTypes(RTPCommand cmd) {
|
CommandTypes(RTPCommand cmd) {
|
||||||
this.cmd = cmd;
|
this.cmd = cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CommandTypes(RTPCommand cmd, boolean debugOnly) {
|
||||||
|
this.cmd = cmd;
|
||||||
|
this.debugOnly = debugOnly;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDebugOnly() {
|
||||||
|
return debugOnly;
|
||||||
|
}
|
||||||
|
|
||||||
public RTPCommand getCmd() {
|
public RTPCommand getCmd() {
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
@ -35,11 +35,13 @@ public class Commands {
|
|||||||
if (args != null && args.length > 0) {
|
if (args != null && args.length > 0) {
|
||||||
for (CommandTypes cmd : CommandTypes.values()) {
|
for (CommandTypes cmd : CommandTypes.values()) {
|
||||||
if (cmd.name().equalsIgnoreCase(args[0])) {
|
if (cmd.name().equalsIgnoreCase(args[0])) {
|
||||||
if (cmd.getCmd().permission(sendi))
|
if (!cmd.isDebugOnly() || pl.getSettings().debug) { //Debug only?
|
||||||
cmd.getCmd().execute(sendi, label, args);
|
if (cmd.getCmd().permission(sendi))
|
||||||
else
|
cmd.getCmd().execute(sendi, label, args);
|
||||||
noPerm(sendi);
|
else
|
||||||
return;
|
noPerm(sendi);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
invalid(sendi, label);
|
invalid(sendi, label);
|
||||||
@ -57,16 +59,20 @@ public class Commands {
|
|||||||
List<String> list = new ArrayList<>();
|
List<String> list = new ArrayList<>();
|
||||||
if (args.length == 1) {
|
if (args.length == 1) {
|
||||||
for (CommandTypes cmd : CommandTypes.values()) {
|
for (CommandTypes cmd : CommandTypes.values()) {
|
||||||
if (cmd.name().toLowerCase().startsWith(args[0].toLowerCase()) && cmd.getCmd().permission(sendi))
|
if (cmd.name().toLowerCase().startsWith(args[0].toLowerCase()))
|
||||||
list.add(cmd.name().toLowerCase());
|
if (!cmd.isDebugOnly() || pl.getSettings().debug) //Debug only?
|
||||||
|
if (cmd.getCmd().permission(sendi))
|
||||||
|
list.add(cmd.name().toLowerCase());
|
||||||
}
|
}
|
||||||
} else if (args.length > 1) {
|
} else if (args.length > 1) {
|
||||||
for (CommandTypes cmd : CommandTypes.values()) {
|
for (CommandTypes cmd : CommandTypes.values()) {
|
||||||
if (cmd.name().equalsIgnoreCase(args[0]) && cmd.getCmd().permission(sendi)) {
|
if (cmd.name().equalsIgnoreCase(args[0]))
|
||||||
List<String> _cmdlist = cmd.getCmd().tabComplete(sendi, args);
|
if (!cmd.isDebugOnly() || pl.getSettings().debug) //Debug only?
|
||||||
if (_cmdlist != null)
|
if (cmd.getCmd().permission(sendi)) {
|
||||||
list.addAll(_cmdlist);
|
List<String> _cmdlist = cmd.getCmd().tabComplete(sendi, args);
|
||||||
}
|
if (_cmdlist != null)
|
||||||
|
list.addAll(_cmdlist);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
@ -117,13 +123,12 @@ public class Commands {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void tp(Player player, CommandSender sendi, String world, List<String> biomes) {
|
public void tp(Player player, CommandSender sendi, String world, List<String> biomes) {
|
||||||
if (checkDelay(sendi, player)) {
|
if (checkDelay(sendi, player)) { //Cooling down or rtp'ing
|
||||||
boolean delay = false;
|
boolean delay = false;
|
||||||
if (!pl.getPerms().getBypassDelay(player))
|
if (sendi == player) //Forced?
|
||||||
if (delayTimer > 0)
|
if (pl.getSettings().delayEnabled && delayTimer > 0) //Delay enabled?
|
||||||
if (sendi == player)
|
if (!pl.getPerms().getBypassDelay(player)) //Can bypass?
|
||||||
delay = true;
|
delay = true;
|
||||||
//pl.getRTP().start(player, sendi, world, biomes, delay);
|
|
||||||
pl.getRTP().start(player, sendi, world, biomes, delay);
|
pl.getRTP().start(player, sendi, world, biomes, delay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -138,12 +143,12 @@ public class Commands {
|
|||||||
Player p = (Player) sendi;
|
Player p = (Player) sendi;
|
||||||
UUID id = p.getUniqueId();
|
UUID id = p.getUniqueId();
|
||||||
if (cooldowns.exists(id)) {
|
if (cooldowns.exists(id)) {
|
||||||
if (cooldowns.locked(id)) { //Infinite cooldown
|
if (cooldowns.locked(id)) { //Infinite cooldown (locked)
|
||||||
pl.getText().getNoPermission(sendi);
|
pl.getText().getNoPermission(sendi);
|
||||||
return false;
|
return false;
|
||||||
} else { //Normal cooldown
|
} else { //Normal cooldown
|
||||||
long Left = cooldowns.timeLeft(id);
|
long Left = cooldowns.timeLeft(id);
|
||||||
if (!pl.getPerms().getBypassDelay(p))
|
if (pl.getSettings().delayEnabled && !pl.getPerms().getBypassDelay(p))
|
||||||
Left = Left + delayTimer;
|
Left = Left + delayTimer;
|
||||||
if (Left > 0) {
|
if (Left > 0) {
|
||||||
//Still cooling down
|
//Still cooling down
|
||||||
|
@ -9,6 +9,7 @@ import org.bukkit.Bukkit;
|
|||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.WorldBorder;
|
import org.bukkit.WorldBorder;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.potion.PotionEffectType;
|
||||||
import xyz.xenondevs.particle.ParticleEffect;
|
import xyz.xenondevs.particle.ParticleEffect;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -16,16 +17,14 @@ import java.util.List;
|
|||||||
|
|
||||||
public class CmdInfo implements RTPCommand {
|
public class CmdInfo implements RTPCommand {
|
||||||
|
|
||||||
private String[] subCmds = {
|
|
||||||
"Particles" //Give a list of particles
|
|
||||||
};
|
|
||||||
|
|
||||||
public void execute(CommandSender sendi, String label, String[] args) {
|
public void execute(CommandSender sendi, String label, String[] args) {
|
||||||
if (args.length > 1) {
|
if (args.length > 1) {
|
||||||
if (args[1].equalsIgnoreCase(CmdInfoSub.PARTICLES.name()))
|
if (args[1].equalsIgnoreCase(CmdInfoSub.PARTICLES.name()))
|
||||||
infoParticles(sendi);
|
infoParticles(sendi);
|
||||||
else if (args[1].equalsIgnoreCase(CmdInfoSub.SHAPES.name()))
|
else if (args[1].equalsIgnoreCase(CmdInfoSub.SHAPES.name()))
|
||||||
infoShapes(sendi);
|
infoShapes(sendi);
|
||||||
|
else if (args[1].equalsIgnoreCase(CmdInfoSub.POTION_EFFECTS.name()))
|
||||||
|
infoEffects(sendi);
|
||||||
else
|
else
|
||||||
infoWorlds(sendi);
|
infoWorlds(sendi);
|
||||||
} else
|
} else
|
||||||
@ -33,7 +32,7 @@ public class CmdInfo implements RTPCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum CmdInfoSub { //Sub commands, future expansions
|
enum CmdInfoSub { //Sub commands, future expansions
|
||||||
PARTICLES, SHAPES
|
PARTICLES, SHAPES, POTION_EFFECTS
|
||||||
}
|
}
|
||||||
|
|
||||||
private void infoParticles(CommandSender sendi) {
|
private void infoParticles(CommandSender sendi) {
|
||||||
@ -119,6 +118,24 @@ public class CmdInfo implements RTPCommand {
|
|||||||
sendi.sendMessage(info.toArray(new String[0]));
|
sendi.sendMessage(info.toArray(new String[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void infoEffects(CommandSender sendi) {
|
||||||
|
List<String> info = new ArrayList<>();
|
||||||
|
Main pl = Main.getInstance();
|
||||||
|
|
||||||
|
for (PotionEffectType effect : PotionEffectType.values()) {
|
||||||
|
if (info.isEmpty()) {
|
||||||
|
info.add("&7" + effect.getName() + "&r");
|
||||||
|
} else if (info.size() % 2 == 0) {
|
||||||
|
info.add("&7" + effect.getName() + "&r");
|
||||||
|
} else
|
||||||
|
info.add("&f" + effect.getName() + "&r");
|
||||||
|
}
|
||||||
|
|
||||||
|
info.forEach(str ->
|
||||||
|
info.set(info.indexOf(str), pl.getText().color(str)));
|
||||||
|
sendi.sendMessage(info.toString());
|
||||||
|
}
|
||||||
|
|
||||||
public List<String> tabComplete(CommandSender sendi, String[] args) {
|
public List<String> tabComplete(CommandSender sendi, String[] args) {
|
||||||
List<String> info = new ArrayList<>();
|
List<String> info = new ArrayList<>();
|
||||||
if (args.length == 2) {
|
if (args.length == 2) {
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
package me.SuperRonanCraft.BetterRTP.player.commands.types;
|
||||||
|
|
||||||
|
import me.SuperRonanCraft.BetterRTP.Main;
|
||||||
|
import me.SuperRonanCraft.BetterRTP.player.commands.RTPCommand;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
//Meant to just test particles and effects without actually rtp'ing around the world
|
||||||
|
public class CmdTest implements RTPCommand {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(CommandSender sendi, String label, String[] args) {
|
||||||
|
if (sendi instanceof Player)
|
||||||
|
Main.getInstance().getRTP().getTeleport().afterTeleport((Player) sendi);
|
||||||
|
else
|
||||||
|
sendi.sendMessage("Console is not able to execute this command! Try '/rtp help'");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> tabComplete(CommandSender sendi, String[] args) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean permission(CommandSender sendi) {
|
||||||
|
return Main.getInstance().getPerms().getTest(sendi);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -35,6 +35,10 @@ public class RTP {
|
|||||||
private boolean cancelOnMove, cancelOnDamage;
|
private boolean cancelOnMove, cancelOnDamage;
|
||||||
public HashMap<String, RTP_WORLD_TYPE> world_type = new HashMap<>();
|
public HashMap<String, RTP_WORLD_TYPE> world_type = new HashMap<>();
|
||||||
|
|
||||||
|
public RTPTeleport getTeleport() {
|
||||||
|
return teleport;
|
||||||
|
}
|
||||||
|
|
||||||
public void load() {
|
public void load() {
|
||||||
Default.setup();
|
Default.setup();
|
||||||
FileBasics.FILETYPE config = getPl().getFiles().getType(FileBasics.FILETYPE.CONFIG);
|
FileBasics.FILETYPE config = getPl().getFiles().getType(FileBasics.FILETYPE.CONFIG);
|
||||||
|
@ -47,7 +47,6 @@ public class RTPCooldown {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean exists(UUID id) {
|
public boolean exists(UUID id) {
|
||||||
System.out.println("Exists " + id + " " + cooldowns.containsKey(id));
|
|
||||||
return cooldowns.containsKey(id);
|
return cooldowns.containsKey(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,59 @@
|
|||||||
|
package me.SuperRonanCraft.BetterRTP.player.rtp;
|
||||||
|
|
||||||
|
import me.SuperRonanCraft.BetterRTP.Main;
|
||||||
|
import me.SuperRonanCraft.BetterRTP.references.file.FileBasics;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.potion.PotionEffect;
|
||||||
|
import org.bukkit.potion.PotionEffectType;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class RTPEffects {
|
||||||
|
|
||||||
|
private boolean potionEnabled;
|
||||||
|
private final HashMap<PotionEffectType, Integer> potionEffects = new HashMap<>();
|
||||||
|
private boolean invincibleEnabled;
|
||||||
|
private int invincibleTime;
|
||||||
|
|
||||||
|
void load() {
|
||||||
|
potionEffects.clear();
|
||||||
|
FileBasics.FILETYPE config = FileBasics.FILETYPE.CONFIG;
|
||||||
|
String pre = "Settings.Effects.";
|
||||||
|
potionEnabled = config.getBoolean(pre + "Potions.Enabled");
|
||||||
|
invincibleEnabled = config.getBoolean(pre + "Invincible.Enabled");
|
||||||
|
if (invincibleEnabled)
|
||||||
|
invincibleTime = config.getInt(pre + "Invincible.Seconds");
|
||||||
|
if (potionEnabled) {
|
||||||
|
List<String> list = config.getStringList(pre + "Potions.Types");
|
||||||
|
for (String p : list) {
|
||||||
|
String[] ary = p.split(":");
|
||||||
|
String type = ary[0];
|
||||||
|
PotionEffectType effect = PotionEffectType.getByName(type);
|
||||||
|
if (effect != null) {
|
||||||
|
try {
|
||||||
|
int time = ary.length >= 2 ? Integer.parseInt(ary[1]) : 3;
|
||||||
|
potionEffects.put(effect, time);
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
Main.getInstance().getLogger().info("The potion duration `" + ary[1] + "` is not an integer! Effect removed!");
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
Main.getInstance().getLogger().info("The potion effect `" + type + "` does not exist! " +
|
||||||
|
"Please fix or remove this potion effect! Try '/rtp info potion_effects'");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void giveEffects(Player p) {
|
||||||
|
if (invincibleEnabled)
|
||||||
|
p.setNoDamageTicks(invincibleTime);
|
||||||
|
if (potionEnabled) {
|
||||||
|
List<PotionEffect> effects = new ArrayList<>();
|
||||||
|
for (PotionEffectType e : potionEffects.keySet())
|
||||||
|
effects.add(new PotionEffect(e, potionEffects.get(e), 1, false, false));
|
||||||
|
p.addPotionEffects(effects);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -15,13 +15,15 @@ public class RTPParticles {
|
|||||||
private boolean enabled;
|
private boolean enabled;
|
||||||
private ParticleEffect effect;
|
private ParticleEffect effect;
|
||||||
private String shape;
|
private String shape;
|
||||||
private int radius = 30, precision = 180; //Vector weirdness if allowed to be editable
|
private final int
|
||||||
private double pHeight = 1.75;
|
radius = 30,
|
||||||
|
precision = 180; //Vector weirdness if allowed to be editable
|
||||||
|
private final double pHeight = 1.75;
|
||||||
|
|
||||||
//Some particles act very differently and might not care how they are shaped before animating, ex: EXPLOSION_NORMAL
|
//Some particles act very differently and might not care how they are shaped before animating, ex: EXPLOSION_NORMAL
|
||||||
public static String[] shapeTypes = {
|
public static String[] shapeTypes = {
|
||||||
"SCAN", //Body scan
|
"SCAN", //Body scan
|
||||||
"EXPLOSIVE", //Make an explosive entrance
|
"EXPLODE", //Make an explosive entrance
|
||||||
"TELEPORT" //Startrek type of portal
|
"TELEPORT" //Startrek type of portal
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -35,12 +37,13 @@ public class RTPParticles {
|
|||||||
effect = ParticleEffect.valueOf(type.toUpperCase());
|
effect = ParticleEffect.valueOf(type.toUpperCase());
|
||||||
} catch (IllegalArgumentException | NullPointerException e) {
|
} catch (IllegalArgumentException | NullPointerException e) {
|
||||||
effect = ParticleEffect.ASH;
|
effect = ParticleEffect.ASH;
|
||||||
getPl().getLogger().severe("The particle '" + type + "' doesn't exist! Default particle enabled...");
|
getPl().getLogger().severe("The particle '" + type + "' doesn't exist! Default particle enabled... " +
|
||||||
|
"Try using '/rtp info particles' to get a list of available particles");
|
||||||
}
|
}
|
||||||
shape = config.getString("Settings.Particles.Shape").toUpperCase();
|
shape = config.getString("Settings.Particles.Shape").toUpperCase();
|
||||||
if (!Arrays.asList(shapeTypes).contains(shape)) {
|
if (!Arrays.asList(shapeTypes).contains(shape)) {
|
||||||
getPl().getLogger().severe("The particle shape '" + shape + "' doesn't exist! Default particle shape enabled...");
|
getPl().getLogger().severe("The particle shape '" + shape + "' doesn't exist! Default particle shape enabled...");
|
||||||
getPl().getLogger().severe("Try using one of the following: " + Arrays.asList(shapeTypes).toString());
|
getPl().getLogger().severe("Try using '/rtp info shapes' to get a list of shapes, or: " + Arrays.asList(shapeTypes).toString());
|
||||||
shape = shapeTypes[0];
|
shape = shapeTypes[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -50,7 +53,7 @@ public class RTPParticles {
|
|||||||
try { //Incase the library errors out
|
try { //Incase the library errors out
|
||||||
switch (shape) {
|
switch (shape) {
|
||||||
case "TELEPORT": partTeleport(p); break;
|
case "TELEPORT": partTeleport(p); break;
|
||||||
case "EXPLOSIVE": partExplosion(p); break;
|
case "EXPLODE": partExplosion(p); break;
|
||||||
default: //Super redundant, but... just future proofing
|
default: //Super redundant, but... just future proofing
|
||||||
case "SCAN": partScan(p); break;
|
case "SCAN": partScan(p); break;
|
||||||
}
|
}
|
||||||
@ -78,10 +81,10 @@ public class RTPParticles {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void partExplosion(Player p) { //Particles with a shape and forward velocity
|
private void partExplosion(Player p) { //Particles with a shape and forward velocity
|
||||||
Location loc = p.getLocation().add(new Vector(0, 0, 0));
|
Location loc = p.getLocation().add(new Vector(0, 1, 0));
|
||||||
for (int index = 1; index < precision; index++) {
|
for (int index = 1; index < precision; index++) {
|
||||||
Vector vec = getVecCircle(index, precision, radius);
|
Vector vec = getVecCircle(index, precision, radius);
|
||||||
effect.display(loc.clone().add(vec), vec, 1f, 0, null);
|
effect.display(loc.clone().add(vec), vec, 1.5f, 0, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,18 +7,23 @@ import org.bukkit.Location;
|
|||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.potion.PotionEffect;
|
||||||
|
import org.bukkit.potion.PotionEffectType;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
public class RTPTeleport {
|
public class RTPTeleport {
|
||||||
|
|
||||||
private final RTPParticles particles = new RTPParticles();
|
private final RTPParticles particles = new RTPParticles();
|
||||||
|
private final RTPEffects effects = new RTPEffects();
|
||||||
|
|
||||||
void load() {
|
void load() {
|
||||||
particles.load();
|
particles.load();
|
||||||
|
effects.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
void sendPlayer(final CommandSender sendi, final Player p, final Location loc, final int price,
|
void sendPlayer(final CommandSender sendi, final Player p, final Location loc, final int price,
|
||||||
@ -39,9 +44,7 @@ public class RTPTeleport {
|
|||||||
PaperLib.teleportAsync(p, loc).thenRun(new BukkitRunnable() { //Async teleport
|
PaperLib.teleportAsync(p, loc).thenRun(new BukkitRunnable() { //Async teleport
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (getPl().getText().getSoundsEnabled())
|
afterTeleport(p);
|
||||||
sounds(p);
|
|
||||||
particles.display(p);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@ -52,6 +55,13 @@ public class RTPTeleport {
|
|||||||
}.runTask(getPl());
|
}.runTask(getPl());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void afterTeleport(Player p) {
|
||||||
|
if (getPl().getText().getSoundsEnabled())
|
||||||
|
sounds(p);
|
||||||
|
particles.display(p);
|
||||||
|
effects.giveEffects(p);
|
||||||
|
}
|
||||||
|
|
||||||
private void loadChunks(Location loc) { //Async chunk loading
|
private void loadChunks(Location loc) { //Async chunk loading
|
||||||
List<CompletableFuture<Chunk>> asyncChunks = new ArrayList<>();
|
List<CompletableFuture<Chunk>> asyncChunks = new ArrayList<>();
|
||||||
for (int x = -5; x <= 5; x++) {
|
for (int x = -5; x <= 5; x++) {
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
|
|
||||||
public class Permissions {
|
public class Permissions {
|
||||||
|
|
||||||
private DepPerms depPerms = new DepPerms();
|
private final DepPerms depPerms = new DepPerms();
|
||||||
|
|
||||||
public void register() {
|
public void register() {
|
||||||
depPerms.register();
|
depPerms.register();
|
||||||
@ -52,15 +52,19 @@ public class Permissions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean getBiome(CommandSender sendi) {
|
public boolean getBiome(CommandSender sendi) {
|
||||||
return (perm(pre + "biome", sendi));
|
return perm(pre + "biome", sendi);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getWorld(CommandSender sendi) {
|
public boolean getWorld(CommandSender sendi) {
|
||||||
return (perm(pre + "world", sendi));
|
return perm(pre + "world", sendi);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getSignCreate(CommandSender sendi) {
|
public boolean getSignCreate(CommandSender sendi) {
|
||||||
return (perm(pre + "sign", sendi));
|
return perm(pre + "sign", sendi);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getTest(CommandSender sendi) {
|
||||||
|
return perm(pre + "test", sendi);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getAWorld(CommandSender sendi, String world) {
|
public boolean getAWorld(CommandSender sendi, String world) {
|
||||||
|
@ -33,6 +33,15 @@ Settings:
|
|||||||
Type: 'REVERSE_PORTAL' #list of particle types at https://github.com/ByteZ1337/ParticleLib/blob/master/src/main/java/xyz/xenondevs/particle/ParticleEffect.java
|
Type: 'REVERSE_PORTAL' #list of particle types at https://github.com/ByteZ1337/ParticleLib/blob/master/src/main/java/xyz/xenondevs/particle/ParticleEffect.java
|
||||||
Amount: 180
|
Amount: 180
|
||||||
Shape: 'SCAN' #Types available are "Scan, Teleport and Explosive"
|
Shape: 'SCAN' #Types available are "Scan, Teleport and Explosive"
|
||||||
|
Effects:
|
||||||
|
Invincible: #Amount of time a player should not take damage for
|
||||||
|
Enabled: true
|
||||||
|
Seconds: 5
|
||||||
|
Potions:
|
||||||
|
Enabled: true
|
||||||
|
Types:
|
||||||
|
- 'Blindness:60'
|
||||||
|
- 'Invisibility:60'
|
||||||
DisableUpdater: false
|
DisableUpdater: false
|
||||||
|
|
||||||
Default:
|
Default:
|
||||||
|
@ -39,4 +39,7 @@ permissions:
|
|||||||
default: op
|
default: op
|
||||||
betterrtp.updater:
|
betterrtp.updater:
|
||||||
description: Get notification on new updates
|
description: Get notification on new updates
|
||||||
|
default: op
|
||||||
|
betterrtp.test:
|
||||||
|
description: While debugger enabled, be able to test particles, potion effects and sounds
|
||||||
default: op
|
default: op
|
@ -52,4 +52,7 @@ permissions:
|
|||||||
default: op
|
default: op
|
||||||
betterrtp.info:
|
betterrtp.info:
|
||||||
description: View info about all worlds rtp will work in
|
description: View info about all worlds rtp will work in
|
||||||
|
default: op
|
||||||
|
betterrtp.test:
|
||||||
|
description: While debugger enabled, be able to test particles, potion effects and sounds
|
||||||
default: op
|
default: op
|
Loading…
x
Reference in New Issue
Block a user