AutoReferee

AutoReferee

9.1k Downloads

Change spectators to be in adventure mode with flying

Mustek opened this issue ยท 4 comments

commented
commented

AutoRef now uses the 1.8 spectator gamemode. Closed in #205.

commented

Attempting a different angle on this one: http://twitter.com/rmctourney/status/287019770900000769

Apparently, this works for the most part (Player.setAllowFlight(true) works in any gamemode), but there might be some issues that haven't been considered:

  1. HUD Changes: Creative mode HUD gets rid of hearts, hunger, and armor. Adventure mode will still have this.
  2. Block breaking/placing rules will be inconsistent. Currently, spectators can break blocks, but they will reappear (depending on their role. Referees are actually capable of manipulating the map). Players in adventure mode will not be able to break tool-associated blocks, but others, such as grass or glass will not be consistent with that policy.
  3. Damage: Spectators will be once again affected by damage. This is actually cancelled by AutoReferee, so it is a bit of a non-issue, but one that I hadn't previously considered.

An ideal SPECTATOR gamemode in vanilla Minecraft would do the following, in order of importance (items 1-3 being necessary):

  1. Creative mode flight
  2. Disable all block breaking and placing
  3. Remove the HUD, aside from chat
  4. Disable interaction with chests/inventories (still should be able to view contents)
  5. Make the player invisible, and unable to interact with entities

As for point 5, this means the following:

  1. Arrows pass through
  2. Not taken into account for mob spawning, natural or via spawner
  3. Cannot attack or push mobs
  4. Mobs will not track player under any circumstances
  5. Do not attract Experience Orbs, server- or client-side
commented

Disable interaction with chests/inventories

You probably mean "disable ability to pick items from or put items in the chest", spectators should still be able to see the content of the chest.

As for point 5: Don't forget those xp-orbs!

commented

Updated :)