mirror of
https://github.com/PryPurity/WorldBorder.git
synced 2024-11-17 10:45:29 +01:00
World Trim/Fill task start events
This commit is contained in:
parent
9abf6ff938
commit
dd4a8348be
@ -0,0 +1,36 @@
|
||||
package com.wimbli.WorldBorder.Events;
|
||||
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import com.wimbli.WorldBorder.WorldFillTask;
|
||||
|
||||
|
||||
/**
|
||||
* Created by Maximvdw on 12.01.2016.
|
||||
*/
|
||||
public class WorldBorderFillStartEvent extends Event
|
||||
{
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private WorldFillTask fillTask;
|
||||
|
||||
public WorldBorderFillStartEvent(WorldFillTask worldFillTask)
|
||||
{
|
||||
this.fillTask = worldFillTask;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers()
|
||||
{
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList()
|
||||
{
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public WorldFillTask getFillTask(){
|
||||
return this.fillTask;
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.wimbli.WorldBorder.Events;
|
||||
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import com.wimbli.WorldBorder.WorldTrimTask;
|
||||
|
||||
|
||||
/**
|
||||
* Created by Maximvdw on 12.01.2016.
|
||||
*/
|
||||
public class WorldBorderTrimStartEvent extends Event
|
||||
{
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private WorldTrimTask trimTask;
|
||||
|
||||
public WorldBorderTrimStartEvent(WorldTrimTask trimTask)
|
||||
{
|
||||
this.trimTask = trimTask;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers()
|
||||
{
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList()
|
||||
{
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public WorldTrimTask getTrimTask(){
|
||||
return this.trimTask;
|
||||
}
|
||||
}
|
@ -12,6 +12,7 @@ import org.bukkit.Server;
|
||||
import org.bukkit.World;
|
||||
|
||||
import com.wimbli.WorldBorder.Events.WorldBorderFillFinishedEvent;
|
||||
import com.wimbli.WorldBorder.Events.WorldBorderFillStartEvent;
|
||||
|
||||
|
||||
public class WorldFillTask implements Runnable
|
||||
@ -117,6 +118,7 @@ public class WorldFillTask implements Runnable
|
||||
}
|
||||
|
||||
this.readyToGo = true;
|
||||
Bukkit.getServer().getPluginManager().callEvent(new WorldBorderFillStartEvent(this));
|
||||
}
|
||||
// for backwards compatibility
|
||||
public WorldFillTask(Server theServer, Player player, String worldName, int fillDistance, int chunksPerRun, int tickFrequency)
|
||||
|
@ -13,6 +13,7 @@ import org.bukkit.Server;
|
||||
import org.bukkit.World;
|
||||
|
||||
import com.wimbli.WorldBorder.Events.WorldBorderTrimFinishedEvent;
|
||||
import com.wimbli.WorldBorder.Events.WorldBorderTrimStartEvent;
|
||||
|
||||
|
||||
public class WorldTrimTask implements Runnable
|
||||
@ -88,6 +89,7 @@ public class WorldTrimTask implements Runnable
|
||||
return;
|
||||
|
||||
this.readyToGo = true;
|
||||
Bukkit.getServer().getPluginManager().callEvent(new WorldBorderTrimStartEvent(this));
|
||||
}
|
||||
|
||||
public void setTaskID(int ID)
|
||||
|
Loading…
Reference in New Issue
Block a user