Dreamworld

Dreamworld

What is this?

Dreamworld gives players the chance to wake up in an other, specified "dream" world when they leave their bed.
The dream world has to be specified in the config. If the plugin does not find a world with the specified name, it will automatically attempt to load or even create this world at startup. The default worldname is "dreamworld".
If you want to use a custom world generator for your dream world, I suggest you to first create the world via one of the popular world management plugins (like for example Multiverse).

By default, when a player starts dreaming, their stuff (inventory and other player-state-information) is stored in memory, they are cleared, teleported to a random spawn location (or the dreamworld's spawn location, if you didn't set up random spawn locations yet) and they get assigned some potion effects (high jump, short view range, speed, confusion, etc..) to create some sort of dreaming-impression.

You can configure those potion effects in the config file by the way, together with a lot of other stuff. See below for a complete overview of the configurable features.

After a random time (specified by the config) they get teleported back and restored to their old state.

To handle quits or server restarts during dreams, the plugin ends the dream in those situations (the player gets teleported back and restored). But before that happens the plugin saves the player's current dream-state (his items, effects, location, remaining dream duration, etc.) to file for later continuation (when the player logs back in or the plugin gets enabled again).
In the config there is a option which determines after how many minutes the plugin shall purge those saved dream-states (default: after about 3 days).

If you want to edit the messages which are print to the normal users in certain situations, take a look at the messages.yml file.

What next?

This are the very first basic features for now. But the potential for additional features are endless for that dream scenario. Possible ideas are:

nightmares, dream escapes, treasures, scenarios, tasks, option to make dreaming players invisible for each other, blocking chat, etc..

If I get the time I might add some of them in future releases.

Or if you want to add something: the source code is on github and you are free to make pull requests.

Commands

Not needed in general but maybe helpful..

  • /dw help - Command list.
  • /dw setspawn - Sets the spawn location of your current world.
  • /dw dspawn - Teleports you to the dream world.
  • /dw spawn - Teleports you to the main world's spawn.
  • /dw addspawn - Adds your current location to the list of random dream spawns.
  • /dw clearspawms - Clears the list of random dream spawns.

Permissions

  • dreamworld.dream: Ability to dream. default: true
  • dreamworld.admin: Access to the admin commands. default: op

The default configuration file with explanations

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#--------------------------------#
#           Dreamworld           |
#--------------------------------#

# All dream settings:
dream:

  # If no world with this name exists, it will create one.
  # If you want to use a custom generator, I suggest you to first generate the dream world with a plugin like Multiverse.
  world name: 'dreamworld'

  # Whether or not animals and monsters shall spawn:
  no animal spawning: true
  no monster spawning: false

  # The chance that leaving a bed leads to a dream (between 0 and 100):
  chance: 25

  # The minimal and maximal durations for dreams in seconds:
  min duration in seconds: 25
  max duration in seconds: 300

  # Whether or not the player shall spawn at one of the random spawns when he starts dreaming, instead of the dream worlds spawn:
  spawn randomly each time: true
  random spawns: []

  # The gamemode, health, hunger and potion effects a player starts with:
  gamemode:
    apply: true
    initial gamemode: 2
  health:
    apply: true
    initial health: 20.0
  hunger:
    apply: true
    initial hunger: 20
  potion effects:
    apply: true
    initial potion effects:
      SLOW_DIGGING:
        duration: 2147483647
        level: 20
      JUMP:
        duration: 2147483647
        level: 10
      SPEED:
        duration: 2147483647
        level: 2
      CONFUSION:
        duration: 2147483647
        level: 1
      NIGHT_VISION:
        duration: 2147483647
        level: 100
      BLINDNESS:
        duration: 2147483647
        level: 100

  # Whether or not the player shall be completely cleared on enter and restored on exit:
  clear and restore player: true
  
  # Purge saved dream data after this amount of minutes (should be higher than the max dream duration):
  purge saved dream data after x minutes: 4320
  
  # If the remaining dream seconds are less than those of this setting, the player will skips those remaining seconds if he disconnects or attempts to continue his dream on login:
  ignore if remaining seconds is lower than: 10

  # Whether or not the player's personal visual time shall be modified:
  fake client time:
    enabled: true

    # The time to which the client will be set:
    time (in ticks): 12000

    # Set the time randomly instead? These bounds determine how much the time will randomly differ from the time defined above:
    random bounds: 0

    # The client's time will not change during the dream with this enabled:
    fixed time: true

  # Whether or not it shall rain for the dreaming player:
  fake client weather:
    raining: true
    
  # Whether or not it shall randomly pick one of the sounds from the list below and play it at dream start:
  dream start sound:
    enabled: true
    # format: "sound;volumn;pitch"
    random sounds list:
    - "AMBIENCE_CAVE;1.0;1.0;"
    - "WITHER_SPAWN;1.0;1.0"

  # Disable various stuff for the dreaming player:
  disabled:
    hunger: true
    # Damage settings: If the player dies, he leaves his dream. If the player falls into the void but all damage is disable, he will be respawned at some dream spawn.
    fall damage: true
    entity damage: true
    all damage: true
    item dropping: false
    item pickup: false
    weather: false
    block placing: false
    block breaking: false

  # A list of allowed commands. All other commands are blocked for non-admin players. Make sure to not put any kind of teleportation command in here:
  allowed commands:
  - '/list'
  - '/msg'
  - '/m'
  - '/r'
  - '/reply'
  - '/tell'
  - '/whisper'
  - '/login'
  - '/register'


