GallupPoll is an essential server plugin for especially kit pvp or avatar bender mod type servers but can be used in any server…
It has 3 fully configurable functions;
LoginMessages: Do you want to show server RULES with teleporting player, giving some items, giving some permissions etc.? LoginMessages part activates after a player joins in server and helps you to manage your server…
ScheduledMessages: Do you want to make announcements or send questions to all players and give them rewards or run some commands? This part works on an interval and shows messages and questions in order…
CommandSystem: Do you want to prepare some commands or maybe want to change some commands? In this part you can make commands that will override usual ones and run your own commands…
Also its compatible with FlexibleLogin…
In config i tried to tell everything i have added but if you have any questions send a reply from here…
gploginresetme ------------------------- Resets players own login sequence and starts again.
<player> ------- Resets defined players login sequence and starts again.
gploginresetall -------------------------- Resets all players login sequence and starts again.
CommandSystem adds new commands and you can define that command’s name so these commands are up to you…
galluppoll.command.resetme ------------------ Permission node for gploginresetme command.
galluppoll.command.resetplayer -------------- Permission node for gploginresetplayer command.
galluppoll.command.resetallplayers ---------- Permission node for gploginresetall command.
galluppoll.loginpartcompleted ----------------- This Perm. node makes player override LoginMessage part.
galluppoll.scheduledpartoverride ------------- This Perm. node makes player override Scheduled Messages part.
CommandSystem adds new commands with permission nodes an example would be like this:
galluppoll.command.examplecmd ----------------- Permission node for command named examplecmd.
#Tips and Informations
CommandSystem commands can be run directly with arguments
Example: If you create a kit command and add this answer:starter
Player can run /kit command and reply to a question OR directly run /kit starter
Commands can be run as player with
<asplayer> before command but for some commands player might not have permission…
For these situations Commands are executed with order…
permgiver is a command like pex that gives permission
command is a command needs permission
permtaker is a command like pex that takes permission back
In config command lines you can use them in correct order to execute command without letting player have that permission…
Edit: Added full text format support in version 1.1
A few things:
- It’s a good idea to use a normal version number. If you want to specify what API release you’re using, you can put in your build.gradle:
classifier = 'API4.0.0'
- Don’t initialize your injected fields with
null, that’s pointless. Just leave them uninitialized.
java.nio are preferred over
java.io when using filesystem operations or injection.
- Rather than capitals, the HOCON spec defines key names as being all lowercase, with hyphens separating words.
description field of
CommandSpec is supposed to describe what the command does. Adding a CamelCase programmatic-ish name just makes it more confusing.
- If you’re going to keep all executors in one class file, using separate classes for each becomes pointless; why not just use a
/gploginresetplayer, since you’re trying to get a player, why not use
GenericArguments.player(key) instead of
GenericArguments.string(key)? Or, since you’re trying to get a
GenericArguments.user(key). Also, to get the type you’re looking for from the arguments, you’d do
args.<Player> depending on which type the argument returns
- Your current command system depends on a chat listener. However, you could very easily dynamically register commands - i.e. read the configuration, and make
CommandSpecs and executors to match.
- In the configuration, instead of naming objects
Message2 etc., it’s a much better idea to not define the names ahead of time, and then just use
getChildrenMap() to get all the nodes.
- In the configuration, it’s recommended, rather than using color codes, to use
Text objects directly in the configuration. Then, you can just call
getValue(TypeToken.of(Text.class)), and it’ll return a
Text. This also means people can put click actions and such in the text on their own, while the current implementation only allows for colors.
- When working with
ConfigurationNodes, rather than getting the value and checking if it’s
null, it’s a much better idea to call
isVirtual() on the node. This is especially good with fields like
boolean, where the default value is also a valid value (e.g.
getInt() returns 0, and you don’t know whether it means undefined or a literal 0).
Having a problem, when anyone types a command twice or 2 different commands, it throws up an error in the console after the first command. If they relog they can type one command again and if they type another is throws an error on the console. Also is there a way to run commands without having the chat message come up?
Can u please attach ur configuration file here? i tried using commands multiple times i dont think its relevant… And sadly No, there should be Message1 text for command to work… But they dont have to answer…
Here is the config file… http://pastebin.com/YVZBkUjn
And here is the error message… http://pastebin.com/05cdLRXv
I have found the solution but i get an error and its really interesting
Error says there is no [email protected]
But im sure there is… Also it doesnt give this error for old builds of galluppoll…
When i fix this problem i will release a new version…
The problem is about loginmessage part…
give default users galluppoll.loginpartcompleted true
this will fix at themoment…
im trying to upload fixed release but it seems Ore has no upload button for new releases…
GallupPoll 1.2 is released…
When I download the file it is 0k in size!
this problem is not from my plugin… every download gives an error at Ore right now…
Try downloading other plugins they are 0Kb too…
Can you provide a mirror link that is not in Ore since it is down?
mirror links added thanks for warning
Is it possible to make it so multiple commands run from a single input?
And to determine whether the commands are ran as if from the console or the player?
Yes! Exactly… This options are explained in the config file…
commands are divided with $$ and if u want to run command as player use
<asplayer> before command
Installed it and had a play with it.
A smidge unsure on somethings at the moment but I feel I can work it out.
Would it be feasible to add an option for there to be a pool of questions to draw from at random? And another option that only the first to reply correctly gets the commands ran for them?
I’d see that as being useful for setting up random lotto type events alongside more typical broadcasts.
One thing I’ve yet to test - if we name a command as say … test.command1 and have another as test.command2, then the permissions for those commands would be galluppoll.command.test.command1 and galluppoll.command.test.command2.
Would denying galluppoll.command.test. then deny access to both of those commands? Or are the command names not able to follow the Sponge inheritance paths.
Sponge permissions’ inheritance works automatically. If I ask if the player has the permission
test.perm1, and they have the permission
test, then I am told yes, the player does have the permission. Doesn’t matter the circumstances.
Any option of a config variable to change the GallupPoll from appearing beside every sent message?
Or at least to alter the colour of it to something more sedate
As an addendum to that, the text appears to be automatically coloured to match that of the [GallupPoll]: tag