Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

collapse

Author Topic: As I change a player 's gamemode ?  (Read 537 times)

xXlMisticXx

  • Member

  • Offline
  • *

  • 10
  • Reputation:
    +2/-0
  • Personal Text
    Hi :D !
    • View Profile
    • STAGG PROYECT
As I change a player 's gamemode ?
« on: 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

  • Offline
  • ****

  • 854
  • Reputation:
    +136/-8
  • Personal Text
    Plugin Developer
    • View Profile
    • Pl3x
Re: As I change a player 's gamemode ?
« Reply #1 on: 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

  • Offline
  • *

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

BillyGalbreath

  • Plug-in Maker
  • Hero Member

  • Offline
  • ****

  • 854
  • Reputation:
    +136/-8
  • Personal Text
    Plugin Developer
    • View Profile
    • Pl3x
Re: As I change a player 's gamemode ?
« Reply #3 on: November 21, 2014, 10:27:04 PM »
MC_GameMode is an enumeration.

example:

Code: [Select]
player.setGameMode(MC_GameMode.SURVIVAL);
-Billy

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

 

* Notifications

* Member Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Recent Topics

Бесплатный XEvi by LuisaNap
[Today at 06:28:05 AM]


БЕСПЛАТНЫЙ Xevi by LuisaNap
[Today at 06:27:30 AM]


Возможности by LuisaNap
[Today at 06:27:05 AM]


Халявный Xevil 3.0 р& by LuisaNap
[Today at 06:26:22 AM]


Бесплатный XEvi by LuisaNap
[Today at 06:25:51 AM]

* Forum Stats

  • stats Total Members: 3572
  • stats Total Posts: 12326
  • stats Total Topics: 1692
  • stats Total Categories: 5
  • stats Total Boards: 16
  • stats Most Online: 568