本文整理匯總了Java中org.bukkit.plugin.Plugin.getLogger方法的典型用法代碼示例。如果您正苦於以下問題:Java Plugin.getLogger方法的具體用法?Java Plugin.getLogger怎麽用?Java Plugin.getLogger使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.bukkit.plugin.Plugin
的用法示例。
在下文中一共展示了Plugin.getLogger方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: UpdateChecker
import org.bukkit.plugin.Plugin; //導入方法依賴的package包/類
public UpdateChecker(Plugin plugin, String spigotFullId) {
this.plugin = plugin;
this.spigotId = spigotFullId;
try {
this.spigotUrl = new URL("https://www.spigotmc.org/resources/" + spigotId + "/");
} catch (MalformedURLException e) {
throw new IllegalArgumentException("Invalid spigot id: " + spigotId);
}
this.logger = plugin.getLogger();
permission = new Permission(plugin.getName() + ".update");
permission.setDefault(PermissionDefault.OP);
Bukkit.getPluginManager().addPermission(permission);
setInterval(20*60*30);//30 minutes
message = buildMessage();
}
示例2: TabManager
import org.bukkit.plugin.Plugin; //導入方法依賴的package包/類
public TabManager(Plugin plugin,
@Nullable DefaultProvider<Player, ? extends TabView> viewProvider,
@Nullable DefaultProvider<Player, ? extends TabEntry> playerEntryProvider) {
if(viewProvider == null) viewProvider = new TabView.Factory();
if(playerEntryProvider == null) playerEntryProvider = new PlayerTabEntry.Factory();
this.logger = new ClassLogger(plugin.getLogger(), getClass());
this.plugin = plugin;
this.enabledViews = new DefaultMapAdapter<>(viewProvider, true);
this.playerEntries = new DefaultMapAdapter<>(playerEntryProvider, true);
}
示例3: Store
import org.bukkit.plugin.Plugin; //導入方法依賴的package包/類
public Store(Plugin plugin) {
this.plugin = plugin;
this.logger = plugin.getLogger();
this.file = new File(plugin.getDataFolder(), "store.yml");
load();
}
示例4: pluginLogger
import org.bukkit.plugin.Plugin; //導入方法依賴的package包/類
@Override
protected Logger pluginLogger(Plugin plugin) {
return plugin.getLogger();
}
示例5: SkinDownloader
import org.bukkit.plugin.Plugin; //導入方法依賴的package包/類
public SkinDownloader(Plugin pl) {
this.logger = pl.getLogger();
}