collapse

: As I change a player 's gamemode ?  ( 606 )

xXlMisticXx

  • Member
  • *
  • : 10
  • Reputation: +2/-0
  • Hi :D !
    • STAGG PROYECT
As I change a player 's gamemode ?
« : November 21, 2014, 10:03:34 PM »
Hi, I 'm working on a plugin (obviously :) ) and I was wondering how to change the game mode of a player without having to resort to using ExecuteCommand ();

Thanks in advance.  :D :D :D



BillyGalbreath

  • Plug-in Maker
  • Hero Member
  • ****
  • : 854
  • Reputation: +136/-8
  • Plugin Developer
    • Pl3x
Re: As I change a player 's gamemode ?
« #1 : November 21, 2014, 10:18:11 PM »
MC_Player.setGameMode(MC_GameMode);

Would have answered this in IRC if you would have stayed on longer than 2 minutes...
-Billy

I have moved over to the Spigot 1.8 project. \o/

xXlMisticXx

  • Member
  • *
  • : 10
  • Reputation: +2/-0
  • Hi :D !
    • STAGG PROYECT
Re: As I change a player 's gamemode ?
« #2 : November 21, 2014, 10:24:43 PM »
But MC_GameMode it's a integer or something like that ?

BillyGalbreath

  • Plug-in Maker
  • Hero Member
  • ****
  • : 854
  • Reputation: +136/-8
  • Plugin Developer
    • Pl3x
Re: As I change a player 's gamemode ?
« #3 : November 21, 2014, 10:27:04 PM »
MC_GameMode is an enumeration.

example:

:
player.setGameMode(MC_GameMode.SURVIVAL);
-Billy

I have moved over to the Spigot 1.8 project. \o/

 

* Notifications

* Member Info

 
 

* Recent Topics

Re: Thoughts on Minecraft 1.13 Fredashay
[February 07, 2018, 06:24:46 PM]


Re: Thoughts on Minecraft 1.13 CodeCrafter47
[February 07, 2018, 09:29:50 AM]


Re: Thoughts on Minecraft 1.13 JD9999
[January 23, 2018, 05:38:41 AM]


Re: Thoughts on Minecraft 1.13 UnknownUser500
[January 21, 2018, 12:36:40 PM]


Re: Thoughts on Minecraft 1.13 BlackScorpion
[January 20, 2018, 04:00:58 PM]

* Forum Stats

  • stats : 3684
  • stats : 12313
  • stats : 1663
  • stats : 5
  • stats : 16
  • stats Most Online: 568
Powered by SMFPacks Alerts Pro Mod
SimplePortal 2.3.5 © 2008-2012, SimplePortal