Skip to content

Commit

Permalink
Update copyright year
Browse files Browse the repository at this point in the history
  • Loading branch information
Badbird5907 committed Jun 28, 2023
1 parent bc395a7 commit 68beebb
Show file tree
Hide file tree
Showing 82 changed files with 93 additions and 105 deletions.
2 changes: 1 addition & 1 deletion Commander-Bukkit/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -64,8 +64,7 @@ public class BukkitPlatform implements CommanderPlatform {

public BukkitPlatform(Plugin plugin) {
this.plugin = plugin;
if (plugin.getServer().getPluginManager() instanceof SimplePluginManager) {
SimplePluginManager manager = (SimplePluginManager) plugin.getServer().getPluginManager();
if (plugin.getServer().getPluginManager() instanceof SimplePluginManager manager) {
try {
Field field = SimplePluginManager.class.getDeclaredField("commandMap");
field.setAccessible(true);
Expand Down Expand Up @@ -96,8 +95,7 @@ public void handleCommandException(CommandContext ctx, CommandException e) {

@Override
public void handleCommandException(CommandInfo info, CoreCommandSender sender, CommandException e) {
if (e instanceof LocalizedCommandException) {
LocalizedCommandException lce = (LocalizedCommandException) e;
if (e instanceof LocalizedCommandException lce) {
ResponseHandler handler = lce.getResponseHandler();
if (handler == null) {
throw new NullPointerException("Could not find a instance of ResponseHandler to handle command exception: " + e.getClass().getName());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -44,7 +44,7 @@ public void sendHelp(CommandContext ctx, CoreCommandSender sender) {

@Override
public void sendHelp(CommandInfo info, CoreCommandSender sender) {
sender.sendMessage(ChatColor.GRAY + "" + ChatColor.STRIKETHROUGH + "--------------------------------");
sender.sendMessage(ChatColor.GRAY + String.valueOf(ChatColor.STRIKETHROUGH) + "--------------------------------");
sender.sendMessage(ChatColor.AQUA + "Help for " + ChatColor.GOLD + info.getName() + ChatColor.GRAY + " - " + info.getDescription());
if (info.isParentCommand()) {
for (CommandInfo subCommand : info.getSubCommands()) {
Expand All @@ -54,6 +54,6 @@ public void sendHelp(CommandInfo info, CoreCommandSender sender) {
sender.sendMessage(ChatColor.GRAY + " " + subCommand.getFullUsage() + (subCommand.getDescription() != null || subCommand.getDescription().isEmpty() ? ChatColor.GRAY + " - " + subCommand.getDescription() : ""));
}
}
sender.sendMessage(ChatColor.GRAY + "" + ChatColor.STRIKETHROUGH + "--------------------------------");
sender.sendMessage(ChatColor.GRAY + String.valueOf(ChatColor.STRIKETHROUGH) + "--------------------------------");
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand All @@ -24,7 +24,6 @@

package net.octopvp.commander.bukkit.providers;

import net.octopvp.commander.annotation.Sender;
import net.octopvp.commander.bukkit.BukkitCommandSender;
import net.octopvp.commander.bukkit.impl.BukkitCommandSenderImpl;
import net.octopvp.commander.command.CommandContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 1 addition & 1 deletion Commander-Core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -148,7 +148,7 @@ public Commander init() {
}
StringBuilder minMax = new StringBuilder("(");
if (range.min() != Double.MIN_VALUE) {
String min = range.min() + "";
String min = String.valueOf(range.min());
if (min.endsWith(".0")) {
min = min.substring(0, min.length() - 2);
}
Expand All @@ -158,7 +158,7 @@ public Commander init() {
if (minMax.length() > 1) {
minMax.append(" | ");
}
String max = range.max() + "";
String max = String.valueOf(range.max());
if (max.endsWith(".0")) {
max = max.substring(0, max.length() - 2);
}
Expand Down Expand Up @@ -533,8 +533,7 @@ private void executeInternally(CoreCommandSender sender, String label, String[]
}
} catch (CommandException e) {
LocalizedCommandException.checkResponseHandlerNull(e, getResponseHandler());
if (e instanceof MessageException) {
MessageException me = (MessageException) e;
if (e instanceof MessageException me) {
getPlatform().handleMessage(me.getMessage(), sender);
return;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -28,7 +28,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;

@DistributeOnMethods
@Retention(RetentionPolicy.RUNTIME)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -29,8 +29,6 @@
import net.octopvp.commander.argument.CommandArgs;
import net.octopvp.commander.sender.CoreCommandSender;

import java.util.Deque;

@Getter
@Setter
public class CommandContext {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand All @@ -24,7 +24,6 @@

package net.octopvp.commander.config;

import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) Badbird5907 2022.
* Copyright (c) Badbird5907 2023.
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Loading

0 comments on commit 68beebb

Please sign in to comment.