-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
636 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package org.sculk.api.player; | ||
|
||
/* | ||
* ____ _ _ | ||
* / ___| ___ _ _| | | __ | ||
* \___ \ / __| | | | | |/ / | ||
* ___) | (__| |_| | | < | ||
* |____/ \___|\__,_|_|_|\_\ | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* @author: SculkTeams | ||
* @link: http://www.sculkmp.org/ | ||
*/ | ||
|
||
public enum GameMode { | ||
SURVIVAL("Survival", 0), | ||
CREATIVE("Creative", 1), | ||
ADVENTURE("Adventure", 2), | ||
SPECTATOR("Spectator", 3); | ||
|
||
private final String identifier; | ||
private final int id; | ||
|
||
GameMode(String identifier, int id) { | ||
this.identifier = identifier; | ||
this.id = id; | ||
} | ||
|
||
public String getIdentifier() { | ||
return identifier; | ||
} | ||
|
||
public int getId() { | ||
return id; | ||
} | ||
|
||
public static GameMode fromId(int id) { | ||
switch (id) { | ||
case 0: | ||
return SURVIVAL; | ||
case 1: | ||
return CREATIVE; | ||
case 2: | ||
return ADVENTURE; | ||
default: | ||
return SPECTATOR; | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...main/java/org/sculk/server/Operators.java → .../java/org/sculk/api/server/Operators.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package org.sculk.server; | ||
package org.sculk.api.server; | ||
|
||
public interface Operators { | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...main/java/org/sculk/server/Whitelist.java → .../java/org/sculk/api/server/Whitelist.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package org.sculk.server; | ||
package org.sculk.api.server; | ||
|
||
public interface Whitelist { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.