Bugs found? Or having an idea?

Then please create a ticket. I like tickets.

Changelog

changelog

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of blablubbabc blablubbabc Oct 24, 2013 at 23:56 UTC - 0 likes

    @DiamondObsidian: Go

    You mean to other worlds? Yes, you can. It will even create an additional "dream" world.

  • Avatar of DiamondObsidian DiamondObsidian Oct 24, 2013 at 23:32 UTC - 0 likes

    Can you go to other dimentions with it?

  • Avatar of MikeGold MikeGold Oct 24, 2013 at 22:33 UTC - 0 likes

    Works great for now ;]. Thanks for quick patch.

  • Avatar of blablubbabc blablubbabc Oct 24, 2013 at 16:46 UTC - 0 likes

    @MikeGold: Go

    Hm, my guess is, that you die after you left the dream, because of the fall damage from falling into the void and then being teleported to your old position. But this problem should also occur in the older versions if you entered the dream in survival mode..

    I uploaded a new file:

    v1.4

    • Fixed: fall distance and fire ticks are now reset whenever the player is restored.

    Please let me know if that fixes the issue.

  • Avatar of MikeGold MikeGold Oct 24, 2013 at 16:08 UTC - 0 likes

    Hello, it's me again ;].
    1.3 surely lets you die, but when I fell into the void in my drim, I woke up and died.

  • Avatar of blablubbabc blablubbabc Oct 23, 2013 at 14:26 UTC - 0 likes

    v1.3

    • Fixed: preventing death for non dreaming players.
    • Added: option to play a random sound at dream start. For everyone who is updating: I suggest you to remove the old config and let it regenerate.
  • Avatar of blablubbabc blablubbabc Oct 23, 2013 at 13:58 UTC - 0 likes

    @MikeGold: Go

    Between, I was just testing because of the inventory problem with LimitedCreative:

    For me it seems to work: No matter if I am in creative or survival mode when I lay down in the bed and start dreaming, I get my inventory back afterwards..

    Maybe you have another plugin which interferes?

    Last edited Oct 23, 2013 by blablubbabc
  • Avatar of MikeGold MikeGold Oct 23, 2013 at 13:00 UTC - 0 likes

    Well, my players surely enjoyed a week of stress-less survival. No one even bothered to report it to me until I found it myself ;].

  • Avatar of blablubbabc blablubbabc Oct 23, 2013 at 11:23 UTC - 0 likes

    @MikeGold: Go

    whoops, yes. I forgot to check if the player is actually dreaming. Will be fixed in the next version, which I will try to upload today.

  • Avatar of MikeGold MikeGold Oct 23, 2013 at 11:05 UTC - 0 likes

    I've just discovered a curious little bug in your plugin. Everything works as it should, you won't die when you wake up, but... You can't die anyway. The health goes to the minimal stage with only a piece of one heart and then you can't die. When I remove your plugin from my server everything goes back to normal. When you fall, there is no damage, when you drown, HP goes down to a minimum and you won't die, and with mobs it's the same.

Facts

Date created
Feb 13, 2013
Categories
Last update
Oct 24, 2013
Development stage
Release
License
All Rights Reserved
Curse link
Dreamworld
Downloads
3,192
Recent files
  • R: 1.4 for 1.7.4 Oct 24, 2013
  • R: 1.3 for 1.6.4 Oct 23, 2013
  • R: 1.2 for 1.6.4 Oct 15, 2013
  • R: 1.1 for 1.6.4 Oct 14, 2013
  • R: 1.0 for 1.6.4 Oct 12, 2013

Authors