Skip to content

Commit

Permalink
Spawns set with /spawn are now updated live.
Browse files Browse the repository at this point in the history
  • Loading branch information
ShakeforProtein committed Jul 6, 2020
1 parent 1e42a70 commit 986273c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 26 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.ShakeforProtein</groupId>
<artifactId>TreeboTeleport</artifactId>
<version>1.0.0 - SpMc1.16.1</version>
<version>1.0.1 - SpMc1.16.1</version>
<packaging>jar</packaging>

<name>TreeboTeleport</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public boolean execute(CommandSender sender, String label, String[] args) {
this.setPermission("tbteleport.player.spawn");
if (sender.hasPermission(this.getPermission())) {

if (spawnsHash.isEmpty()) {
//if (spawnsHash.isEmpty()) {
File spawnsYml = new File(pl.getDataFolder(), File.separator + "spawns.yml");

if (!spawnsYml.exists()) {
Expand Down Expand Up @@ -68,7 +68,7 @@ public boolean execute(CommandSender sender, String label, String[] args) {
Location worldSpawn = new Location(Bukkit.getWorld(world), x, y, z, yaw, pitch);
spawnsHash.putIfAbsent(key, worldSpawn);
}
}
//}
Player p = (Player) sender;


Expand Down
46 changes: 26 additions & 20 deletions src/main/java/me/shakeforprotein/treeboteleport/TreeboTeleport.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public final class TreeboTeleport extends JavaPlugin {
public List<String> serverListNew = new ArrayList<>();

private AddMaxHomes addMaxHomes = new AddMaxHomes(this);
private Back back = new Back(this);
private Bed bed = new Bed(this);
private ClearMyChat clearMyChat = new ClearMyChat(this);
private ConfigureHomes configureHomes = new ConfigureHomes(this);
Expand All @@ -59,18 +58,14 @@ public final class TreeboTeleport extends JavaPlugin {
private DeleteWarp deleteWarp = new DeleteWarp(this);
private DisableTpSafety disableTpSafety = new DisableTpSafety(this);
private GetWorldSpawn getWorldSpawn = new GetWorldSpawn(this);
private GiveHubItem giveHubItem = new GiveHubItem(this);
private Home home = new Home(this);
private Homes homes = new Homes(this);
private Hub hub = new Hub(this);
private MayITp mayITp = new MayITp(this);
private NameIt nameIt = new NameIt(this);
private Reload reload = new Reload(this);
private RestorePlayerInventory restorePlayerInventory = new RestorePlayerInventory(this);
private SaveConfig saveConfig = new SaveConfig(this);
private SendSpawn sendSpawn = new SendSpawn(this);
private SetShop setShop = new SetShop(this);
private SetHome setHome = new SetHome(this);

private SetTTeleCooldown setTTeleCooldown = new SetTTeleCooldown(this);
private SetVanillaWorldSpawn setVanillaWorldSpawn = new SetVanillaWorldSpawn(this);
private SetWarp setWarp = new SetWarp(this);
Expand All @@ -80,19 +75,28 @@ public final class TreeboTeleport extends JavaPlugin {
private Spawn spawn = new Spawn(this);
//private ToggleDeathDocket toggleDeathDocket = new ToggleDeathDocket(this);
private Tp tp = new Tp(this);
private Top top = new Top(this);
private Tp2Me tp2Me = new Tp2Me(this);
private Tp2MePls tp2MePls = new Tp2MePls(this);

private Tp2Player tp2Player = new Tp2Player(this);
private Tp2Pos tp2Pos = new Tp2Pos(this);
private Tp2WorldAt tp2WorldAt = new Tp2WorldAt(this);
private TpNo tpNo = new TpNo(this);
private TpOk tpOk = new TpOk(this);
private TpToggle tpToggle = new TpToggle(this);
private Version version = new Version(this);
private WarpTo warpTo = new WarpTo(this);
private Wild2 wild = new Wild2(this);
private JoinServerAtWorld jsaw = new JoinServerAtWorld(this);
//Remove these for hardcore
private TpNo tpNo = new TpNo(this);
private TpOk tpOk = new TpOk(this);
private TpToggle tpToggle = new TpToggle(this);
private Top top = new Top(this);
private Tp2MePls tp2MePls = new Tp2MePls(this);
private Back back = new Back(this);
private GiveHubItem giveHubItem = new GiveHubItem(this);
private Home home = new Home(this);
private Homes homes = new Homes(this);
private MayITp mayITp = new MayITp(this);
private SetHome setHome = new SetHome(this);
//remove above for hardcore
public static List<String> fullPlayerList = new ArrayList<>();
private BungeeSend bungeeSend = new BungeeSend(this);

Expand Down Expand Up @@ -198,7 +202,6 @@ public void onEnable() {
*/

addMaxHomes.register("AddMaxHomes");
back.register("Back");
bed.register("Bed");
clearMyChat.register("ClearMyChat");
configureHomes.register("ConfigureHomes");
Expand All @@ -212,19 +215,12 @@ public void onEnable() {
disableTpSafety.register("ToggleTpSafety");
getWorldSpawn.register("gws");
getWorldSpawn.register("GetWorldSpawn");
giveHubItem.register("GiveHubItem");
home.register("Home");
homes.register("Homes");
hub.register("Hub");
mayITp.register("MayITp");
mayITp.register("tpa");
mayITp.register("tpask");
nameIt.register("NameIt");
reload.register("ttelereload");
restorePlayerInventory.register("RestorePlayerInventory");
saveConfig.register("ttelesaveconfig");
sendSpawn.register("SendSpawn");
setHome.register("SetHome");
setShop.register("SetShop");
setTTeleCooldown.register("SetTTeleCoolDown");
setVanillaWorldSpawn.register("SetVanillaWorldSpawn");
Expand All @@ -241,18 +237,28 @@ public void onEnable() {
}
tp2Me.register("tp2me");
tp2Me.register("tphere");
//disable these for hardcore
back.register("Back");
giveHubItem.register("GiveHubItem");
home.register("Home");
homes.register("Homes");
mayITp.register("MayITp");
mayITp.register("tpa");
mayITp.register("tpask");
setHome.register("SetHome");
tp2MePls.register("tp2mePls");
tp2MePls.register("tpahere");
tpNo.register("tpno");
tpNo.register("tpdeny");
tpOk.register("tpok");
tpOk.register("tpyes");
tpToggle.register("tptoggle");
top.register("top");
//disable above for hardcore
version.register("tteleversion");
warpTo.register("warp");
warpTo.register("warps");
wild.register("wild");
top.register("top");
jsaw.register("jsaw");
//tp2Player.register

Expand Down

0 comments on commit 986273c

Please sign in to comment.