mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-20 21:40:27 -07:00
[events] implement event interface with command
This commit is contained in:
parent
47705aba6e
commit
f6055f197b
1 changed files with 17 additions and 2 deletions
|
|
@ -2,7 +2,7 @@ package plugin.command;
|
||||||
|
|
||||||
import org.crandor.ServerConstants;
|
import org.crandor.ServerConstants;
|
||||||
import org.crandor.game.component.Component;
|
import org.crandor.game.component.Component;
|
||||||
import org.crandor.game.content.global.tutorial.TutorialStage;
|
import org.crandor.game.events.GlobalEvent;
|
||||||
import org.crandor.game.events.GlobalEventManager;
|
import org.crandor.game.events.GlobalEventManager;
|
||||||
import org.crandor.game.node.entity.player.Player;
|
import org.crandor.game.node.entity.player.Player;
|
||||||
import org.crandor.game.node.entity.player.info.Rights;
|
import org.crandor.game.node.entity.player.info.Rights;
|
||||||
|
|
@ -15,7 +15,6 @@ import org.crandor.game.system.command.CommandSet;
|
||||||
import org.crandor.game.system.communication.ClanRepository;
|
import org.crandor.game.system.communication.ClanRepository;
|
||||||
import org.crandor.game.system.communication.CommunicationInfo;
|
import org.crandor.game.system.communication.CommunicationInfo;
|
||||||
import org.crandor.game.world.GameWorld;
|
import org.crandor.game.world.GameWorld;
|
||||||
import org.crandor.game.world.map.Location;
|
|
||||||
import org.crandor.game.world.repository.Repository;
|
import org.crandor.game.world.repository.Repository;
|
||||||
import org.crandor.net.amsc.WorldCommunicator;
|
import org.crandor.net.amsc.WorldCommunicator;
|
||||||
import org.crandor.plugin.InitializablePlugin;
|
import org.crandor.plugin.InitializablePlugin;
|
||||||
|
|
@ -299,6 +298,22 @@ public final class PlayerCommandPlugin extends CommandPlugin {
|
||||||
player.sendMessage("Finish what you're currently doing.");
|
player.sendMessage("Finish what you're currently doing.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
player.getInterfaceManager().open(new Component(275));
|
||||||
|
//CLear old data
|
||||||
|
for (int i = 0; i < 311; i++) {
|
||||||
|
player.getPacketDispatch().sendString("", 275, i);
|
||||||
|
}
|
||||||
|
// Title
|
||||||
|
player.getPacketDispatch().sendString("<col=ecf0f1>" + GameWorld.getName() + " Events</col>", 275, 2);
|
||||||
|
|
||||||
|
// Content
|
||||||
|
int lineId = 11;
|
||||||
|
for(GlobalEvent event : GlobalEvent.values()){
|
||||||
|
player.getPacketDispatch().sendString("<col=ecf0f1>" + event.getName(), 275, lineId++);
|
||||||
|
if (event.isActive())
|
||||||
|
player.getPacketDispatch().sendString("<col=8e44ad>(active)", 275, lineId++);
|
||||||
|
player.getPacketDispatch().sendString("<col=2c3e50>" + event.getDescription(), 275, lineId++);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue