Page 1 of 1

GM Commands

Posted: Mon Sep 21, 2009 6:22 pm
by Negat1ve
Where i can find GM commands ? PLS

Re: GM Commands

Posted: Mon Sep 21, 2009 6:43 pm
by MELERIX
admin_command_access_rights.sql

Re: GM Commands

Posted: Mon Sep 21, 2009 7:50 pm
by momo61
speaking of commands, i saw someone saying //announce <text> could be shortened into //a <text>

Wouldnt that be an improvement ? =)

Re: GM Commands

Posted: Mon Sep 21, 2009 8:05 pm
by devo
momo61 wrote:speaking of commands, i saw someone saying //announce <text> could be shortened into //a <text>

Wouldnt that be an improvement ? =)
not tested

Patch:

Code: Select all

### Eclipse Workspace Patch 1.0#P datapack_developmentIndex: data/scripts/handlers/admincommandhandlers/AdminAnnouncements.java===================================================================--- data/scripts/handlers/admincommandhandlers/AdminAnnouncements.java	(revision 6652)+++ data/scripts/handlers/admincommandhandlers/AdminAnnouncements.java	(working copy)@@ -44,6 +44,7 @@ 		"admin_add_announcement", 		"admin_del_announcement", 		"admin_announce",+		"admin_a", 		"admin_announce_menu", 		"admin_reload_autoannounce" 	};@@ -105,7 +106,7 @@ 		}  		// Command is admin announce-		else if (command.startsWith("admin_announce"))+		else if (command.startsWith("admin_announce") || command.startsWith("admin_a")) 		{ 			// Call method from another class 			Announcements.getInstance().handleAnnounce(command, 15); 

Re: GM Commands

Posted: Tue Sep 22, 2009 2:22 pm
by Ashitaka
devo wrote:
momo61 wrote:speaking of commands, i saw someone saying //announce <text> could be shortened into //a <text>

Wouldnt that be an improvement ? =)
not tested

Patch:

Code: Select all

### Eclipse Workspace Patch 1.0#P datapack_developmentIndex: data/scripts/handlers/admincommandhandlers/AdminAnnouncements.java===================================================================--- data/scripts/handlers/admincommandhandlers/AdminAnnouncements.java	(revision 6652)+++ data/scripts/handlers/admincommandhandlers/AdminAnnouncements.java	(working copy)@@ -44,6 +44,7 @@ 		"admin_add_announcement", 		"admin_del_announcement", 		"admin_announce",+		"admin_a", 		"admin_announce_menu", 		"admin_reload_autoannounce" 	};@@ -105,7 +106,7 @@ 		}  		// Command is admin announce-		else if (command.startsWith("admin_announce"))+		else if (command.startsWith("admin_announce") || command.startsWith("admin_a")) 		{ 			// Call method from another class 			Announcements.getInstance().handleAnnounce(command, 15); 
Don't forget the dp-side. :)

Code: Select all

### Eclipse Workspace Patch 1.0#P datapack_developmentIndex: sql/admin_command_access_rights.sql===================================================================--- sql/admin_command_access_rights.sql	(revisión: 6653)+++ sql/admin_command_access_rights.sql	(copia de trabajo)@@ -16,6 +16,7 @@ ('admin_admin3','1'),  ('admin_admin4','1'),  ('admin_admin5','1'), +('admin_a','1'),  ('admin_gmliston','1'), ('admin_gmlistoff','1'),  ('admin_silence','1'), 

Re: GM Commands

Posted: Tue Sep 22, 2009 3:07 pm
by devo
true :) forgot about that :) thanks

Re: GM Commands

Posted: Tue Sep 22, 2009 4:51 pm
by mr.karrde

Code: Select all

else if (command.startsWith("admin_announce") || command.startsWith("admin_a")){ // Call method from another class Announcements.getInstance().handleAnnounce(command, 15); 
Maybe don't work because admin_a require "Announcements.getInstance().handleAnnounce(command, 8 );"

see here:
viewtopic.php?f=76&t=10838#p47414

Re: GM Commands

Posted: Tue Sep 22, 2009 5:29 pm
by devo
I didint know its not working :P you are right, should be like that

Code: Select all

### Eclipse Workspace Patch 1.0#P datapack_developmentIndex: data/scripts/handlers/admincommandhandlers/AdminAnnouncements.java===================================================================--- data/scripts/handlers/admincommandhandlers/AdminAnnouncements.java	(revision 6652)+++ data/scripts/handlers/admincommandhandlers/AdminAnnouncements.java	(working copy)@@ -44,6 +44,7 @@ 		"admin_add_announcement", 		"admin_del_announcement", 		"admin_announce",+		"admin_a", 		"admin_announce_menu", 		"admin_reload_autoannounce" 	};@@ -111,6 +112,12 @@ 			Announcements.getInstance().handleAnnounce(command, 15); 		} +		else if (command.startsWith("admin_a"))+		{+			// Call method from another class+			Announcements.getInstance().handleAnnounce(command, 8);+		}+		 		else if (command.startsWith("admin_reload_autoannounce")) 		{ 			AutoAnnounceTaskManager.getInstance().restore();