Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
Server.java
1 package org.bukkit;
2 
3 import java.awt.image.BufferedImage;
4 import java.io.File;
5 import java.util.Iterator;
6 import java.util.List;
7 import java.util.Map;
8 import java.util.Set;
9 import java.util.UUID;
10 import java.util.logging.Logger;
11 
17 import org.bukkit.entity.Player;
20 import org.bukkit.help.HelpMap;
24 import org.bukkit.inventory.Recipe;
25 import org.bukkit.map.MapView;
34 
35 import com.avaje.ebean.config.ServerConfig;
36 
39 
40 /**
41  * Represents a server implementation.
42  */
43 public interface Server extends PluginMessageRecipient {
44 
45  /**
46  * Used for all administrative messages, such as an operator using a
47  * command.
48  * <p>
49  * For use in {@link #broadcast(java.lang.String, java.lang.String)}.
50  */
51  public static final String BROADCAST_CHANNEL_ADMINISTRATIVE = "bukkit.broadcast.admin";
52 
53  /**
54  * Used for all announcement messages, such as informing users that a
55  * player has joined.
56  * <p>
57  * For use in {@link #broadcast(java.lang.String, java.lang.String)}.
58  */
59  public static final String BROADCAST_CHANNEL_USERS = "bukkit.broadcast.user";
60 
61  /**
62  * Gets the name of this server implementation.
63  *
64  * @return name of this server implementation
65  */
66  public String getName();
67 
68  /**
69  * Gets the version string of this server implementation.
70  *
71  * @return version of this server implementation
72  */
73  public String getVersion();
74 
75  /**
76  * Gets the Bukkit version that this server is running.
77  *
78  * @return version of Bukkit
79  */
80  public String getBukkitVersion();
81 
82  /**
83  * Gets a list of all currently logged in players.
84  *
85  * @return an array of Players that are currently online
86  */
87  public Player[] getOnlinePlayers();
88 
89  /**
90  * Get the maximum amount of players which can login to this server.
91  *
92  * @return the amount of players this server allows
93  */
94  public int getMaxPlayers();
95 
96  /**
97  * Get the game port that the server runs on.
98  *
99  * @return the port number of this server
100  */
101  public int getPort();
102 
103  /**
104  * Get the view distance from this server.
105  *
106  * @return the view distance from this server.
107  */
108  public int getViewDistance();
109 
110  /**
111  * Get the IP that this server is bound to, or empty string if not
112  * specified.
113  *
114  * @return the IP string that this server is bound to, otherwise empty
115  * string
116  */
117  public String getIp();
118 
119  /**
120  * Get the name of this server.
121  *
122  * @return the name of this server
123  */
124  public String getServerName();
125 
126  /**
127  * Get an ID of this server. The ID is a simple generally alphanumeric ID
128  * that can be used for uniquely identifying this server.
129  *
130  * @return the ID of this server
131  */
132  public String getServerId();
133 
134  /**
135  * Get world type (level-type setting) for default world.
136  *
137  * @return the value of level-type (e.g. DEFAULT, FLAT, DEFAULT_1_1)
138  */
139  public String getWorldType();
140 
141  /**
142  * Get generate-structures setting.
143  *
144  * @return true if structure generation is enabled, false otherwise
145  */
146  public boolean getGenerateStructures();
147 
148  /**
149  * Gets whether this server allows the End or not.
150  *
151  * @return whether this server allows the End or not
152  */
153  public boolean getAllowEnd();
154 
155  /**
156  * Gets whether this server allows the Nether or not.
157  *
158  * @return whether this server allows the Nether or not
159  */
160  public boolean getAllowNether();
161 
162  /**
163  * Gets whether this server has a whitelist or not.
164  *
165  * @return whether this server has a whitelist or not
166  */
167  public boolean hasWhitelist();
168 
169  /**
170  * Sets if the server is whitelisted.
171  *
172  * @param value true for whitelist on, false for off
173  */
174  public void setWhitelist(boolean value);
175 
176  /**
177  * Gets a list of whitelisted players.
178  *
179  * @return a set containing all whitelisted players
180  */
181  public Set<OfflinePlayer> getWhitelistedPlayers();
182 
183  /**
184  * Reloads the whitelist from disk.
185  */
186  public void reloadWhitelist();
187 
188  /**
189  * Broadcast a message to all players.
190  * <p>
191  * This is the same as calling {@link #broadcast(java.lang.String,
192  * java.lang.String)} to {@link #BROADCAST_CHANNEL_USERS}
193  *
194  * @param message the message
195  * @return the number of players
196  */
197  public int broadcastMessage(String message);
198 
199  /**
200  * Gets the name of the update folder. The update folder is used to safely
201  * update plugins at the right moment on a plugin load.
202  * <p>
203  * The update folder name is relative to the plugins folder.
204  *
205  * @return the name of the update folder
206  */
207  public String getUpdateFolder();
208 
209  /**
210  * Gets the update folder. The update folder is used to safely update
211  * plugins at the right moment on a plugin load.
212  *
213  * @return the update folder
214  */
215  public File getUpdateFolderFile();
216 
217  /**
218  * Gets the value of the connection throttle setting.
219  *
220  * @return the value of the connection throttle setting
221  */
222  public long getConnectionThrottle();
223 
224  /**
225  * Gets default ticks per animal spawns value.
226  * <p>
227  * <b>Example Usage:</b>
228  * <ul>
229  * <li>A value of 1 will mean the server will attempt to spawn monsters
230  * every tick.
231  * <li>A value of 400 will mean the server will attempt to spawn monsters
232  * every 400th tick.
233  * <li>A value below 0 will be reset back to Minecraft's default.
234  * </ul>
235  * <p>
236  * <b>Note:</b> If set to 0, animal spawning will be disabled. We
237  * recommend using spawn-animals to control this instead.
238  * <p>
239  * Minecraft default: 400.
240  *
241  * @return the default ticks per animal spawns value
242  */
243  public int getTicksPerAnimalSpawns();
244 
245  /**
246  * Gets the default ticks per monster spawns value.
247  * <p>
248  * <b>Example Usage:</b>
249  * <ul>
250  * <li>A value of 1 will mean the server will attempt to spawn monsters
251  * every tick.
252  * <li>A value of 400 will mean the server will attempt to spawn monsters
253  * every 400th tick.
254  * <li>A value below 0 will be reset back to Minecraft's default.
255  * </ul>
256  * <p>
257  * <b>Note:</b> If set to 0, monsters spawning will be disabled. We
258  * recommend using spawn-monsters to control this instead.
259  * <p>
260  * Minecraft default: 1.
261  *
262  * @return the default ticks per monsters spawn value
263  */
264  public int getTicksPerMonsterSpawns();
265 
266  /**
267  * Gets a player object by the given username.
268  * <p>
269  * This method may not return objects for offline players.
270  *
271  * @deprecated Use {@link #getPlayer(UUID)} as player names are no longer
272  * guaranteed to be unique
273  * @param name the name to look up
274  * @return a player if one was found, null otherwise
275  */
276  @Deprecated
277  public Player getPlayer(String name);
278 
279  /**
280  * Gets the player with the exact given name, case insensitive.
281  *
282  * @deprecated Use {@link #getPlayer(UUID)} as player names are no longer
283  * guaranteed to be unique
284  * @param name Exact name of the player to retrieve
285  * @return a player object if one was found, null otherwise
286  */
287  @Deprecated
288  public Player getPlayerExact(String name);
289 
290  /**
291  * Attempts to match any players with the given name, and returns a list
292  * of all possibly matches.
293  * <p>
294  * This list is not sorted in any particular order. If an exact match is
295  * found, the returned list will only contain a single result.
296  *
297  * @deprecated Use {@link #getPlayer(UUID)} as player names are no longer
298  * guaranteed to be unique
299  * @param name the (partial) name to match
300  * @return list of all possible players
301  */
302  @Deprecated
303  public List<Player> matchPlayer(String name);
304 
305  /**
306  * Gets the player with the given UUID.
307  *
308  * @param id UUID of the player to retrieve
309  * @return a player object if one was found, null otherwise
310  */
311  public Player getPlayer(UUID id);
312 
313  /**
314  * Gets the plugin manager for interfacing with plugins.
315  *
316  * @return a plugin manager for this Server instance
317  */
319 
320  /**
321  * Gets the scheduler for managing scheduled events.
322  *
323  * @return a scheduling service for this server
324  */
325  public BukkitScheduler getScheduler();
326 
327  /**
328  * Gets a services manager.
329  *
330  * @return s services manager
331  */
333 
334  /**
335  * Gets a list of all worlds on this server.
336  *
337  * @return a list of worlds
338  */
339  public List<World> getWorlds();
340 
341  /**
342  * Creates or loads a world with the given name using the specified
343  * options.
344  * <p>
345  * If the world is already loaded, it will just return the equivalent of
346  * getWorld(creator.name()).
347  *
348  * @param creator the options to use when creating the world
349  * @return newly created or loaded world
350  */
351  public World createWorld(WorldCreator creator);
352 
353  /**
354  * Unloads a world with the given name.
355  *
356  * @param name Name of the world to unload
357  * @param save whether to save the chunks before unloading
358  * @return true if successful, false otherwise
359  */
360  public boolean unloadWorld(String name, boolean save);
361 
362  /**
363  * Unloads the given world.
364  *
365  * @param world the world to unload
366  * @param save whether to save the chunks before unloading
367  * @return true if successful, false otherwise
368  */
369  public boolean unloadWorld(World world, boolean save);
370 
371  /**
372  * Gets the world with the given name.
373  *
374  * @param name the name of the world to retrieve
375  * @return a world with the given name, or null if none exists
376  */
377  public World getWorld(String name);
378 
379  /**
380  * Gets the world from the given Unique ID.
381  *
382  * @param uid a unique-id of the world to retrieve
383  * @return a world with the given Unique ID, or null if none exists
384  */
385  public World getWorld(UUID uid);
386 
387  /**
388  * Gets the map from the given item ID.
389  *
390  * @param id the id of the map to get
391  * @return a map view if it exists, or null otherwise
392  * @deprecated Magic value
393  */
394  @Deprecated
395  public MapView getMap(short id);
396 
397  /**
398  * Create a new map with an automatically assigned ID.
399  *
400  * @param world the world the map will belong to
401  * @return a newly created map view
402  */
403  public MapView createMap(World world);
404 
405  /**
406  * Reloads the server, refreshing settings and plugin information.
407  */
408  public void reload();
409 
410  /**
411  * Returns the primary logger associated with this server instance.
412  *
413  * @return Logger associated with this server
414  */
415  public Logger getLogger();
416 
417  /**
418  * Gets a {@link PluginCommand} with the given name or alias.
419  *
420  * @param name the name of the command to retrieve
421  * @return a plugin command if found, null otherwise
422  */
423  public PluginCommand getPluginCommand(String name);
424 
425  /**
426  * Writes loaded players to disk.
427  */
428  public void savePlayers();
429 
430  /**
431  * Dispatches a command on this server, and executes it if found.
432  *
433  * @param sender the apparent sender of the command
434  * @param commandLine the command + arguments. Example: <code>test abc
435  * 123</code>
436  * @return returns false if no target is found
437  * @throws CommandException thrown when the executor for the given command
438  * fails with an unhandled exception
439  */
440  public boolean dispatchCommand(CommandSender sender, String commandLine) throws CommandException;
441 
442  /**
443  * Populates a given {@link ServerConfig} with values attributes to this
444  * server.
445  *
446  * @param config the server config to populate
447  */
448  public void configureDbConfig(ServerConfig config);
449 
450  /**
451  * Adds a recipe to the crafting manager.
452  *
453  * @param recipe the recipe to add
454  * @return true if the recipe was added, false if it wasn't for some
455  * reason
456  */
457  public boolean addRecipe(Recipe recipe);
458 
459  /**
460  * Get a list of all recipes for a given item. The stack size is ignored
461  * in comparisons. If the durability is -1, it will match any data value.
462  *
463  * @param result the item to match against recipe results
464  * @return a list of recipes with the given result
465  */
466  public List<Recipe> getRecipesFor(ItemStack result);
467 
468  /**
469  * Get an iterator through the list of crafting recipes.
470  *
471  * @return an iterator
472  */
473  public Iterator<Recipe> recipeIterator();
474 
475  /**
476  * Clears the list of crafting recipes.
477  */
478  public void clearRecipes();
479 
480  /**
481  * Resets the list of crafting recipes to the default.
482  */
483  public void resetRecipes();
484 
485  /**
486  * Gets a list of command aliases defined in the server properties.
487  *
488  * @return a map of aliases to command names
489  */
490  public Map<String, String[]> getCommandAliases();
491 
492  /**
493  * Gets the radius, in blocks, around each worlds spawn point to protect.
494  *
495  * @return spawn radius, or 0 if none
496  */
497  public int getSpawnRadius();
498 
499  /**
500  * Sets the radius, in blocks, around each worlds spawn point to protect.
501  *
502  * @param value new spawn radius, or 0 if none
503  */
504  public void setSpawnRadius(int value);
505 
506  /**
507  * Gets whether the Server is in online mode or not.
508  *
509  * @return true if the server authenticates clients, false otherwise
510  */
511  public boolean getOnlineMode();
512 
513  /**
514  * Gets whether this server allows flying or not.
515  *
516  * @return true if the server allows flight, false otherwise
517  */
518  public boolean getAllowFlight();
519 
520  /**
521  * Gets whether the server is in hardcore mode or not.
522  *
523  * @return true if the server mode is hardcore, false otherwise
524  */
525  public boolean isHardcore();
526 
527  /**
528  * Gets whether to use vanilla (false) or exact behaviour (true).
529  *
530  * <ul>
531  * <li>Vanilla behaviour: check for collisions and move the player if
532  * needed.
533  * <li>Exact behaviour: spawn players exactly where they should be.
534  * </ul>
535  *
536  * @return true if exact location locations are used for spawning, false
537  * for vanilla collision detection or otherwise
538  */
539  public boolean useExactLoginLocation();
540 
541  /**
542  * Shutdowns the server, stopping everything.
543  */
544  public void shutdown();
545 
546  /**
547  * Broadcasts the specified message to every user with the given
548  * permission name.
549  *
550  * @param message message to broadcast
551  * @param permission the required permission {@link Permissible
552  * permissibles} must have to receive the broadcast
553  * @return number of message recipients
554  */
555  public int broadcast(String message, String permission);
556 
557  /**
558  * Gets the player by the given name, regardless if they are offline or
559  * online.
560  * <p>
561  * This method may involve a blocking web request to get the UUID for the
562  * given name.
563  * <p>
564  * This will return an object even if the player does not exist. To this
565  * method, all players will exist.
566  *
567  * @deprecated Persistent storage of users should be by UUID as names are no longer
568  * unique past a single session.
569  * @param name the name the player to retrieve
570  * @return an offline player
571  * @see #getOfflinePlayer(java.util.UUID)
572  */
573  @Deprecated
574  public OfflinePlayer getOfflinePlayer(String name);
575 
576  /**
577  * Gets the player by the given UUID, regardless if they are offline or
578  * online.
579  * <p>
580  * This will return an object even if the player does not exist. To this
581  * method, all players will exist.
582  *
583  * @param id the UUID of the player to retrieve
584  * @return an offline player
585  */
586  public OfflinePlayer getOfflinePlayer(UUID id);
587 
588  /**
589  * Gets a set containing all current IPs that are banned.
590  *
591  * @return a set containing banned IP addresses
592  */
593  public Set<String> getIPBans();
594 
595  /**
596  * Bans the specified address from the server.
597  *
598  * @param address the IP address to ban
599  */
600  public void banIP(String address);
601 
602  /**
603  * Unbans the specified address from the server.
604  *
605  * @param address the IP address to unban
606  */
607  public void unbanIP(String address);
608 
609  /**
610  * Gets a set containing all banned players.
611  *
612  * @return a set containing banned players
613  */
614  public Set<OfflinePlayer> getBannedPlayers();
615 
616  /**
617  * Gets a ban list for the supplied type.
618  * <p>
619  * Bans by name are no longer supported and this method will return
620  * null when trying to request them. The replacement is bans by UUID.
621  *
622  * @param type the type of list to fetch, cannot be null
623  * @return a ban list of the specified type
624  */
625  public BanList getBanList(BanList.Type type);
626 
627  /**
628  * Gets a set containing all player operators.
629  *
630  * @return a set containing player operators
631  */
632  public Set<OfflinePlayer> getOperators();
633 
634  /**
635  * Gets the default {@link GameMode} for new players.
636  *
637  * @return the default game mode
638  */
639  public GameMode getDefaultGameMode();
640 
641  /**
642  * Sets the default {@link GameMode} for new players.
643  *
644  * @param mode the new game mode
645  */
646  public void setDefaultGameMode(GameMode mode);
647 
648  /**
649  * Gets a {@link ConsoleCommandSender} that may be used as an input source
650  * for this server.
651  *
652  * @return a console command sender
653  */
655 
656  /**
657  * Gets the folder that contains all of the various {@link World}s.
658  *
659  * @return folder that contains all worlds
660  */
661  public File getWorldContainer();
662 
663  /**
664  * Gets every player that has ever played on this server.
665  *
666  * @return an array containing all previous players
667  */
668  public OfflinePlayer[] getOfflinePlayers();
669 
670  /**
671  * Gets the {@link Messenger} responsible for this server.
672  *
673  * @return messenger responsible for this server
674  */
675  public Messenger getMessenger();
676 
677  /**
678  * Gets the {@link HelpMap} providing help topics for this server.
679  *
680  * @return a help map for this server
681  */
682  public HelpMap getHelpMap();
683 
684  /**
685  * Creates an empty inventory of the specified type. If the type is {@link
686  * InventoryType#CHEST}, the new inventory has a size of 27; otherwise the
687  * new inventory has the normal size for its type.
688  *
689  * @param owner the holder of the inventory, or null to indicate no holder
690  * @param type the type of inventory to create
691  * @return a new inventory
692  */
694 
695  /**
696  * Creates an empty inventory with the specified type and title. If the type
697  * is {@link InventoryType#CHEST}, the new inventory has a size of 27;
698  * otherwise the new inventory has the normal size for its type.<br />
699  * It should be noted that some inventory types do not support titles and
700  * may not render with said titles on the Minecraft client.
701  *
702  * @param owner The holder of the inventory; can be null if there's no holder.
703  * @param type The type of inventory to create.
704  * @param title The title of the inventory, to be displayed when it is viewed.
705  * @return The new inventory.
706  */
707  Inventory createInventory(InventoryHolder owner, InventoryType type, String title);
708 
709  /**
710  * Creates an empty inventory of type {@link InventoryType#CHEST} with the
711  * specified size.
712  *
713  * @param owner the holder of the inventory, or null to indicate no holder
714  * @param size a multiple of 9 as the size of inventory to create
715  * @return a new inventory
716  * @throws IllegalArgumentException if the size is not a multiple of 9
717  */
718  Inventory createInventory(InventoryHolder owner, int size) throws IllegalArgumentException;
719 
720  /**
721  * Creates an empty inventory of type {@link InventoryType#CHEST} with the
722  * specified size and title.
723  *
724  * @param owner the holder of the inventory, or null to indicate no holder
725  * @param size a multiple of 9 as the size of inventory to create
726  * @param title the title of the inventory, displayed when inventory is
727  * viewed
728  * @return a new inventory
729  * @throws IllegalArgumentException if the size is not a multiple of 9
730  */
731  Inventory createInventory(InventoryHolder owner, int size, String title) throws IllegalArgumentException;
732 
733  /**
734  * Gets user-specified limit for number of monsters that can spawn in a
735  * chunk.
736  *
737  * @return the monster spawn limit
738  */
739  int getMonsterSpawnLimit();
740 
741  /**
742  * Gets user-specified limit for number of animals that can spawn in a
743  * chunk.
744  *
745  * @return the animal spawn limit
746  */
747  int getAnimalSpawnLimit();
748 
749  /**
750  * Gets user-specified limit for number of water animals that can spawn in
751  * a chunk.
752  *
753  * @return the water animal spawn limit
754  */
756 
757  /**
758  * Gets user-specified limit for number of ambient mobs that can spawn in
759  * a chunk.
760  *
761  * @return the ambient spawn limit
762  */
763  int getAmbientSpawnLimit();
764 
765  /**
766  * Checks the current thread against the expected primary thread for the
767  * server.
768  * <p>
769  * <b>Note:</b> this method should not be used to indicate the current
770  * synchronized state of the runtime. A current thread matching the main
771  * thread indicates that it is synchronized, but a mismatch <b>does not
772  * preclude</b> the same assumption.
773  *
774  * @return true if the current thread matches the expected primary thread,
775  * false otherwise
776  */
777  boolean isPrimaryThread();
778 
779  /**
780  * Gets the message that is displayed on the server list.
781  *
782  * @return the servers MOTD
783  */
784  String getMotd();
785 
786  /**
787  * Gets the default message that is displayed when the server is stopped.
788  *
789  * @return the shutdown message
790  */
791  String getShutdownMessage();
792 
793  /**
794  * Gets the current warning state for the server.
795  *
796  * @return the configured warning state
797  */
798  public WarningState getWarningState();
799 
800  /**
801  * Gets the instance of the item factory (for {@link ItemMeta}).
802  *
803  * @return the item factory
804  * @see ItemFactory
805  */
807 
808  /**
809  * Gets the instance of the scoreboard manager.
810  * <p>
811  * This will only exist after the first world has loaded.
812  *
813  * @return the scoreboard manager or null if no worlds are loaded.
814  */
816 
817  /**
818  * Gets an instance of the server's default server-icon.
819  *
820  * @return the default server-icon; null values may be used by the
821  * implementation to indicate no defined icon, but this behavior is
822  * not guaranteed
823  */
825 
826  /**
827  * Loads an image from a file, and returns a cached image for the specific
828  * server-icon.
829  * <p>
830  * Size and type are implementation defined. An incompatible file is
831  * guaranteed to throw an implementation-defined {@link Exception}.
832  *
833  * @param file the file to load the from
834  * @throws IllegalArgumentException if image is null
835  * @throws Exception if the image does not meet current server server-icon
836  * specifications
837  * @return a cached server-icon that can be used for a {@link
838  * ServerListPingEvent#setServerIcon(CachedServerIcon)}
839  */
840  CachedServerIcon loadServerIcon(File file) throws IllegalArgumentException, Exception;
841 
842  /**
843  * Creates a cached server-icon for the specific image.
844  * <p>
845  * Size and type are implementation defined. An incompatible file is
846  * guaranteed to throw an implementation-defined {@link Exception}.
847  *
848  * @param image the image to use
849  * @throws IllegalArgumentException if image is null
850  * @throws Exception if the image does not meet current server
851  * server-icon specifications
852  * @return a cached server-icon that can be used for a {@link
853  * ServerListPingEvent#setServerIcon(CachedServerIcon)}
854  */
855  CachedServerIcon loadServerIcon(BufferedImage image) throws IllegalArgumentException, Exception;
856 
857  /**
858  * Set the idle kick timeout. Any players idle for the specified amount of
859  * time will be automatically kicked.
860  * <p>
861  * A value of 0 will disable the idle kick timeout.
862  *
863  * @param threshold the idle timeout in minutes
864  */
865  public void setIdleTimeout(int threshold);
866 
867  /**
868  * Gets the idle kick timeout.
869  *
870  * @return the idle timeout in minutes
871  */
872  public int getIdleTimeout();
873 
874  /**
875  * @see UnsafeValues
876  */
877  @Deprecated
879 }
String getServerName()
void setDefaultGameMode(GameMode mode)
BanList getBanList(BanList.Type type)
Set< OfflinePlayer > getOperators()
int broadcastMessage(String message)
MapView getMap(short id)
List< World > getWorlds()
int getMonsterSpawnLimit()
boolean getAllowNether()
int getAnimalSpawnLimit()
ScoreboardManager getScoreboardManager()
CachedServerIcon loadServerIcon(File file)
PluginCommand getPluginCommand(String name)
static final String BROADCAST_CHANNEL_USERS
Definition: Server.java:59
int getTicksPerMonsterSpawns()
List< Player > matchPlayer(String name)
int getTicksPerAnimalSpawns()
UnsafeValues getUnsafe()
boolean getOnlineMode()
File getWorldContainer()
long getConnectionThrottle()
void setSpawnRadius(int value)
Set< String > getIPBans()
World createWorld(WorldCreator creator)
PluginManager getPluginManager()
Iterator< Recipe > recipeIterator()
Set< OfflinePlayer > getBannedPlayers()
OfflinePlayer getOfflinePlayer(String name)
Messenger getMessenger()
ItemFactory getItemFactory()
static final String BROADCAST_CHANNEL_ADMINISTRATIVE
Definition: Server.java:51
String getUpdateFolder()
boolean isHardcore()
boolean useExactLoginLocation()
int getAmbientSpawnLimit()
Player getPlayerExact(String name)
World getWorld(String name)
int getWaterAnimalSpawnLimit()
boolean dispatchCommand(CommandSender sender, String commandLine)
boolean getAllowEnd()
void reloadWhitelist()
OfflinePlayer[] getOfflinePlayers()
boolean addRecipe(Recipe recipe)
boolean getGenerateStructures()
void unbanIP(String address)
Inventory createInventory(InventoryHolder owner, InventoryType type)
MapView createMap(World world)
Player getPlayer(String name)
String getServerId()
ConsoleCommandSender getConsoleSender()
CachedServerIcon getServerIcon()
void banIP(String address)
void setWhitelist(boolean value)
boolean hasWhitelist()
String getWorldType()
HelpMap getHelpMap()
File getUpdateFolderFile()
Map< String, String[]> getCommandAliases()
boolean getAllowFlight()
boolean unloadWorld(String name, boolean save)
void configureDbConfig(ServerConfig config)
String getBukkitVersion()
String getShutdownMessage()
WarningState getWarningState()
Logger getLogger()
Player[] getOnlinePlayers()
String getVersion()
Set< OfflinePlayer > getWhitelistedPlayers()
void setIdleTimeout(int threshold)
ServicesManager getServicesManager()
GameMode getDefaultGameMode()
boolean isPrimaryThread()
int broadcast(String message, String permission)
BukkitScheduler getScheduler()
List< Recipe > getRecipesFor(ItemStack result)