mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-10 09:22:49 +00:00
@@ -33,6 +33,8 @@ import com.l2jserver.service.database.DatabaseService;
|
||||
import com.l2jserver.service.database.JDBCDatabaseService;
|
||||
import com.l2jserver.service.game.AttackService;
|
||||
import com.l2jserver.service.game.AttackServiceImpl;
|
||||
import com.l2jserver.service.game.admin.AdministratorService;
|
||||
import com.l2jserver.service.game.admin.AdministratorServiceImpl;
|
||||
import com.l2jserver.service.game.character.CharacterService;
|
||||
import com.l2jserver.service.game.character.CharacterServiceImpl;
|
||||
import com.l2jserver.service.game.chat.ChatService;
|
||||
@@ -102,6 +104,8 @@ public class ServiceModule extends AbstractModule {
|
||||
|
||||
bind(ChatService.class).to(SimpleChatService.class)
|
||||
.in(Scopes.SINGLETON);
|
||||
bind(AdministratorService.class).to(AdministratorServiceImpl.class).in(
|
||||
Scopes.SINGLETON);
|
||||
bind(SpawnService.class).to(SpawnServiceImpl.class)
|
||||
.in(Scopes.SINGLETON);
|
||||
bind(BroadcastService.class).to(BroadcastServiceImpl.class).in(
|
||||
|
||||
@@ -14,8 +14,9 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.service.admin;
|
||||
package com.l2jserver.service.game.admin;
|
||||
|
||||
import com.l2jserver.game.net.Lineage2Connection;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.service.Service;
|
||||
|
||||
@@ -28,6 +29,8 @@ public interface AdministratorService extends Service {
|
||||
/**
|
||||
* Executes an command
|
||||
*
|
||||
* @param conn
|
||||
* the lineage 2 connection
|
||||
* @param character
|
||||
* the admin character
|
||||
* @param command
|
||||
@@ -35,7 +38,8 @@ public interface AdministratorService extends Service {
|
||||
* @param args
|
||||
* the arguments
|
||||
*/
|
||||
void command(L2Character character, String command, String... args);
|
||||
void command(Lineage2Connection conn, L2Character character,
|
||||
String command, String... args);
|
||||
|
||||
/**
|
||||
* The base interface for Administrator commands
|
||||
@@ -14,13 +14,15 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.service.admin;
|
||||
package com.l2jserver.service.game.admin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.game.net.Lineage2Connection;
|
||||
import com.l2jserver.model.id.object.CharacterID;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.service.AbstractService;
|
||||
import com.l2jserver.service.game.admin.panel.AdminHomeTemplate;
|
||||
|
||||
/**
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
@@ -30,13 +32,10 @@ public class AdministratorServiceImpl extends AbstractService implements
|
||||
AdministratorService {
|
||||
@SuppressWarnings("unused")
|
||||
private List<CharacterID> online;
|
||||
|
||||
|
||||
@Override
|
||||
public void command(L2Character character, String command, String... args) {
|
||||
if(command.equals("log")) {
|
||||
if(args.length == 2) {
|
||||
|
||||
}
|
||||
}
|
||||
public void command(Lineage2Connection conn, L2Character character,
|
||||
String command, String... args) {
|
||||
conn.sendCommunityHTML(new AdminHomeTemplate());
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.service.admin;
|
||||
package com.l2jserver.service.game.admin;
|
||||
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.service.Service;
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.service.game.admin.panel;
|
||||
|
||||
import com.l2jserver.util.html.markup.HtmlTemplate;
|
||||
import com.l2jserver.util.html.markup.MarkupTag;
|
||||
|
||||
/**
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class AdminHomeTemplate extends HtmlTemplate {
|
||||
@Override
|
||||
protected void build(MarkupTag body) {
|
||||
body.text("Welcome to l2jserver2 administration panel.").br();
|
||||
body.addLink("Teleport", "admin teleport").br();
|
||||
body.addLink("Online characters", "admin online").br();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.service.game.admin.panel;
|
||||
|
||||
import com.l2jserver.util.html.markup.HtmlTemplate;
|
||||
import com.l2jserver.util.html.markup.MarkupTag;
|
||||
|
||||
/**
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*
|
||||
*/
|
||||
public class TeleportTemplate extends HtmlTemplate {
|
||||
@Override
|
||||
protected void build(MarkupTag body) {
|
||||
body.text("You can teleport to the following places:").br();
|
||||
body.addLink("Aden", "admin teleport aden");
|
||||
body.addLink("Giran", "admin teleport giran");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user