Added world restrictions

This commit is contained in:
travja 2012-08-25 10:09:49 -06:00
parent 368b69f0f2
commit 73e7050762
38 changed files with 1035 additions and 971 deletions

View File

@ -2,7 +2,7 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="lib" path="C:/Users/Travja/Documents/Projects/Vault.jar"/>
<classpathentry kind="lib" path="C:/Users/Travja/Downloads/bukkit-1.3.1-R1.1-20120809.005103-3.jar"/>
<classpathentry kind="lib" path="C:/Users/Travja/Documents/Plugins/Vault.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

Binary file not shown.

View File

@ -1,41 +1,90 @@
# default config.yml
#config version for us devs. DONT CHANGE THIS, or it will screw up some things PRETTY badly.
config:
version: 1.3
######################################
######## Game Configuration #########
######################################
# The world(s) that all HA features are restricted to.
# If left blank all worlds will be allowed.
# ie:
# worlds:
# - world
# - world_nether
worlds:
# Message to display when the games start
Start_Message: '&bLet The Games Begin!'
# If the games should automatically restart at the end
Auto_Restart: 'false'
# If it should automatically start the countdown on warping
Auto_Start: 'false'
# If tributes need to type /ha confirm to join
Need_Confirm: 'true'
# Not yet implemented
iConomy_Support: 'false'
# Whether or not the countdown will start upon warping.
Countdown: 'true'
# Whether or not players can break blocks while playing
Protected_Arena: 'true'
# Whether or not players will be frozen when they are teleported to their positions
Frozen_Teleport: 'true'
# If the Tributes will get blown to bits when stepping off the pedestal
Explode_on_Move: 'false'
# Whether or not thunder will sound upon a players death
Cannon_Death: 'true'
######################################
######################################
######################################
################################
###### Rewards/Sponsoring ######
################################
# What the reward for winning is
Reward:
ID: 264
Amount: 10
# True means give money to winner, false means don't.
eco:
enabled: false
reward: 100
# How much money to give the winner.
# What sponsors have to pay to sponsor tributes
Sponsor_Cost:
ID: 264
Amount: 1
# Whether or not the countdown will start upon warping.
Countdown: 'true'
Spawn_coords: 100,100,100,world
################################
################################
################################
#############################
####### Chat Related ########
#############################
# If players will only talk to close players of the whole server
ChatClose: 'true'
ChatClose: 'false'
# How close the players have to be to talk to them
ChatClose_Radius: 10
# Whether or not players can break blocks while playing
Protected_Arena: 'true'
# Whether or not players will be frozen when they are teleported to their positions
Frozen_Teleport: 'true'
# If the Tributes will get blown to bits when stepping off the pedestal
Explode_on_Move: 'false'
# Whether or not thunder will sound upon a players death
Cannon_Death: 'true'
#############################
#############################
#############################
########################
####### Spawns #########
########################
Spawn_coords: 100,100,100,world
# If /ha setspawn has been run
Spawn_set: 'false'
Tribute_one_spawn: 100,100,100
Tribute_two_spawn: 100,100,100
Tribute_three_spawn: 100,100,100
@ -60,12 +109,9 @@ Tribute_twentyone_spawn: 100,100,100
Tribute_twentytwo_spawn: 100,100,100
Tribute_twentythree_spawn: 100,100,100
Tribute_twentyfour_spawn: 100,100,100
# If /ha setspawn has been run
Spawn_set: 'false'
# True means give money to winner, false means don't.
eco:
enabled: false
reward: 100
# How much money to give the winner.
########################
########################
########################
# Leave this. :)
Blocks_Destroyed:

View File

