Renamed classes for standardization.

This commit is contained in:
Steven Lawson 2011-10-02 00:23:22 -04:00
parent ff88c7bffe
commit 36e7de0a08
6 changed files with 29 additions and 29 deletions

View file

@ -13,12 +13,12 @@ import org.bukkit.event.block.BlockListener;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.inventory.ItemStack;
public class TotalFreedomModBlockListener extends BlockListener
public class TFM_BlockListener extends BlockListener
{
public static TotalFreedomMod plugin;
private static final Logger log = Logger.getLogger("Minecraft");
TotalFreedomModBlockListener(TotalFreedomMod instance)
TFM_BlockListener(TotalFreedomMod instance)
{
plugin = instance;
}
@ -67,7 +67,7 @@ public class TotalFreedomModBlockListener extends BlockListener
return;
}
TFUserInfo playerdata = (TFUserInfo) plugin.userinfo.get(p);
TFM_UserInfo playerdata = (TFM_UserInfo) plugin.userinfo.get(p);
if (playerdata != null)
{
playerdata.incrementBlockDestroyCount();
@ -86,7 +86,7 @@ public class TotalFreedomModBlockListener extends BlockListener
}
else
{
playerdata = new TFUserInfo();
playerdata = new TFM_UserInfo();
playerdata.incrementBlockDestroyCount();
plugin.userinfo.put(p, playerdata);
}

View file

