本文整理汇总了Java中org.inventivetalent.mapmanager.controller.MapController类的典型用法代码示例。如果您正苦于以下问题:Java MapController类的具体用法?Java MapController怎么用?Java MapController使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MapController类属于org.inventivetalent.mapmanager.controller包,在下文中一共展示了MapController类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addViewer
import org.inventivetalent.mapmanager.controller.MapController; //导入依赖的package包/类
public void addViewer(Player player) {
if (this.mapWrappers != null) {
for (MapWrapper wrapper : mapWrappers) {
if (wrapper == null) {
plugin.getLogger().warning("Null-element in MapWrapper array of " + getName());
continue;
}
MapController controller = wrapper.getController();
controller.addViewer(player);
controller.sendContent(player);
}
}
synchronized (this.worldPlayersLock) {
this.worldPlayers.add(player.getUniqueId());
}
}
示例2: removeViewer
import org.inventivetalent.mapmanager.controller.MapController; //导入依赖的package包/类
public void removeViewer(OfflinePlayer player) {
boolean empty;
synchronized (this.worldPlayersLock) {
this.worldPlayers.remove(player.getUniqueId());
empty = this.worldPlayers.isEmpty();
}
if (this.mapWrappers != null) {
for (MapWrapper wrapper : mapWrappers) {
if (wrapper == null) {
plugin.getLogger().warning("Null-element in MapWrapper array of " + getName());
continue;
}
MapController controller = wrapper.getController();
if (empty) {
controller.clearViewers();
} else {
controller.removeViewer(player);
}
}
}
}
示例3: getController
import org.inventivetalent.mapmanager.controller.MapController; //导入依赖的package包/类
public MapController getController() {
return controller;
}
示例4: getController
import org.inventivetalent.mapmanager.controller.MapController; //导入依赖的package包/类
/**
* Get this {@link MapWrapper}'s {@link MapController}
*
* @return the {@link MapController}
*/
MapController getController();