Add a /we random command to spawn a random world event
This commit is contained in:
parent
37bb64bffd
commit
66274188c8
@ -124,6 +124,17 @@ public class WorldEventManager extends MiniPlugin implements ScoreboardElement
|
||||
}
|
||||
}
|
||||
|
||||
public void randomEvent()
|
||||
{
|
||||
if (_runningEvents.size() == 0)
|
||||
{
|
||||
if (UtilServer.getPlayers().length > 0)
|
||||
{
|
||||
tryStartEvent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void tryStartEvent()
|
||||
{
|
||||
WorldEventType[] types = WorldEventType.values();
|
||||
|
@ -14,6 +14,7 @@ public class WorldEventCommand extends MultiCommandBase<WorldEventManager>
|
||||
|
||||
AddCommand(new StartCommand(Plugin));
|
||||
AddCommand(new ClearCommand(Plugin));
|
||||
AddCommand(new RandomCommand(Plugin));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user