WorldEvent Base

This commit is contained in:
Sam 2016-12-10 11:21:19 +00:00
parent 6bb76db05b
commit 6367330021
5 changed files with 89 additions and 13 deletions

View File

@ -7,7 +7,7 @@ import mineplex.core.scoreboard.WritableMineplexScoreboard;
public class GemHuntersScoreboard extends WritableMineplexScoreboard
{
public GemHuntersScoreboard(Player player)
{
super(player);
@ -17,8 +17,8 @@ public class GemHuntersScoreboard extends WritableMineplexScoreboard
{
writeNewLine();
write(C.cGreen + "Testing for " + player.getName());
write(C.cGreen + "");
writeNewLine();
}

View File

@ -1,4 +1,4 @@
package mineplex.gemhunters.w orld;
package mineplex.gemhunters.world;
import java.io.BufferedReader;
import java.io.DataInputStream;
@ -27,7 +27,7 @@ public class WorldDataModule extends MiniPlugin
{
private static final String MAP_PATH = "../../update/maps/Gem-Hunters/None_Moppletop City Testing.zip";
private String folder = null;
public World World;
@ -204,7 +204,8 @@ public class WorldDataModule extends MiniPlugin
try
{
MinX = Integer.parseInt(value);
} catch (Exception e)
}
catch (Exception e)
{
System.out.println("World Data Read Error: Invalid MinX [" + value + "]");
}
@ -215,7 +216,8 @@ public class WorldDataModule extends MiniPlugin
try
{
MaxX = Integer.parseInt(value);
} catch (Exception e)
}
catch (Exception e)
{
System.out.println("World Data Read Error: Invalid MaxX [" + value + "]");
}
@ -225,7 +227,8 @@ public class WorldDataModule extends MiniPlugin
try
{
MinZ = Integer.parseInt(value);
} catch (Exception e)
}
catch (Exception e)
{
System.out.println("World Data Read Error: Invalid MinZ [" + value + "]");
}
@ -235,7 +238,8 @@ public class WorldDataModule extends MiniPlugin
try
{
MaxZ = Integer.parseInt(value);
} catch (Exception e)
}
catch (Exception e)
{
System.out.println("World Data Read Error: Invalid MaxZ [" + value + "]");
}
@ -245,7 +249,8 @@ public class WorldDataModule extends MiniPlugin
try
{
MinY = Integer.parseInt(value);
} catch (Exception e)
}
catch (Exception e)
{
System.out.println("World Data Read Error: Invalid MinY [" + value + "]");
}
@ -255,7 +260,8 @@ public class WorldDataModule extends MiniPlugin
try
{
MaxY = Integer.parseInt(value);
} catch (Exception e)
}
catch (Exception e)
{
System.out.println("World Data Read Error: Invalid MaxY [" + value + "]");
}
@ -263,7 +269,8 @@ public class WorldDataModule extends MiniPlugin
}
in.close();
} catch (Exception e)
}
catch (Exception e)
{
e.printStackTrace();
System.err.println("Line: " + line);
@ -277,7 +284,8 @@ public class WorldDataModule extends MiniPlugin
try
{
return new Location(World, Integer.valueOf(coords[0]) + 0.5, Integer.valueOf(coords[1]), Integer.valueOf(coords[2]) + 0.5);
} catch (Exception e)
}
catch (Exception e)
{
System.out.println("World Data Read Error: Invalid Location String [" + loc + "]");
}

View File

@ -0,0 +1,22 @@
package mineplex.gemhunters.worldevent;
import mineplex.core.updater.event.UpdateEvent;
public class WorldEvent
{
public boolean onCheckTrigger(UpdateEvent event)
{
return false;
}
public void onStart()
{
}
public void onEnd()
{
}
}

View File

@ -0,0 +1,38 @@
package mineplex.gemhunters.worldevent;
import mineplex.gemhunters.worldevent.coldweather.ColdWeatherEvent;
public enum WorldEventType
{
COLD_WEATHER("Cold Weather", ColdWeatherEvent.class);
private String _name;
private Class<? extends WorldEvent> _clazz;
private WorldEventType(String name, Class<? extends WorldEvent> clazz)
{
_name = name;
_clazz = clazz;
}
public WorldEvent createInstance()
{
try
{
return (WorldEvent) _clazz.getConstructors()[0].newInstance();
}
catch (Exception e)
{
e.printStackTrace();
}
return null;
}
public String getName()
{
return _name;
}
}

View File

@ -0,0 +1,8 @@
package mineplex.gemhunters.worldevent.coldweather;
import mineplex.gemhunters.worldevent.WorldEvent;
public class ColdWeatherEvent extends WorldEvent
{
}