Skip to content

Commit

Permalink
visual code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
NonSwag committed Jun 15, 2024
1 parent dec1320 commit 8e53bc0
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/main/java/net/thenextlvl/gopaint/GoPaintPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
import org.incendo.cloud.annotations.AnnotationParser;
import org.incendo.cloud.bukkit.CloudBukkitCapabilities;
Expand Down Expand Up @@ -79,7 +78,7 @@ public void onEnable() {
if (hasOriginalGoPaint()) {
getComponentLogger().error("goPaintAdvanced is a replacement for goPaint. Please use one instead of both");
getComponentLogger().error("This plugin is now disabling to prevent future errors");
getServer().getPluginManager().disablePlugin(this);
Bukkit.getPluginManager().disablePlugin(this);
return;
}

Expand All @@ -89,7 +88,7 @@ public void onEnable() {
if (!brush.isItem()) {
getComponentLogger().error("{} is not a valid default brush, it has to be an item", brush.name());
getComponentLogger().error("For more information visit {}", PAPER_DOCS);
getServer().getPluginManager().disablePlugin(this);
Bukkit.getPluginManager().disablePlugin(this);
}

registerListeners();
Expand Down Expand Up @@ -117,14 +116,13 @@ private void registerCommands() {
}

private void registerListeners() {
PluginManager pm = getServer().getPluginManager();
pm.registerEvents(new InventoryListener(brushManager()), this);
pm.registerEvents(new InteractListener(this), this);
pm.registerEvents(new ConnectListener(brushManager()), this);
Bukkit.getPluginManager().registerEvents(new InventoryListener(brushManager()), this);
Bukkit.getPluginManager().registerEvents(new InteractListener(this), this);
Bukkit.getPluginManager().registerEvents(new ConnectListener(brushManager()), this);
}

private boolean hasOriginalGoPaint() {
return getServer().getPluginManager().getPlugin("goPaint") != this;
return Bukkit.getPluginManager().getPlugin("goPaint") != this;
}

private @Nullable AnnotationParser<CommandSender> enableCommandSystem() {
Expand Down

0 comments on commit 8e53bc0

Please sign in to comment.