Fixed some code

This commit is contained in:
Travis Eggett 2012-07-17 15:58:45 -06:00
parent fe0bec9ac9
commit 50f7c905ec
72 changed files with 92 additions and 13 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,66 @@
# default config.yml
#config version for us devs. DONT CHANGE THIS, or it will screw up some things PRETTY badly.
config:
version: 1.3
# 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'
# What the reward for winning is
Reward:
ID: 264
Amount: 10
# 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
# If players will only talk to close players of the whole server
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'
# Whether or not thunder will sound upon a players death
Cannon_Death: 'true'
Tribute_one_spawn: 100,100,100
Tribute_two_spawn: 100,100,100
Tribute_three_spawn: 100,100,100
Tribute_four_spawn: 100,100,100
Tribute_five_spawn: 100,100,100
Tribute_six_spawn: 100,100,100
Tribute_seven_spawn: 100,100,100
Tribute_eight_spawn: 100,100,100
Tribute_nine_spawn: 100,100,100
Tribute_ten_spawn: 100,100,100
Tribute_eleven_spawn: 100,100,100
Tribute_twelve_spawn: 100,100,100
Tribute_thirteen_spawn: 100,100,100
Tribute_fourteen_spawn: 100,100,100
Tribute_fifteen_spawn: 100,100,100
Tribute_sixteen_spawn: 100,100,100
Tribute_seventeen_spawn: 100,100,100
Tribute_eighteen_spawn: 100,100,100
Tribute_nineteen_spawn: 100,100,100
Tribute_twenty_spawn: 100,100,100
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

@ -0,0 +1,12 @@
name: HungerArena
main: me.travja.hungerarena.Main
version: 1.3alpha
description: A lightweight and powerful plugin to help with playing The Hunger Games!
softdepend: [Vault]
commands:
Ha:
description: Base command for HungerArena!
StartPoint:
description: Set the starting points for tributes.
Sponsor:
description: Sponsor a tribute.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -30,8 +30,7 @@ public class DeathListener implements Listener{
}
}
@EventHandler
@SuppressWarnings("SizeReplaceableByIsEmpty")
public void onPlayerDeath(PlayerDeathEvent event){
public void onPlayerDeath(PlayerDeathEvent event){
Player p = event.getEntity();
Server s = p.getServer();
String pname = p.getName();

View File

@ -1,4 +1,4 @@
package me.travja.hungerarena;
package me.Travja.HungerArena;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;

View File

@ -20,6 +20,7 @@ public class HaCommands implements CommandExecutor {
this.plugin = m;
}
int i = 0;
@SuppressWarnings("unchecked")
@Override
public boolean onCommand(final CommandSender sender, Command cmd, String commandLabel, String[] args){
String[] Spawncoords = plugin.config.getString("Spawn_coords").split(",");
@ -231,7 +232,7 @@ public class HaCommands implements CommandExecutor {
winner.getInventory().setHelmet(null);
winner.getInventory().setLeggings(null);
winner.getInventory().addItem(plugin.Reward);
Bukkit.getServer().getPluginManager().callEvent(new PlayerWinGamesEvent(winner));
Bukkit.getServer().getPluginManager().callEvent(new PlayerWinGamesEvent(winner));
plugin.Playing.clear();
//Show spectators
String s = plugin.Watching.get(i++);

View File

@ -1,4 +1,4 @@
package me.travja.hungerarena;
package me.Travja.HungerArena;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;

View File

@ -1,4 +1,4 @@
package me.travja.hungerarena;
package me.Travja.HungerArena;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;

View File

@ -1,4 +1,4 @@
package me.travja.hungerarena;
package me.Travja.HungerArena;
import org.bukkit.ChatColor;
import org.bukkit.Material;

View File

@ -1,4 +1,4 @@
package me.travja.hungerarena;
package me.Travja.HungerArena;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;

View File

@ -1,4 +1,4 @@
package me.travja.hungerarena;
package me.Travja.HungerArena;
import org.bukkit.ChatColor;
import org.bukkit.Location;

View File

@ -1,4 +1,4 @@
package me.travja.hungerarena;
package me.Travja.HungerArena;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;

View File

@ -1,4 +1,4 @@
package me.travja.hungerarena;
package me.Travja.HungerArena;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@ -19,7 +19,8 @@ public class TeleportListener implements Listener {
@EventHandler
public void onTP(PlayerTeleportEvent evt) {
Player p = evt.getPlayer();
@SuppressWarnings("unused")
Player p = evt.getPlayer();
TeleportCause tc = evt.getCause();
if (tc == TeleportCause.ENDER_PEARL) {
return;

View File

@ -1,4 +1,4 @@
package me.travja.hungerarena;
package me.Travja.HungerArena;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;