Archiviert
13
0

Fixed a bunch of warnings.

Dieser Commit ist enthalten in:
Lymia 2011-01-02 00:36:27 -06:00
Ursprung ce271f8abc
Commit 32224b916d
5 geänderte Dateien mit 24 neuen und 30 gelöschten Zeilen

Datei anzeigen

@ -2,8 +2,6 @@ package net.minecraft.server;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
@ -11,7 +9,6 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
@ -22,7 +19,7 @@ public class MinecraftServer
implements ICommandListener, Runnable {
public static Logger a = Logger.getLogger("Minecraft");
public static HashMap b = new HashMap();
public static HashMap<String, Integer> b = new HashMap<String, Integer>();
public NetworkListenThread c;
public PropertyManager d;
public WorldServer e;
@ -32,8 +29,8 @@ implements ICommandListener, Runnable {
int h;
public String i;
public int j;
private List p;
private List q;
private List<IUpdatePlayerListBox> p;
private List<ServerCommand> q;
public EntityTracker k;
public boolean l;
public boolean m;
@ -45,8 +42,8 @@ implements ICommandListener, Runnable {
o = true;
g = false;
h = 0;
p = new ArrayList();
q = Collections.synchronizedList(new ArrayList());
p = new ArrayList<IUpdatePlayerListBox>();
q = Collections.synchronizedList(new ArrayList<ServerCommand>());
new ThreadSleepForever(this);
}
@ -212,9 +209,9 @@ implements ICommandListener, Runnable {
}
private void h() {
ArrayList arraylist = new ArrayList();
ArrayList<String> arraylist = new ArrayList<String>();
for (Iterator iterator = b.keySet().iterator(); iterator.hasNext();) {
for (Iterator<String> iterator = b.keySet().iterator(); iterator.hasNext();) {
String s = (String) iterator.next();
int k1 = ((Integer) b.get(s)).intValue();

Datei anzeigen

@ -1,11 +1,9 @@
package net.minecraft.server;
import java.io.PrintStream;
import java.util.*;
import java.util.logging.Logger;
import org.bukkit.Location;
import org.bukkit.Player;
import org.bukkit.craftbukkit.CraftPlayer;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.event.Event.Type;
@ -26,7 +24,7 @@ implements ICommandListener {
private double h;
private double i;
private boolean j;
private Map k;
private Map<Integer, Short> k;
// CraftBukkit - next 2 lines
private final CraftServer server;
@ -36,7 +34,7 @@ implements ICommandListener {
c = false;
f = 0;
j = true;
k = new HashMap();
k = new HashMap<Integer, Short>();
d = minecraftserver;
b = networkmanager;
networkmanager.a(this);
@ -506,7 +504,7 @@ implements ICommandListener {
k.put(Integer.valueOf(e.ap.f), Short.valueOf(packet102.d));
e.a.b(new Packet106(packet102.a, packet102.d, false));
e.ap.a(e, false);
ArrayList arraylist = new ArrayList();
ArrayList<ItemStack> arraylist = new ArrayList<ItemStack>();
for (int l = 0; l < e.ap.e.size(); l++) {
arraylist.add(((Slot) e.ap.e.get(l)).c());

Datei anzeigen

@ -14,13 +14,13 @@ import org.bukkit.event.player.PlayerLoginEvent;
public class ServerConfigurationManager {
public static Logger a = Logger.getLogger("Minecraft");
public List b;
public List<EntityPlayerMP> b;
private MinecraftServer c;
private PlayerManager d;
private int e;
private Set f;
private Set g;
private Set h;
private Set<String> f;
private Set<String> g;
private Set<String> h;
private File i;
private File j;
private File k;
@ -30,10 +30,10 @@ public class ServerConfigurationManager {
public ServerConfigurationManager(MinecraftServer minecraftserver) {
server = minecraftserver.server; // Craftbukkit
b = new ArrayList();
f = new HashSet();
g = new HashSet();
h = new HashSet();
b = new ArrayList<EntityPlayerMP>();
f = new HashSet<String>();
g = new HashSet<String>();
h = new HashSet<String>();
c = minecraftserver;
i = minecraftserver.a("banned-players.txt");
j = minecraftserver.a("banned-ips.txt");
@ -205,7 +205,7 @@ public class ServerConfigurationManager {
PrintWriter printwriter = new PrintWriter(new FileWriter(i, false));
String s;
for (Iterator iterator = f.iterator(); iterator.hasNext(); printwriter.println(s)) {
for (Iterator<String> iterator = f.iterator(); iterator.hasNext(); printwriter.println(s)) {
s = (String) iterator.next();
}
@ -245,7 +245,7 @@ public class ServerConfigurationManager {
PrintWriter printwriter = new PrintWriter(new FileWriter(j, false));
String s;
for (Iterator iterator = g.iterator(); iterator.hasNext(); printwriter.println(s)) {
for (Iterator<String> iterator = g.iterator(); iterator.hasNext(); printwriter.println(s)) {
s = (String) iterator.next();
}
@ -285,7 +285,7 @@ public class ServerConfigurationManager {
PrintWriter printwriter = new PrintWriter(new FileWriter(k, false));
String s;
for (Iterator iterator = h.iterator(); iterator.hasNext(); printwriter.println(s)) {
for (Iterator<String> iterator = h.iterator(); iterator.hasNext(); printwriter.println(s)) {
s = (String) iterator.next();
}

Datei anzeigen

@ -5,7 +5,6 @@ import java.util.Random;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Material;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.CraftWorld;
import org.bukkit.event.Event;
@ -127,8 +126,8 @@ public class WorldServer extends World {
return A;
}
public List d(int i, int j, int k, int l, int i1, int j1) {
ArrayList arraylist = new ArrayList();
public List<TileEntity> d(int i, int j, int k, int l, int i1, int j1) {
ArrayList<TileEntity> arraylist = new ArrayList<TileEntity>();
for (int k1 = 0; k1 < c.size(); k1++) {
TileEntity tileentity = (TileEntity) c.get(k1);

Datei anzeigen

@ -49,7 +49,7 @@ public final class CraftServer implements Server {
}
public Player[] getOnlinePlayers() {
List<EntityPlayerMP> online = server.b;
List<EntityPlayerMP> online = server.b;
Player[] players = new Player[online.size()];
for (int i = 0; i < players.length; i++) {