@ -25,34 +25,36 @@ public class Chests implements Listener {
Block block = event.getClickedBlock();
Player p = event.getPlayer();
if(p.getItemInHand().getType()== Material.BLAZE_ROD && event.getAction() == Action.LEFT_CLICK_BLOCK){
if(block.getState() instanceof Chest){
if(p.hasPermission("HungerArena.Chest.Store")){
ItemStack[] itemsinchest = ((Chest) block.getState()).getInventory().getContents();
int blockx = block.getX();
int blocky = block.getY();
int blockz = block.getZ();
String blockw = block.getWorld().getName().toString();
if(!plugin.getConfig().contains("Storage." + blockx + "," + blocky + "," + blockz + ".Location.X")){
plugin.getConfig().addDefault("Storage." + blockx + "," + blocky + "," + blockz + ".Location.X", blockx);
plugin.getConfig().addDefault("Storage." + blockx + "," + blocky + "," + blockz + ".Location.Y", blocky);
plugin.getConfig().addDefault("Storage." + blockx + "," + blocky + "," + blockz + ".Location.Z",blockz);
plugin.getConfig().addDefault("Storage." + blockx + "," + blocky + "," + blockz + ".Location.W", blockw);
plugin.getConfig().addDefault("Storage." + blockx + "," + blocky + "," + blockz + ".ItemsInStorage", itemsinchest);
if(!plugin.restricted || (plugin.restricted && plugin.config.getStringList("worlds").contains(p.getWorld().toString()))){
if(block.getState() instanceof Chest){
if(p.hasPermission("HungerArena.Chest.Store")){
ItemStack[] itemsinchest = ((Chest) block.getState()).getInventory().getContents();
int blockx = block.getX();
int blocky = block.getY();
int blockz = block.getZ();
String blockw = block.getWorld().getName().toString();
if(!plugin.getConfig().contains("Storage." + blockx + "," + blocky + "," + blockz + ".Location.X")){
plugin.getConfig().addDefault("Storage." + blockx + "," + blocky + "," + blockz + ".Location.X", blockx);
plugin.getConfig().addDefault("Storage." + blockx + "," + blocky + "," + blockz + ".Location.Y", blocky);
plugin.getConfig().addDefault("Storage." + blockx + "," + blocky + "," + blockz + ".Location.Z",blockz);
plugin.getConfig().addDefault("Storage." + blockx + "," + blocky + "," + blockz + ".Location.W", blockw);
plugin.getConfig().addDefault("Storage." + blockx + "," + blocky + "," + blockz + ".ItemsInStorage", itemsinchest);
}else{
plugin.getConfig().set("Storage." + blockx + "," + blocky+ "," + blockz + ".Location.X",blockx);
plugin.getConfig().set("Storage." + blockx + "," + blocky + "," + blockz + ".Location.Y", blocky);
plugin.getConfig().set("Storage." + blockx + "," + blocky + "," + blockz + ".Location.Z", blockz);
plugin.getConfig().set("Storage." + blockx + "," + blocky + "," + blockz + ".Location.W", blockw);
plugin.getConfig().set("Storage." + blockx + "," + blocky + "," + blockz + ".ItemsInStorage", itemsinchest);
}
List<String> list2 = plugin.getConfig().getStringList("StorageXYZ");
list2.add(blockx + "," + blocky + "," + blockz);
plugin.getConfig().set("StorageXYZ", list2);
plugin.getConfig().options().copyDefaults(true);
plugin.saveConfig();
p.sendMessage(ChatColor.GREEN + "Chest Stored!");
}else{
plugin.getConfig().set("Storage." + blockx + "," + blocky+ "," + blockz + ".Location.X",blockx);
plugin.getConfig().set("Storage." + blockx + "," + blocky + "," + blockz + ".Location.Y", blocky);
plugin.getConfig().set("Storage." + blockx + "," + blocky + "," + blockz + ".Location.Z", blockz);
plugin.getConfig().set("Storage." + blockx + "," + blocky + "," + blockz + ".Location.W", blockw);
plugin.getConfig().set("Storage." + blockx + "," + blocky + "," + blockz + ".ItemsInStorage", itemsinchest);
p.sendMessage(ChatColor.RED + "You don't have permission to store chests!");
}
List<String> list2 = plugin.getConfig().getStringList("StorageXYZ");
list2.add(blockx + "," + blocky + "," + blockz);
plugin.getConfig().set("StorageXYZ", list2);
plugin.getConfig().options().copyDefaults(true);
plugin.saveConfig();
p.sendMessage(ChatColor.GREEN + "Chest Stored!");
}else{
p.sendMessage(ChatColor.RED + "You don't have permission to store chests!");
}
}
}
@ -75,9 +77,9 @@ public class Chests implements Listener {
plugin.saveConfig();
p.sendMessage("Chest Removed!");
} else {
event.setCancelled(true);
p.sendMessage(ChatColor.RED + "[HungerArena] That's a storage chest! You don't have permission to break it!");
}
event.setCancelled(true);
p.sendMessage(ChatColor.RED + "[HungerArena] That's a storage chest! You don't have permission to break it!");
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -41,6 +41,7 @@ public class Main extends JavaPlugin{
public CommandExecutor SpawnsCommand = new SpawnsCommand(this);
public boolean canjoin;
public boolean exists;
public boolean restricted;
public FileConfiguration config;
public ItemStack Reward;
public ItemStack Cost;
@ -89,6 +90,11 @@ public class Main extends JavaPlugin{
}
Reward = new ItemStack(config.getInt("Reward.ID"), config.getInt("Reward.Amount"));
Cost = new ItemStack(config.getInt("Sponsor_Cost.ID"), config.getInt("Sponsor_Cost.Amount"));
if(config.getStringList("worlds").isEmpty()){
restricted = false;
}else if(!config.getStringList("worlds").isEmpty()){
restricted = true;
}
}
public void onDisable(){

View File

@ -18,222 +18,228 @@ public class SpawnsCommand implements CommandExecutor {
Player p = (Player) sender;
if(cmd.getName().equalsIgnoreCase("StartPoint")){
if(p.hasPermission("HungerArena.StartPoint")){
Location ploc = p.getLocation().getBlock().getLocation();
if(args[0].equalsIgnoreCase("1")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_one_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute one!");
}
if(args[0].equalsIgnoreCase("2")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_two_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute two!");
}
if(args[0].equalsIgnoreCase("3")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_three_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute three!");
}
if(args[0].equalsIgnoreCase("4")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_four_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute four!");
}
if(args[0].equalsIgnoreCase("5")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_five_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute five!");
}
if(args[0].equalsIgnoreCase("6")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_six_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute six!");
}
if(args[0].equalsIgnoreCase("7")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_seven_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute seven!");
}
if(args[0].equalsIgnoreCase("8")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_eight_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute eight!");
}
if(args[0].equalsIgnoreCase("9")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_nine_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute nine!");
}
if(args[0].equalsIgnoreCase("10")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_ten_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute ten!");
}
if(args[0].equalsIgnoreCase("11")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_eleven_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute eleven!");
}
if(args[0].equalsIgnoreCase("12")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_twelve_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twelve!");
}
if(args[0].equalsIgnoreCase("13")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_thirteen_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute thirteen!");
}
if(args[0].equalsIgnoreCase("14")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_fourteen_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute fourteen!");
}
if(args[0].equalsIgnoreCase("15")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_fifteen_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute fifteen!");
}
if(args[0].equalsIgnoreCase("16")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_sixteen_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute sixteen!");
}
if(args[0].equalsIgnoreCase("17")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_seventeen_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute seventeen!");
}
if(args[0].equalsIgnoreCase("18")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_eighteen_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute eighteen!");
}
if(args[0].equalsIgnoreCase("19")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_nineteen_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute nineteen!");
}
if(args[0].equalsIgnoreCase("20")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_twenty_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twenty!");
}
if(args[0].equalsIgnoreCase("21")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_twentyone_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentyone!");
}
if(args[0].equalsIgnoreCase("22")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_twentytwo_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentytwo!");
}
if(args[0].equalsIgnoreCase("23")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_twentythree_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentythree!");
}
if(args[0].equalsIgnoreCase("24")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_twentyfour_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentyfour!");
if(!plugin.restricted || (plugin.restricted && plugin.config.getStringList("worlds").contains(p.getWorld().toString()))){
if(plugin.restricted && !plugin.config.getStringList("worlds").contains(p.getWorld().toString())){
p.sendMessage(ChatColor.GOLD + "We ran the command, however, this isn't a world you defined in the config...");
p.sendMessage(ChatColor.GOLD + "If this is the right world, please disregard this message.");
}
Location ploc = p.getLocation().getBlock().getLocation();
if(args[0].equalsIgnoreCase("1")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_one_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute one!");
}
if(args[0].equalsIgnoreCase("2")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_two_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute two!");
}
if(args[0].equalsIgnoreCase("3")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_three_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute three!");
}
if(args[0].equalsIgnoreCase("4")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_four_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute four!");
}
if(args[0].equalsIgnoreCase("5")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_five_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute five!");
}
if(args[0].equalsIgnoreCase("6")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_six_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute six!");
}
if(args[0].equalsIgnoreCase("7")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_seven_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute seven!");
}
if(args[0].equalsIgnoreCase("8")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_eight_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute eight!");
}
if(args[0].equalsIgnoreCase("9")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_nine_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute nine!");
}
if(args[0].equalsIgnoreCase("10")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_ten_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute ten!");
}
if(args[0].equalsIgnoreCase("11")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_eleven_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute eleven!");
}
if(args[0].equalsIgnoreCase("12")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_twelve_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twelve!");
}
if(args[0].equalsIgnoreCase("13")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_thirteen_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute thirteen!");
}
if(args[0].equalsIgnoreCase("14")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_fourteen_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute fourteen!");
}
if(args[0].equalsIgnoreCase("15")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_fifteen_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute fifteen!");
}
if(args[0].equalsIgnoreCase("16")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_sixteen_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute sixteen!");
}
if(args[0].equalsIgnoreCase("17")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_seventeen_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute seventeen!");
}
if(args[0].equalsIgnoreCase("18")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_eighteen_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute eighteen!");
}
if(args[0].equalsIgnoreCase("19")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_nineteen_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute nineteen!");
}
if(args[0].equalsIgnoreCase("20")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_twenty_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twenty!");
}
if(args[0].equalsIgnoreCase("21")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_twentyone_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentyone!");
}
if(args[0].equalsIgnoreCase("22")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_twentytwo_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentytwo!");
}
if(args[0].equalsIgnoreCase("23")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_twentythree_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentythree!");
}
if(args[0].equalsIgnoreCase("24")){
double x = ploc.getX();
double y = ploc.getY();
double z = ploc.getZ();
String w = ploc.getWorld().getName();
plugin.config.set("Tribute_twentyfour_spawn", x + "," + y + "," + z + "," + w);
plugin.saveConfig();
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentyfour!");
}
}
}else{
p.sendMessage(ChatColor.RED + "You don't have permission!");

View File

@ -17,7 +17,7 @@ public class TeleportListener implements Listener {
this.plugin = m;
}
@EventHandler
/*@EventHandler Unwanted right now...
public void onTP(PlayerTeleportEvent evt) {
@SuppressWarnings("unused")
Player p = evt.getPlayer();
@ -32,6 +32,6 @@ public class TeleportListener implements Listener {
return;
}
evt.setCancelled(true);
}
}*/
}