@ -7,11 +7,11 @@ import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.event.entity.EntityListener;
import org.bukkit.event.entity.ExplosionPrimeEvent;
public class TotalFreedomModEntityListener extends EntityListener
public class TFM_EntityListener extends EntityListener
{
public static TotalFreedomMod plugin;
TotalFreedomModEntityListener(TotalFreedomMod instance)
TFM_EntityListener(TotalFreedomMod instance)
{
plugin = instance;
}

View file

@ -13,12 +13,12 @@ import org.bukkit.event.player.PlayerListener;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.inventory.ItemStack;
class TotalFreedomModPlayerListener extends PlayerListener
class TFM_PlayerListener extends PlayerListener
{
public static TotalFreedomMod plugin;
private static final Logger log = Logger.getLogger("Minecraft");
TotalFreedomModPlayerListener(TotalFreedomMod instance)
TFM_PlayerListener(TotalFreedomMod instance)
{
plugin = instance;
}
@ -74,7 +74,7 @@ class TotalFreedomModPlayerListener extends PlayerListener
}
else
{
TFUserInfo playerdata = (TFUserInfo) plugin.userinfo.get(p);
TFM_UserInfo playerdata = (TFM_UserInfo) plugin.userinfo.get(p);
if (playerdata != null)
{
if (playerdata.isFrozen())
@ -107,7 +107,7 @@ class TotalFreedomModPlayerListener extends PlayerListener
{
Player p = event.getPlayer();
TFUserInfo playerdata = (TFUserInfo) plugin.userinfo.get(p);
TFM_UserInfo playerdata = (TFM_UserInfo) plugin.userinfo.get(p);
if (playerdata != null)
{
playerdata.incrementMsgCount();
@ -124,7 +124,7 @@ class TotalFreedomModPlayerListener extends PlayerListener
}
else
{
playerdata = new TFUserInfo();
playerdata = new TFM_UserInfo();
playerdata.incrementMsgCount();
plugin.userinfo.put(p, playerdata);
}

View file

@ -4,25 +4,25 @@ import java.util.Comparator;
import org.bukkit.Location;
import org.bukkit.entity.Player;
public class RadarData implements Comparator<RadarData>
public class TFM_RadarData implements Comparator<TFM_RadarData>
{
Player player;
double distance;
Location location;
public RadarData(Player inplayer, double indistance, Location inlocation)
public TFM_RadarData(Player inplayer, double indistance, Location inlocation)
{
this.player = inplayer;
this.distance = indistance;
this.location = inlocation;
}
public RadarData()
public TFM_RadarData()
{
}
@Override
public int compare(RadarData t1, RadarData t2)
public int compare(TFM_RadarData t1, TFM_RadarData t2)
{
if (t1.distance > t2.distance)
{

View file

@ -1,12 +1,12 @@
package me.StevenLawson.TotalFreedomMod;
public class TFUserInfo
public class TFM_UserInfo
{
private boolean user_frozen = false;
private int msg_count = 0;
private int bd_count = 0;
public TFUserInfo()
public TFM_UserInfo()
{
}

View file

@ -29,9 +29,9 @@ public class TotalFreedomMod extends JavaPlugin
{
public TotalFreedomMod tfm = this;
private final TotalFreedomModEntityListener entityListener = new TotalFreedomModEntityListener(this);
private final TotalFreedomModBlockListener blockListener = new TotalFreedomModBlockListener(this);
private final TotalFreedomModPlayerListener playerListener = new TotalFreedomModPlayerListener(this);
private final TFM_EntityListener entityListener = new TFM_EntityListener(this);
private final TFM_BlockListener blockListener = new TFM_BlockListener(this);
private final TFM_PlayerListener playerListener = new TFM_PlayerListener(this);
private static final Logger log = Logger.getLogger("Minecraft");
@ -775,17 +775,17 @@ public class TotalFreedomMod extends JavaPlugin
Location sender_pos = sender_player.getLocation();
String sender_world = sender_player.getWorld().getName();
List<RadarData> radar_data = new ArrayList<RadarData>();
List<TFM_RadarData> radar_data = new ArrayList<TFM_RadarData>();
for (Player p : Bukkit.getOnlinePlayers())
{
if (sender_world.equals(p.getWorld().getName()) && !p.getName().equals(sender.getName()))
{
radar_data.add(new RadarData(p, sender_pos.distance(p.getLocation()), p.getLocation()));
radar_data.add(new TFM_RadarData(p, sender_pos.distance(p.getLocation()), p.getLocation()));
}
}
Collections.sort(radar_data, new RadarData());
Collections.sort(radar_data, new TFM_RadarData());
sender.sendMessage(ChatColor.YELLOW + "People nearby in " + sender_world + ":");
@ -796,7 +796,7 @@ public class TotalFreedomMod extends JavaPlugin
}
int count = 0;
for (RadarData i : radar_data)
for (TFM_RadarData i : radar_data)
{
if (count++ > countmax)
{
@ -952,14 +952,14 @@ public class TotalFreedomMod extends JavaPlugin
}
else if (mode.equals("fr"))
{
TFUserInfo playerdata = (TFUserInfo) this.userinfo.get(p);
TFM_UserInfo playerdata = (TFM_UserInfo) this.userinfo.get(p);
if (playerdata != null)
{
playerdata.setFrozen(!playerdata.isFrozen());
}
else
{
playerdata = new TFUserInfo();
playerdata = new TFM_UserInfo();
playerdata.setFrozen(true);
this.userinfo.put(p, playerdata);
}
@ -1024,14 +1024,14 @@ public class TotalFreedomMod extends JavaPlugin
p = matches.get(0);
}
TFUserInfo playerdata = (TFUserInfo) this.userinfo.get(p);
TFM_UserInfo playerdata = (TFM_UserInfo) this.userinfo.get(p);
if (playerdata != null)
{
playerdata.setFrozen(!playerdata.isFrozen());
}
else
{
playerdata = new TFUserInfo();
playerdata = new TFM_UserInfo();
playerdata.setFrozen(true);
this.userinfo.put(p, playerdata);
}
@ -1218,7 +1218,7 @@ public class TotalFreedomMod extends JavaPlugin
{
for (Player p : Bukkit.getOnlinePlayers())
{
TFUserInfo playerdata = (TFUserInfo) this.userinfo.get(p);
TFM_UserInfo playerdata = (TFM_UserInfo) this.userinfo.get(p);
if (playerdata != null)
{
playerdata.resetMsgCount();