Skip to content

Commit 0bd6442

Browse files
committed
private the capture method
1 parent 2023e04 commit 0bd6442

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

src/main/java/org/maxgamer/quickshop/api/command/CommandManager.java

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
* This file is a part of project QuickShop, the name is CommandManager.java
3+
* Copyright (C) PotatoCraft Studio and contributors
4+
*
5+
* This program is free software: you can redistribute it and/or modify it
6+
* under the terms of the GNU General Public License as published by the
7+
* Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful, but WITHOUT
11+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13+
* for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*
18+
*/
19+
120
package org.maxgamer.quickshop.api.command;
221

322
import org.bukkit.command.Command;
@@ -40,14 +59,6 @@ boolean onCommand(
4059
@NotNull String commandLabel,
4160
@NotNull String[] cmdArg);
4261

43-
/**
44-
* Method for capturing generic type
45-
*/
46-
@SuppressWarnings("unchecked")
47-
default <T1, T2 extends T1> T2 capture(T1 type) {
48-
return (T2) type;
49-
}
50-
5162
boolean checkPermissions(CommandSender sender, String commandLabel, String[] cmdArg, List<String> permissionList, PermissionType permissionType, Action action);
5263

5364

@@ -75,6 +86,6 @@ public String getName() {
7586

7687
enum PermissionType {
7788
REQUIRE,
78-
SELECTIVE;
89+
SELECTIVE
7990
}
8091
}

src/main/java/org/maxgamer/quickshop/command/SimpleCommandManager.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,6 @@ public boolean onCommand(
445445
/**
446446
* Method for capturing generic type
447447
*/
448-
@Override
449448
public <T1, T2 extends T1> T2 capture(T1 type) {
450449
return (T2) type;
451450
}

0 commit comments

Comments
 (0)