Geting rid of persist and prepare ConfServer for SimpleConfig usage.
This commit is contained in:
@@ -8,17 +8,13 @@ import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import com.massivecraft.factions.zcore.persist.EM;
|
||||
import com.massivecraft.factions.zcore.persist.SaveTask;
|
||||
import com.massivecraft.factions.zcore.util.Persist;
|
||||
import com.massivecraft.mcore.util.Txt;
|
||||
import com.massivecraft.mcore.xlib.gson.Gson;
|
||||
import com.massivecraft.mcore.xlib.gson.GsonBuilder;
|
||||
|
||||
|
||||
public abstract class MPlugin extends JavaPlugin
|
||||
{
|
||||
// Some utils
|
||||
public Persist persist;
|
||||
|
||||
{
|
||||
// Persist related
|
||||
public Gson gson;
|
||||
private Integer saveTask = null;
|
||||
@@ -41,9 +37,6 @@ public abstract class MPlugin extends JavaPlugin
|
||||
|
||||
// Ensure basefolder exists!
|
||||
this.getDataFolder().mkdirs();
|
||||
|
||||
// Create Utility Instances
|
||||
this.persist = new Persist(this);
|
||||
|
||||
// GSON 2.1 is now embedded in CraftBukkit, used by the auto-updater: https://github.com/Bukkit/CraftBukkit/commit/0ed1d1fdbb1e0bc09a70bc7bfdf40c1de8411665
|
||||
// if ( ! lib.require("gson.jar", "http://search.maven.org/remotecontent?filepath=com/google/code/gson/gson/2.1/gson-2.1.jar")) return false;
|
||||
|
@@ -1,91 +0,0 @@
|
||||
package com.massivecraft.factions.zcore.util;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Random;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
|
||||
// http://mc.kev009.com/Protocol
|
||||
// -----------------------------
|
||||
// Smoke Directions
|
||||
// -----------------------------
|
||||
// Direction ID Direction
|
||||
// 0 South - East
|
||||
// 1 South
|
||||
// 2 South - West
|
||||
// 3 East
|
||||
// 4 (Up or middle ?)
|
||||
// 5 West
|
||||
// 6 North - East
|
||||
// 7 North
|
||||
// 8 North - West
|
||||
//-----------------------------
|
||||
|
||||
public class SmokeUtil
|
||||
{
|
||||
public static Random random = new Random();
|
||||
|
||||
// -------------------------------------------- //
|
||||
// Spawn once
|
||||
// -------------------------------------------- //
|
||||
|
||||
// Single ========
|
||||
public static void spawnSingle(Location location, int direction)
|
||||
{
|
||||
if (location == null) return;
|
||||
location.getWorld().playEffect(location.clone(), Effect.SMOKE, direction);
|
||||
}
|
||||
|
||||
public static void spawnSingle(Location location)
|
||||
{
|
||||
spawnSingle(location, 4);
|
||||
}
|
||||
|
||||
public static void spawnSingleRandom(Location location)
|
||||
{
|
||||
spawnSingle(location, random.nextInt(9));
|
||||
}
|
||||
|
||||
// Simple Cloud ========
|
||||
public static void spawnCloudSimple(Location location)
|
||||
{
|
||||
for (int i = 0; i <= 8; i++)
|
||||
{
|
||||
spawnSingle(location, i);
|
||||
}
|
||||
}
|
||||
|
||||
public static void spawnCloudSimple(Collection<Location> locations)
|
||||
{
|
||||
for (Location location : locations)
|
||||
{
|
||||
spawnCloudSimple(location);
|
||||
}
|
||||
}
|
||||
|
||||
// Random Cloud ========
|
||||
public static void spawnCloudRandom(Location location, float thickness)
|
||||
{
|
||||
int singles = (int) Math.floor(thickness*9);
|
||||
for (int i = 0; i < singles; i++)
|
||||
{
|
||||
spawnSingleRandom(location.clone());
|
||||
}
|
||||
}
|
||||
|
||||
public static void spawnCloudRandom(Collection<Location> locations, float thickness)
|
||||
{
|
||||
for (Location location : locations)
|
||||
{
|
||||
spawnCloudRandom(location, thickness);
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// Attach continuous effects to or locations
|
||||
// -------------------------------------------- //
|
||||
|
||||
// TODO
|
||||
|
||||
}
|
Reference in New Issue
Block a user