Suggestion: ChatElementary

Discussion in 'Archived: Plugin Requests' started by coolperez8, Jul 31, 2014.

  1. Offline

    coolperez8

    Suggested Name: Command Elementary

    Plugin Description: A collection of useful features

    Please note: In this tutorial I mention config files, they are enclosed in brackets so you don't confuse the config and tutorial, and are not actually part of the config, if you make this plugin please give credit to me with the following info:

    <removed advertising - Iroh>

    Plugin Breakdown:

    Basics:
    Basically, it creates a folder named "CmdElem" for each feature to store it's files in, and a config in that folder where you can enable/disable certain features, all features are enabled by default, and folders are generated regardlessly of the features being enabled, it also doesn't delete the folders after disabling it, basically, the global config looks like this:
    [
    #Delete the hashtag next to any of the Override Modes to enable that feature.
    #override_mode:enable_dependancies
    #override_mode:disable_feature
    override_mode:ignore_feature

    #Set any of the feature names below to true to enable, or false to disable.
    elementary_server=true
    comblock=true
    comsync=true
    ...
    ]
    Basically, if you didn't get that, it just lists a bunch of features all in lowercase and spaces are actually brackets, the features are also followed by "=true" and the ellipsis shows that the list just goes on, it isn't actually part of the config, and, the plugin doesn't delete files so you can use them later if you need them, however, it does also generate a "default_config.yml" which is actually a version of "config.yml" that the plugin ignores and overrides with the default "config.yml" every time it loads up.

    Part 1: Elementary Server.

    The thing about this plugin is that it can either be run as a standalone server or a client, if run as a standalone like bukkit itself, only this feature will be used, the standalone plugin will output it's logs to the console, and it will run as a host-only, but if run as a plugin, you can choose to enable this feature as both a host and client or just as a client, and enable the plugin to link with other servers running this on those other servers, however it will output logs to it's own little console, this feature is used for other features of this plugin. Here's the default config:
    [
    enable_server=false
    enable_log_fowarding
    server_port=25000
    merge_local_ip=true
    merge_lan_ip=true
    merge_wifi_ip=true
    lan_ip=192.168.*.*
    reconnect_tries=-1 #set to -1 keep trying until sucsession, setting it to anything above will make it try to connect that many times before stopping
    reconnect_timeout=10000 #the number of milliseconds to wait before trying to connect again.
    ]
    Please note: You might want to go into the server.properties file of the server running this plugin because of this example:
    Let's say there's a bukkit server named "a" on the plugin's server, and the server IP is 127.0.0.1, and another server tries to connect with the name "a" or any other name that's occupied on the server, here's what it will do:
    If the server's IP is 127.0.0.1, it will be treated as a local IP.
    If the server's IP resembles the "lan_ip" in the config, it will be treated as a lan IP, such as if the lan_ip is set to 192.168.*.* and the IP trying to ping the server is 192.168.2.12
    If the server's IP is not the two above, it will be treated as a WiFi IP.
    The server will then check the appropriate setting of what to do with one of those IP's, such as if it's a WiFi IP it will check the "merge_wifi_ip" setting.
    If the setting is set to true, both servers will be treated as one server.
    If the setting is set to false the incoming request will be rejected.

    The "server_port" is pretty self-explanitory, if enable_server is set to true it will try to start a server on that port, if a server seems to be already running on that port, the option is disabled, or it's disconnected, it will check the "reconnect_tries" value to see how many times to attempt to reconnect and check the "reconnect_timeout" value to see how long to wait before trying again, if "reconnect_tries" is set to -1, it will keep trying forever.

    Also, log_fowarding fowards the logs from the clients so the host server can output them, useful if your running a server from one PC on lan and want to see the logs on another PC, this also protects against spam logs when basically you have one server spamming a command and you don't want to get the logs blasted.

    Part 2: ComBlock/ComSync.
    Basically, ComBlock and ComSync have similarities and differences. I'll start with the features both of these features has, but first I'll mention that you need to have Elementary Server enabled for ComSync to work.

    Basically, each has a blacklist and whitelist, they both several files, both files named blacklist.txt, whitelist.txt, and config.yml. I'll start with config.
    The config is formatted like this:

    [
    global_list=blacklist
    blocked_message=&4Sorry, that command is blocked!
    ]

    The "blocked_message" is exclusive to ComBlock, and that's basically it, however, if the global_list setting is set to whitelist, blacklist.txt is ignored and vice versa, now, here's where the formatting comes in, basically, the same formatting can be used for both ComBlock & ComSync however a syntax that is exclusive to one is ignored in the other, let me explain what I'm talking about using an example piece of the setup, a tutorial on how to set this up is located in the plugin's documentation.

    [
    B /f %b["help",%"admin","claim"]% %w["create"]%
    $other;":0.1/dc {player} {command}",":0.1/f help"
    hub:0.1;":0.1/help"
    $me:0.1;":0.1/puppy"
    ]

    Let me break this down:
    In the first line:
    The "B" at the beginning means that if the command's blacklist and whitelist conflict, it will block the command in ComBlock, or not send the command to the Elementary Server.
    The "/f" at the beginning is the actual base command, not the full command itself.
    The "%b["help",%"admin",*"claim"]%" is actually command's blacklist, a.k.a the arguments you wanna block. Please note the %sign before the "admin" means that you want to block that argument alone, so basically you can do "/f admin on" but can't do "/f admin". But since there is no % sign before "help" or "claim", that means you can't do "/f help","/f help 1","/f claim", or "/f claim 1". Also, the "*" next to "claim" means you can't do "/f claimmyland" either, however, when used in ComSync, instead of blocking the command, it won't send it.
    The "%w["create"]%" actually has the same concept of the "%b["help",%"admin",*"claim"]%" we mentioned earlier, except this is the ones you don't want to block in ComBlock or the ones you want to send in ComSync.

    The rest of the lines are ignored if used in ComBlock, but do nothing if they're not used in ComSync. Basically, let me explain this:
    In the second line:
    The "$other" basically means any server not listed, excluding the one with the command being run on, the "hub" means any server named hub, and the "$me" means the server the command was run on. After those texts, there is a list of commands to execute, each enclosed in quotes starting with ":0.1". The ":0.1" is the delay to run the command when the server recieves it, useful if you want the server to wait, after that is the actual command, the syntax {player} is the player who ran the command, the syntax {command} is basically the command without the slash, useful if you have a plugin like VirtualPlayers and it only runs the command if the "/" isn't used, so if a player runs "/puppy", the output for the "{command}" syntax is "puppy", but if they run "//puppy", the output would be "/puppy".

    Also, as a difference, comblock also generates a file called "bypass.txt" which can only be modified by having access to the server files. It works by if you put a Minecraft name or UUID in there, it will actually look it up. It first tries searching it up as an actual player, if no match is found, it will search it up as a UUID. It then converts it to the format "name:uuid", the list is reloaded every time a player joins, but only will search by UUID to avoid the mishap of a player with the name "player1" changing the name to "player2" while a player named "player3" changes his name to "player1" and actually joins the server and wrecks havoc by bypassing limits.

    Part 3: QCMDS.

    This plugin is very basic, it uses the following commands:

    /qgm (type) (player) -changes gamemode, possible types are 0/s for survival, 1/c for creative, and 2/a for adventure, however it does not let the player know it changed their gamemode, and if no playername is given, it uses the player who executed the command, this however uses the permission cmdelem.qcmds.gm
    /qg -does the same thing as /qgm.

    /qtp (player1) (player2) -this basically teleports player1 to player2, if no player1 is given, it will teleport you to player2, this however uses the permission cmdelem.qcmds.tp
    /qt -same as qtp.

    Part 4: AntiPuppet.

    The name's a little wierd, but it's very basic,
    Basically, it watches your gamemode, co-ordinates, and other stuff. You can do /ap on, however, a txt file called bypass.txt acts just like the one from ComBlock, but isn't the same file. It basically allows players to bypass other people's AntiPuppet mode and execute commands on them regardless if they're in it or not, it won't work on other people with the bypass though, console always has the bypass. This is useful if your tired of staff on your server teleporting you to their location without their permission and when your busy...

    When I want it by:

    August 3rd 2014, 8:00 AM, the sooner the better.
     
  2. Offline

    scenecraft

    coolperez8

     
  3. Offline

    coolperez8

    oh...

    I'm not physically saying we could talk on Skype, I'm actually using it for the plugin credits...

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016

Share This Page