[1.8] /build plugin - very simple.

Discussion in 'Plugin Requests' started by baenii, Dec 17, 2017.

Thread Status:
Not open for further replies.
  1. Plugin category: build mode

    Minecraft version: 1.8.x

    Suggested name: buildmode

    What I want: I'd really need a plugin that allows players with the permission "buildmode.use" do /build. This command should set the player into gamemode 1, send a customizable message and allow him to break/place blocks. Players with the permission "buildmode.others" can do /build <player> to set the target into gamemode 1, send a customizable message to the target and player and allow the target to break/place blocks.
    If a player is an the buildmode and types /build again he will get into gamemode 0, receive a customizable message and don't be able to break/place blocks. When the target placer is in build mode and a player with the permission types /build <player> the target player gets into gamemode 0, the player and the target receives a customizable message and the target is not be able to break/place blocks.

    Ideas for commands: /build

    Ideas for permissions: buildmode.use & buildmode.others

    When I'd like it by: As soon as possible


    EDIT:
    I've searched for a similar plugin but the existing plugins are not exactly that, what i need.
    NOTICE: I woul be really thankful if someone can code this plugin for me! :)
     
  2. Offline

    RunsWithShovels

    @baenii When you say "allow him to break / place blocks" and "not be able to break / place blocks", what do you mean?

    From the way this reads, you want a plugin to mask the admin commands for gamemode changing

    What is this plugin used for?
    Should the player not be able to do anything while they are in GM zero ?
    Is this restricted to a certain region or area, if so then what are you using to control that? WorldGaurd?

    Also what plugins have you found that are similar?
     
  3. The player should not be able to break blocks or place blocks. I do not know what this is not to understand.

    No, i just want to add another command. That the gamemode will change on this command is only there to that i don't need to type /gamemode 1 after i enabled the build mode. For understanding: This plugin would come onto a lobby server from a bungeecord network. So when u are not in build mode no one should be able to break a block. Undestand?

    The player just shouldn't be able to break/place any blocks in the lobby when the build mode is deactive.

    As i said: It's for the whole server.

    I can't remember the name of the plugin but i think u understand what i mean now.
     
  4. Offline

    RunsWithShovels

    The part that wasn't clear, was why the player couldn't break or place a block when in survival mode vs creative mode. Thats cleared up.

    So.. you just don't want to have to type /gamemode 1 or /gamemode 0 ? thats it?

    Ok then.. give me a few.
    Just to be clear, are you using any type of grief protection plugin for this server?
     
    Last edited: Dec 17, 2017
  5. I want this command to be able to edit my lobby when needed. In gamemode 0 nobody should be able to break any blocks (including me and all other OPs). But when i type /build i want to be able to build. You understand?

    No. That plugin i requested should be the only plugin that denies building. (when not in build mode)
     
  6. Offline

    RunsWithShovels

    @baenii
    Messages are in config file.

    commands:
    /build <PLAYER>

    permissions:
    buildmode.use for /build
    buildmode.others for /build <PLAYER>

    When any player is in survival it will deny block placement and breaking
    When any player is in creative it will allow block placement and breaking

    Also if a player is in Adventure or Spectator mode, and either runs the /build command or had it ran for them, it will place them in Creative.
     

    Attached Files:

    Last edited: Dec 17, 2017
  7. @RunsWithShovels
    Very nice. Thanks! Can u maybe do in config something to set the gamemode manually on deactivating the build mode? E.g.: "config: gamemode: 2"
    On /build : gamemode 1
    Again /build : gamemode 2

    That would be very nice. :) And also i want to send no message when someone is trying to place/break a block. When i write in the config: block-break-deny: ' ' & block-place-deny: ' ' in the chat comes an empty line when break/place a block. Could u "fix" it?

    Also i prefer to have another inventory when i am in build mode than i am not in build mode.
    Is it possible for you?

    Thanls! :)
     
  8. Offline

    RunsWithShovels

    So you want an option in the config.yml to set what game mode the player is flip flopping creative with?
    I understand.


    ** Disclaimer**
    This feature can cause problems if you go changing what alternating game mode is. If you changes game modes for this section in the config, a player is not in creative, then that player will be stuck in the game mode that they are currently in. I really do not see the purpose of being able to change the if the player is going to be in survival or adventure mode, just pick one. If you're changing the modes of a server that often, then you need to figure out a better option other than this.

    But at your request, you can change the game mode that alternates with Creative mode when the command is run. The choices are Survival=0, Adventure=2, & Spectator=3.


    I've fixed this already. In the new jar, when I complete it, to cancel the messages being sent when trying to break / place blocks, just make the message 'null' in the config. It will generate a new config, so delete the old one, and you will see what I'm talking about.

    EDIT** No change here.

    Let me work on this feature, I'll get back to you when I'm done.

    **Disclaimer**
    When dealing with inventories, you can also have issues. DO NOT try to edit the player files manually. They are set by the code and gotten by the code. It will read and write without any user interaction. If you edit a file, and can't figure out where the error is, and the plugin breaks, you may as well just delete everything and start over.

    And, delete the old config.yml, then reload / restart the server
     

    Attached Files:

    Last edited: Dec 17, 2017
  9. @RunsWithShovels
    Now it's exactly what i needed! But one more "problem".
    If a player (build mode deactivated) tries to break or place a block there comes up an error in the config. Maybe you can make this message gets ignored by the console? I understand why this error is coming and i don't care but i don't want to see it in the console.. That would be friendly! [yellowflower]

    Otherwise I am very happy about your plugin, thank your so very very much! :)
     
  10. Offline

    RunsWithShovels

    You need to post what error you're getting.... Because I'm not getting any errors.
    pastebin.com
     
  11. Offline

    RunsWithShovels

    @baenii
    Those are both the same, but you did delete the config.yml and let the plugin regenerate it right?

    post your config.yml

    *Edit, i didn't see the bottom of the other one. There is a problem in your config.yml
     
  12. That was my false. Now there are diferent errors linked. BlockPlaceEvent and BlockBreakEvent.

    No. I've deleted the old config and than i reloaded the server.

    https://pastebin.com/Rd25w6UE or https://hastebin.com/cutavijumo.pl
    I don't know whats more clear for you.
     
  13. Offline

    RunsWithShovels

    @baenii You have you have any string inside of apostrophes or quotes . Like for your null it should be 'null' or "null"
     
  14. I am such an idiot. Yes that fixed the error. Thanks.^^

    I don't know what i am doing but look at this... :
    http://prntscr.com/how5tm
    https://pastebin.com/QU88iKQk

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited: Dec 17, 2017
  15. Offline

    RunsWithShovels

    Well it looks like you copy and pasted a line from the old config into the new one.

    this line in your config-
    player-change-survival:

    should be this-
    player-change-switchmode:
     
  16. Oh yes, thanks.
     
Thread Status:
Not open for further replies.

Share This Page