Force player gamemode on entering world

Discussion in 'Plugin Requests' started by bobbyl140, Jul 8, 2020.

Thread Status:
Not open for further replies.
  1. Offline

    bobbyl140

    I think it would be cool if there was a plugin where you could set a gamemode on a per world basis, and when a player enters that world, forces them into that gamemode. This wouldn't need many features, and could work with all multiple world plugins, because it wouldn't have to tie into any of them. All it would need is to run the gamemode command when a player joins a world.
     
  2. Offline

    gochi9

    This is the plugin

    You can add as many world as you want in the config.The player's gamemode will change when they teleport to a world and that world in the config. When they login and they are in a world that was added in the config. And also when you reload the config it will also change everyone's gameone if you modified a world's gamemode. Also with the config command you can add more worlds. If the player telports/logins or is in a world when you reload the config that was not added to the config the player's gamemode will not change.

    Reload command: /gwpreload - Permisssion: gwp.reloadconfig
     
  3. Offline

    bobbyl140

    Thank you for your response. Is there any way users could bypass this? I know I'm doing something wrong because I am new to using Bukkit. I have tested with and without op, so I am sure it I s a permissions issue.
     
  4. Offline

    gochi9

    The command can only be used with the permission specified and there is no other way around it if that's what you mean by "bypass"
     
  5. Offline

    bobbyl140

    no, I just have something set up incorrectly because when teleporting to a different world my gamemode doesn't switch.
     
  6. Offline

    gochi9

    That is strange.I tested it with the normal world,nether and the end and it worked as intended.Could you show me your config?
     
  7. Offline

    Stellrow

    What events you are checking to detect it?
     
  8. Offline

    gochi9

    PlayerChangedWorldEvent, maybe i could use PlayerTeleportEvent instead but anyways it should work.
     
  9. Offline

    bobbyl140

    when you say config, do you mean config.yml?
     
  10. Offline

    gochi9

  11. Offline

    bobbyl140

    I am putting it here - although I just realized something. I am running NukkitX server, but I have a plugin that can handle Bukkit plugins. Do you think that may have something to do with it? Sorry for my inexperience.

    ------------------------------
    Code:
    # Advanced configuration file for Nukkit
    # Some of these settings are safe, others can break your server if modified incorrectly
    # New settings/defaults won't appear automatically on this file when upgrading
    settings:
     #Multi-language setting
     #Available: eng, chs, cht, jpn, rus, spa, pol, bra, kor, ukr, deu, ltu, cze
     language: "eng"
     #Whether to send all strings translated to server locale or let the device handle them
     force-language: false
     shutdown-message: "§fServer closed on host computer. Contact Bobby at §b(540) 874-2703 §ffor assistance. "
     #Allow listing plugins via Query
     query-plugins: false
     #Show a console message when a plugin uses deprecated API methods
     deprecated-verbose: false
     #Number of AsyncTask workers
     #If set to auto, it'll try to detect the number of cores (and at least 4)
     async-workers: auto
    network:
     #Threshold for batching packets, in bytes. Only these packets will be compressed
     #Set to 0 to compress everything, -1 to disable
     batch-threshold: 256
     #Compression level used of Zlib when sending batched packets. Higher = more CPU, less bandwidth usage
     compression-level: 7
     #Use AsyncTasks for compression. Adds half/one tick delay, less CPU load on main thread
     async-compression: false
    debug:
     #If > 1, it will show debug messages in the console
     level: 1
     #Enables commands: /status /gc
     commands: true
    timings:
     #Enable core and plugin timings by default
     enabled: false
     #Enable monitoring at verbose level, include high-frequency timings
     verbose: false
     #Interval between history frames in ticks
     #Default is 5 minutes (6000 ticks)
     history-interval: 6000
     #Length of the whole timing history in ticks
     #Default is 1 hour (72000 ticks)
     #This value is capped at a maximum of history-interval * 12
     history-length: 72000
     #For special cases of servers with special permission to bypass the max
     #This max helps keep data file sizes reasonable for processing on Aikar's Timing parser side
     #Setting this will not help you bypass the max unless Aikar has added an exception on the API side
     bypass-max: false
     #If set to true, name of your server won't be sent
     privacy: false
     #Settings sections to ignore. These sections won't be sent to Aikar's Timing parser
     #For example: [all] or [settings, timings]
     ignore: []
    level-settings:
     #The default format that levels will use when created
     default-format: anvil
     #Automatically change levels tick rate to maintain 20 ticks per second
     auto-tick-rate: true
     auto-tick-rate-limit: 20
     #Sets the base tick rate (1 = 20 ticks per second, 2 = 10 ticks per second, etc.)
     base-tick-rate: 1
     #Tick all players each tick even when other settings disallow this
     always-tick-players: false
    chunk-sending:
     #Amount of chunks sent to players per tick
     per-tick: 4
     #Amount of chunks sent around each player
     max-chunks: 192
     #Amount of chunks that need to be sent before spawning the player
     spawn-threshold: 56
     #Save a serialized copy of the chunk in memory for faster sending
     #Useful in mostly-static worlds where lots of players join at the same time
     cache-chunks: false
    chunk-ticking:
     #Max amount of chunks processed each tick
     per-tick: 40
     #Radius of chunks around a player to tick
     tick-radius: 3
     light-updates: false
     clear-tick-list: false
    chunk-generation:
     #Max. amount of chunks in the waiting queue to be generated
     queue-size: 8
     #Max. amount of chunks in the waiting queue to be populated
     population-queue-size: 8
    ticks-per:
     animal-spawns: 400
     monster-spawns: 1
     autosave: 6000
     cache-cleanup: 900
    spawn-limits:
     #Max amount of these entities
     monsters: 100
     animals: 100
     water-animals: 100
     ambient: 15
     
    player:
     #If true, player data will be saved as players/playername.dat
     #If false, nukkit won't save player data as "dat" files, in order that plugins can do something on it.
     save-player-data: true
     #The time between skin change action in seconds, set to 0 if you dont want the cooldown
     skin-change-cooldown: 30
     
    aliases:
     #Aliases for commands
     #Examples:
     #showtheversion: version
     ss: [save-all, stop]
     crea: [mw tp creative, gamemode c]
     surv: [mw tp survival, gamemode s]
     lobby: [mw tp lobby, gamemode a]
    worlds:
     #These settings will override the generator set in server.properties and allows loading multiple levels
     #Example:
     #world:
     # seed: 404
     # generator: FLAT:2;7,59x1,3x3,2;1;decoration(treecount=80 grasscount=45)
      Creative:
      Survival:
      Lobby:
      Nether:
     
    Last edited by a moderator: Jul 9, 2020
  12. Online

    timtower Administrator Administrator Moderator

    Locked
    Bedrock and Java edition are very different.
    Please seek this plugin in the Nukkit community.
     
Thread Status:
Not open for further replies.

Share This Page