Showing preview only (789K chars total). Download the full file or copy to clipboard to get everything.
Repository: Realizedd/Duels
Branch: master
Commit: 2fc934867ee3
Files: 256
Total size: 704.3 KB
Directory structure:
gitextract_mv1mshjz/
├── .gitignore
├── LICENSE.md
├── README.md
├── build.gradle
├── duels-api/
│ ├── build.gradle
│ └── src/
│ └── main/
│ └── java/
│ └── me/
│ └── realized/
│ └── duels/
│ └── api/
│ ├── Duels.java
│ ├── arena/
│ │ ├── Arena.java
│ │ └── ArenaManager.java
│ ├── command/
│ │ └── SubCommand.java
│ ├── event/
│ │ ├── SourcedEvent.java
│ │ ├── arena/
│ │ │ ├── ArenaCreateEvent.java
│ │ │ ├── ArenaEvent.java
│ │ │ ├── ArenaRemoveEvent.java
│ │ │ ├── ArenaSetPositionEvent.java
│ │ │ └── ArenaStateChangeEvent.java
│ │ ├── kit/
│ │ │ ├── KitCreateEvent.java
│ │ │ ├── KitEquipEvent.java
│ │ │ ├── KitEvent.java
│ │ │ └── KitRemoveEvent.java
│ │ ├── match/
│ │ │ ├── MatchEndEvent.java
│ │ │ ├── MatchEvent.java
│ │ │ └── MatchStartEvent.java
│ │ ├── queue/
│ │ │ ├── QueueCreateEvent.java
│ │ │ ├── QueueEvent.java
│ │ │ ├── QueueJoinEvent.java
│ │ │ ├── QueueLeaveEvent.java
│ │ │ ├── QueueRemoveEvent.java
│ │ │ └── sign/
│ │ │ ├── QueueSignCreateEvent.java
│ │ │ ├── QueueSignEvent.java
│ │ │ └── QueueSignRemoveEvent.java
│ │ ├── request/
│ │ │ ├── RequestAcceptEvent.java
│ │ │ ├── RequestDenyEvent.java
│ │ │ ├── RequestEvent.java
│ │ │ └── RequestSendEvent.java
│ │ ├── spectate/
│ │ │ ├── SpectateEndEvent.java
│ │ │ ├── SpectateEvent.java
│ │ │ └── SpectateStartEvent.java
│ │ └── user/
│ │ └── UserCreateEvent.java
│ ├── extension/
│ │ └── DuelsExtension.java
│ ├── kit/
│ │ ├── Kit.java
│ │ └── KitManager.java
│ ├── match/
│ │ └── Match.java
│ ├── queue/
│ │ ├── DQueue.java
│ │ ├── DQueueManager.java
│ │ └── sign/
│ │ ├── QueueSign.java
│ │ └── QueueSignManager.java
│ ├── request/
│ │ └── Request.java
│ ├── spectate/
│ │ ├── SpectateManager.java
│ │ └── Spectator.java
│ └── user/
│ ├── MatchInfo.java
│ ├── User.java
│ └── UserManager.java
├── duels-plugin/
│ ├── build.gradle
│ └── src/
│ └── main/
│ ├── java/
│ │ └── me/
│ │ └── realized/
│ │ └── duels/
│ │ ├── DuelsPlugin.java
│ │ ├── Permissions.java
│ │ ├── api/
│ │ │ └── DuelsAPI.java
│ │ ├── arena/
│ │ │ ├── ArenaImpl.java
│ │ │ ├── ArenaManagerImpl.java
│ │ │ ├── Countdown.java
│ │ │ └── MatchImpl.java
│ │ ├── betting/
│ │ │ └── BettingManager.java
│ │ ├── command/
│ │ │ ├── BaseCommand.java
│ │ │ └── commands/
│ │ │ ├── SpectateCommand.java
│ │ │ ├── duel/
│ │ │ │ ├── DuelCommand.java
│ │ │ │ └── subcommands/
│ │ │ │ ├── AcceptCommand.java
│ │ │ │ ├── DenyCommand.java
│ │ │ │ ├── InventoryCommand.java
│ │ │ │ ├── StatsCommand.java
│ │ │ │ ├── ToggleCommand.java
│ │ │ │ ├── TopCommand.java
│ │ │ │ └── VersionCommand.java
│ │ │ ├── duels/
│ │ │ │ ├── DuelsCommand.java
│ │ │ │ └── subcommands/
│ │ │ │ ├── AddsignCommand.java
│ │ │ │ ├── BindCommand.java
│ │ │ │ ├── CreateCommand.java
│ │ │ │ ├── CreatequeueCommand.java
│ │ │ │ ├── DeleteCommand.java
│ │ │ │ ├── DeletekitCommand.java
│ │ │ │ ├── DeletequeueCommand.java
│ │ │ │ ├── DeletesignCommand.java
│ │ │ │ ├── EditCommand.java
│ │ │ │ ├── HelpCommand.java
│ │ │ │ ├── InfoCommand.java
│ │ │ │ ├── ListCommand.java
│ │ │ │ ├── LoadkitCommand.java
│ │ │ │ ├── LobbyCommand.java
│ │ │ │ ├── OptionsCommand.java
│ │ │ │ ├── PlaysoundCommand.java
│ │ │ │ ├── ReloadCommand.java
│ │ │ │ ├── ResetCommand.java
│ │ │ │ ├── ResetratingCommand.java
│ │ │ │ ├── SavekitCommand.java
│ │ │ │ ├── SetCommand.java
│ │ │ │ ├── SetitemCommand.java
│ │ │ │ ├── SetlobbyCommand.java
│ │ │ │ ├── SetratingCommand.java
│ │ │ │ ├── TeleportCommand.java
│ │ │ │ └── ToggleCommand.java
│ │ │ └── queue/
│ │ │ ├── QueueCommand.java
│ │ │ └── subcommands/
│ │ │ ├── JoinCommand.java
│ │ │ └── LeaveCommand.java
│ │ ├── config/
│ │ │ ├── Config.java
│ │ │ ├── Lang.java
│ │ │ └── converters/
│ │ │ └── ConfigConverter9_10.java
│ │ ├── data/
│ │ │ ├── ArenaData.java
│ │ │ ├── ItemData.java
│ │ │ ├── KitData.java
│ │ │ ├── LocationData.java
│ │ │ ├── MatchData.java
│ │ │ ├── PlayerData.java
│ │ │ ├── PotionEffectData.java
│ │ │ ├── QueueData.java
│ │ │ ├── QueueSignData.java
│ │ │ ├── UserData.java
│ │ │ └── UserManagerImpl.java
│ │ ├── duel/
│ │ │ └── DuelManager.java
│ │ ├── extension/
│ │ │ ├── ExtensionClassLoader.java
│ │ │ ├── ExtensionInfo.java
│ │ │ └── ExtensionManager.java
│ │ ├── gui/
│ │ │ ├── BaseButton.java
│ │ │ ├── betting/
│ │ │ │ ├── BettingGui.java
│ │ │ │ └── buttons/
│ │ │ │ ├── CancelButton.java
│ │ │ │ ├── DetailsButton.java
│ │ │ │ ├── HeadButton.java
│ │ │ │ └── StateButton.java
│ │ │ ├── bind/
│ │ │ │ ├── BindGui.java
│ │ │ │ └── buttons/
│ │ │ │ └── BindButton.java
│ │ │ ├── inventory/
│ │ │ │ ├── InventoryGui.java
│ │ │ │ └── buttons/
│ │ │ │ ├── EffectsButton.java
│ │ │ │ ├── HeadButton.java
│ │ │ │ ├── HealthButton.java
│ │ │ │ ├── HungerButton.java
│ │ │ │ └── PotionCounterButton.java
│ │ │ ├── options/
│ │ │ │ ├── OptionsGui.java
│ │ │ │ └── buttons/
│ │ │ │ └── OptionButton.java
│ │ │ └── settings/
│ │ │ ├── SettingsGui.java
│ │ │ └── buttons/
│ │ │ ├── ArenaSelectButton.java
│ │ │ ├── CancelButton.java
│ │ │ ├── ItemBettingButton.java
│ │ │ ├── KitSelectButton.java
│ │ │ ├── OwnInventoryButton.java
│ │ │ ├── RequestDetailsButton.java
│ │ │ └── RequestSendButton.java
│ │ ├── hook/
│ │ │ ├── HookManager.java
│ │ │ └── hooks/
│ │ │ ├── BountyHuntersHook.java
│ │ │ ├── CombatLogXHook.java
│ │ │ ├── CombatTagPlusHook.java
│ │ │ ├── EssentialsHook.java
│ │ │ ├── FactionsHook.java
│ │ │ ├── LeaderHeadsHook.java
│ │ │ ├── MVdWPlaceholderHook.java
│ │ │ ├── McMMOHook.java
│ │ │ ├── MyPetHook.java
│ │ │ ├── PlaceholderHook.java
│ │ │ ├── PvPManagerHook.java
│ │ │ ├── SimpleClansHook.java
│ │ │ ├── VaultHook.java
│ │ │ └── worldguard/
│ │ │ └── WorldGuardHook.java
│ │ ├── inventories/
│ │ │ └── InventoryManager.java
│ │ ├── kit/
│ │ │ ├── KitImpl.java
│ │ │ └── KitManagerImpl.java
│ │ ├── listeners/
│ │ │ ├── DamageListener.java
│ │ │ ├── EnderpearlListener.java
│ │ │ ├── KitItemListener.java
│ │ │ ├── KitOptionsListener.java
│ │ │ ├── LingerPotionListener.java
│ │ │ ├── PotionListener.java
│ │ │ ├── ProjectileHitListener.java
│ │ │ └── TeleportListener.java
│ │ ├── logging/
│ │ │ └── LogManager.java
│ │ ├── player/
│ │ │ ├── PlayerInfo.java
│ │ │ └── PlayerInfoManager.java
│ │ ├── queue/
│ │ │ ├── Queue.java
│ │ │ ├── QueueEntry.java
│ │ │ ├── QueueManager.java
│ │ │ └── sign/
│ │ │ ├── QueueSignImpl.java
│ │ │ └── QueueSignManagerImpl.java
│ │ ├── request/
│ │ │ ├── RequestImpl.java
│ │ │ └── RequestManager.java
│ │ ├── setting/
│ │ │ ├── CachedInfo.java
│ │ │ ├── Settings.java
│ │ │ └── SettingsManager.java
│ │ ├── shaded/
│ │ │ └── bstats/
│ │ │ └── Metrics.java
│ │ ├── spectate/
│ │ │ ├── SpectateManagerImpl.java
│ │ │ └── SpectatorImpl.java
│ │ ├── teleport/
│ │ │ └── Teleport.java
│ │ └── util/
│ │ ├── BlockUtil.java
│ │ ├── DateUtil.java
│ │ ├── EnumUtil.java
│ │ ├── EventUtil.java
│ │ ├── Loadable.java
│ │ ├── Log.java
│ │ ├── NumberUtil.java
│ │ ├── PlayerUtil.java
│ │ ├── Reloadable.java
│ │ ├── StringUtil.java
│ │ ├── TextBuilder.java
│ │ ├── UUIDUtil.java
│ │ ├── UpdateChecker.java
│ │ ├── collection/
│ │ │ └── StreamUtil.java
│ │ ├── command/
│ │ │ └── AbstractCommand.java
│ │ ├── compat/
│ │ │ ├── CompatUtil.java
│ │ │ ├── Identifiers.java
│ │ │ ├── Inventories.java
│ │ │ ├── Items.java
│ │ │ ├── Panes.java
│ │ │ ├── Skulls.java
│ │ │ ├── Titles.java
│ │ │ └── nbt/
│ │ │ └── NBT.java
│ │ ├── config/
│ │ │ ├── AbstractConfiguration.java
│ │ │ └── convert/
│ │ │ └── Converter.java
│ │ ├── function/
│ │ │ ├── Pair.java
│ │ │ └── TriFunction.java
│ │ ├── gui/
│ │ │ ├── AbstractGui.java
│ │ │ ├── Button.java
│ │ │ ├── GuiListener.java
│ │ │ ├── MultiPageGui.java
│ │ │ └── SinglePageGui.java
│ │ ├── hook/
│ │ │ ├── AbstractHookManager.java
│ │ │ └── PluginHook.java
│ │ ├── inventory/
│ │ │ ├── InventoryBuilder.java
│ │ │ ├── InventoryUtil.java
│ │ │ ├── ItemBuilder.java
│ │ │ ├── ItemUtil.java
│ │ │ └── Slots.java
│ │ ├── io/
│ │ │ └── FileUtil.java
│ │ ├── json/
│ │ │ ├── DefaultBasedDeserializer.java
│ │ │ └── JsonUtil.java
│ │ ├── metadata/
│ │ │ └── MetadataUtil.java
│ │ ├── reflect/
│ │ │ └── ReflectionUtil.java
│ │ └── yaml/
│ │ └── YamlUtil.java
│ └── resources/
│ ├── config.yml
│ ├── lang.yml
│ └── plugin.yml
├── duels-worldguard/
│ ├── build.gradle
│ └── src/
│ └── main/
│ └── java/
│ └── me/
│ └── realized/
│ └── duels/
│ └── hook/
│ └── hooks/
│ └── worldguard/
│ └── WorldGuardHandler.java
├── duels-worldguard-v6/
│ ├── build.gradle
│ └── src/
│ └── main/
│ └── java/
│ └── me/
│ └── realized/
│ └── duels/
│ └── hook/
│ └── hooks/
│ └── worldguard/
│ └── WorldGuard6Handler.java
├── duels-worldguard-v7/
│ ├── build.gradle
│ └── src/
│ └── main/
│ └── java/
│ └── me/
│ └── realized/
│ └── duels/
│ └── hook/
│ └── hooks/
│ └── worldguard/
│ └── WorldGuard7Handler.java
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── libs/
│ ├── BountyHunters-2.2.6.jar
│ ├── CombatTagPlus.jar
│ ├── Factions-1.6.9.5-U0.1.14.jar
│ ├── Factions.jar
│ ├── LeaderHeadsAPI.jar
│ ├── MVdWPlaceholderAPI-3.1.1.jar
│ ├── MassiveCore.jar
│ ├── MyPet-2.3.4.jar
│ ├── PvPManager-3.7.16.jar
│ ├── SimpleClans-2.14.4.1.jar
│ └── Vault-1.6.7.jar
└── settings.gradle
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
.DS_Store
.gradle/
.idea/
build/
out/
================================================
FILE: LICENSE.md
================================================
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
================================================
FILE: README.md
================================================
<h1>Duels</h1>
[](https://jitpack.io/#Realizedd/Duels)
A duel plugin for spigot. <a href="https://www.spigotmc.org/resources/duels.20171/">Spigot Project Page</a>
---
* **[Wiki](https://github.com/Realizedd/Duels/wiki)**
* **[Commands](https://github.com/Realizedd/Duels/wiki/commands)**
* **[Permissions](https://github.com/Realizedd/Duels/wiki/permissions)**
* **[Placeholders](https://github.com/Realizedd/Duels/wiki/placeholders)**
* **[Extensions](https://github.com/Realizedd/Duels/wiki/extensions)**
* **[config.yml](https://github.com/Realizedd/Duels/blob/master/duels-plugin/src/main/resources/config.yml)**
* **[lang.yml](https://github.com/Realizedd/Duels/blob/master/duels-plugin/src/main/resources/lang.yml)**
* **[Support Discord](https://discord.gg/RNy45sg)**
### Getting the dependency
#### Repository
Gradle:
```groovy
maven {
name 'jitpack-repo'
url 'https://jitpack.io'
}
```
Maven:
```xml
<repository>
<id>jitpack-repo</id>
<url>https://jitpack.io</url>
</repository>
```
#### Dependency
Gradle:
```groovy
compile group: 'com.github.Realizedd.Duels', name: 'duels-api', version: '3.5.1'
```
Maven:
```xml
<dependency>
<groupId>com.github.Realizedd.Duels</groupId>
<artifactId>duels-api</artifactId>
<version>3.5.1</version>
<scope>provided</scope>
</dependency>
```
### plugin.yml
Add Duels as a soft-depend to ensure Duels is fully loaded before your plugin.
```yaml
soft-depend: [Duels]
```
### Getting the API instance
```java
@Override
public void onEnable() {
Duels api = (Duels) Bukkit.getServer().getPluginManager().getPlugin("Duels");
}
```
================================================
FILE: build.gradle
================================================
buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
}
}
allprojects {
group 'me.realized'
version '3.5.3'
}
subprojects {
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'maven-publish'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven {
name 'spigot-repo'
url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
maven {
name 'bungeecord-repo'
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
maven {
name 'mojang-repo'
url 'https://libraries.minecraft.net/'
}
maven {
name 'clip-repo'
url 'https://repo.extendedclip.com/content/repositories/placeholderapi/'
}
maven {
name 'enginehub-repo'
url 'https://maven.enginehub.org/repo/'
}
maven {
name 'codemc-repo'
url 'https://repo.codemc.io/repository/maven-public/'
}
maven {
name 'essentialsx-repo'
url 'https://repo.essentialsx.net/releases/'
}
flatDir {
dirs "$rootDir/libs/"
}
}
}
================================================
FILE: duels-api/build.gradle
================================================
dependencies {
compileOnly 'org.jetbrains:annotations-java5:22.0.0'
implementation 'org.spigotmc:spigot-api:1.14.4-R0.1-SNAPSHOT'
}
publishing {
publications {
maven(MavenPublication) {
groupId = project.group.toString()
artifactId = project.name.toLowerCase()
version = project.version
from components.java
}
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/Duels.java
================================================
package me.realized.duels.api;
import me.realized.duels.api.arena.ArenaManager;
import me.realized.duels.api.command.SubCommand;
import me.realized.duels.api.kit.KitManager;
import me.realized.duels.api.queue.DQueueManager;
import me.realized.duels.api.queue.sign.QueueSignManager;
import me.realized.duels.api.spectate.SpectateManager;
import me.realized.duels.api.user.UserManager;
import org.bukkit.event.Listener;
import org.bukkit.plugin.Plugin;
import org.bukkit.scheduler.BukkitTask;
import org.jetbrains.annotations.NotNull;
public interface Duels extends Plugin {
/**
* Gets the UserManager singleton used by Duels.
*
* @return UserManager singleton
*/
@NotNull
UserManager getUserManager();
/**
* Gets the ArenaManager singleton used by Duels.
*
* @return ArenaManager singleton
*/
@NotNull
ArenaManager getArenaManager();
/**
* Gets the KitManager singleton used by Duels.
*
* @return KitManager singleton
*/
@NotNull
KitManager getKitManager();
/**
* Gets the SpectateManager singleton used by Duels.
*
* @return SpectateManager singleton
* @since 3.4.1
*/
@NotNull
SpectateManager getSpectateManager();
/**
* Gets the DQueueManager singleton used by Duels.
*
* @return DQueueManager singleton
*/
@NotNull
DQueueManager getQueueManager();
/**
* Gets the QueueSignManager singleton used by Duels.
*
* @return QueueSignManager singleton
*/
@NotNull
QueueSignManager getQueueSignManager();
/**
* Registers a {@link SubCommand} to a Command registered by Duels.
*
* @param command Name of the parent command to register the {@link SubCommand}.
* @param subCommand {@link SubCommand} to register.
* @return True if sub command was successfully registered. False otherwise.
*/
boolean registerSubCommand(@NotNull final String command, @NotNull final SubCommand subCommand);
/**
* Registers a {@link Listener} that will be automatically unregistered on unload of Duels.
*
* @param listener {@link Listener} to register.
* @since 3.1.2
*/
void registerListener(@NotNull final Listener listener);
/**
* Reloads the plugin.
*
* @return True if reload was successful. False otherwise.
*/
boolean reload();
/**
* Runs the task on server thread.
*
* @param task Task to run.
* @return BukkitTask executed.
* @since 3.1.0
*/
BukkitTask doSync(@NotNull final Runnable task);
/**
* Runs the task after delay on server thread.
*
* @param task Task to run.
* @param delay time to delay. 20L = 1s
* @return BukkitTask executed.
* @since 3.1.0
*/
BukkitTask doSyncAfter(@NotNull final Runnable task, long delay);
/**
* Runs the task after delay on server thread repeatedly.
*
* @param task Task to run.
* @param delay time to delay the start of repeat. 20L = 1s
* @param interval interval of this task. 20L = 1s
* @return BukkitTask executed.
* @since 3.1.0
*/
BukkitTask doSyncRepeat(@NotNull final Runnable task, long delay, long interval);
/**
* Runs the task asynchronously.
*
* @param task Task to run asynchronously.
* @return BukkitTask executed.
* @since 3.1.0
*/
BukkitTask doAsync(@NotNull final Runnable task);
/**
* Runs the task after delay asynchronously.
*
* @param task Task to run asynchronously.
* @param delay time to delay. 20L = 1s
* @return BukkitTask executed.
* @since 3.1.0
*/
BukkitTask doAsyncAfter(@NotNull final Runnable task, long delay);
/**
* Runs the task after delay asynchronously repeatedly.
*
* @param task Task to run asynchronously.
* @param delay time to delay the start of repeat. 20L = 1s
* @param interval interval of this task. 20L = 1s
* @return BukkitTask executed.
* @since 3.1.0
*/
BukkitTask doAsyncRepeat(@NotNull final Runnable task, long delay, long interval);
/**
* Cancels the task if not already cancelled.
*
* @param task Task to cancel if not already cancelled.
* @since 3.2.0
*/
void cancelTask(@NotNull final BukkitTask task);
/**
* Cancels a task with id if found and running.
*
* @param id Id of the task to cancel.
* @since 3.2.0
*/
void cancelTask(final int id);
/**
* Logs a message with {@link java.util.logging.Level#INFO}.
*
* @param message message to log.
* @since 3.1.0
*/
void info(@NotNull final String message);
/**
* Logs a message with {@link java.util.logging.Level#WARNING}.
*
* @param message message to log.
* @since 3.1.0
*/
void warn(@NotNull final String message);
/**
* Logs a message with {@link java.util.logging.Level#SEVERE}.
*
* @param message message to log.
* @since 3.1.0
*/
void error(@NotNull final String message);
/**
* Logs a message and the {@link Throwable} provided with {@link java.util.logging.Level#SEVERE}.
*
* @param message message to log.
* @param thrown {@link Throwable} to log.
* @since 3.1.0
*/
void error(@NotNull final String message, @NotNull Throwable thrown);
/**
* Current plugin version.
*
* @return version of the plugin.
* @since 3.1.0
*/
String getVersion();
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/arena/Arena.java
================================================
package me.realized.duels.api.arena;
import me.realized.duels.api.event.arena.ArenaRemoveEvent;
import me.realized.duels.api.event.arena.ArenaSetPositionEvent;
import me.realized.duels.api.event.arena.ArenaStateChangeEvent;
import me.realized.duels.api.match.Match;
import org.bukkit.Location;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents an Arena loaded on the server.
*/
public interface Arena {
/**
* The name of this arena. Will not contain a dash character ("-").
*
* @return Never-null {@link String} that is the name of this arena.
*/
@NotNull
String getName();
/**
* Whether or not this arena is currently disabled.
*
* @return True if this arena is disabled. False otherwise.
* @see #setDisabled(CommandSender, boolean)
*/
boolean isDisabled();
/**
* Disables this arena which prevents it from being used in duels.
* Note: Calls {@link ArenaStateChangeEvent}.
*
* @param source {@link CommandSender} that will be the source of the {@link ArenaStateChangeEvent} called. May be null!
* @param disabled True to disable the arena, False to enable.
* @return True if arena was disabled successfully. False if called {@link ArenaStateChangeEvent} was cancelled by a plugin.
*/
boolean setDisabled(@Nullable final CommandSender source, final boolean disabled);
/**
* Calls {@link #setDisabled(CommandSender, boolean)} with the source being null.
*
* @return True if arena was disabled successfully. False if called {@link ArenaStateChangeEvent} was cancelled by a plugin.
* @see #setDisabled(CommandSender, boolean)
*/
boolean setDisabled(final boolean disabled);
/**
* The spawnpoint set for the position number.
*
* @param pos Position number associated with the spawnpoint
* @return {@link Location} associated with the position number or null if position is unset.
*/
@Nullable
Location getPosition(final int pos);
/**
* Sets a spawnpoint with the given position and location.
* Note: Calls {@link ArenaSetPositionEvent}.
*
* @param source {@link Player} that will be the source of the {@link ArenaSetPositionEvent} called. May be null!
* @param pos Position number for the spawnpoint.
* @param location Location to be the spawnpoint. Should not be null!
* @return True if the spawnpoint was set successfully. False if called {@link ArenaSetPositionEvent} was cancelled by a plugin.
*/
boolean setPosition(@Nullable final Player source, final int pos, @NotNull final Location location);
/**
* Calls {@link #setPosition(Player, int, Location)} with the source being null.
*
* @return True if the spawnpoint was set successfully. False if called {@link ArenaSetPositionEvent} was cancelled by a plugin.
* @see #setPosition(Player, int, Location)
*/
boolean setPosition(final int pos, @NotNull final Location location);
/**
* Whether or not a duel is currently being played in this arena. If returned true, {@link #getMatch()} is guaranteed to return a {@link Match} instance.
*
* @return True if this arena is in use. False otherwise.
*/
boolean isUsed();
/**
* The {@link Match} being played in this arena. May be null if no match is being played.
*
* @return {@link Match} instance if a duel is currently being played in this arena. null otherwise.
*/
@Nullable
Match getMatch();
/**
* Whether or not the player is playing in this arena.
*
* @param player {@link Player} to check if in this arena. Should not be null!
* @return True if the player is in this arena. False otherwise.
*/
boolean has(@NotNull final Player player);
/**
* Whether or not this {@link Arena} has been removed.
*
* @return True if this {@link Arena} has been removed. False otherwise.
* @see ArenaRemoveEvent
* @since 3.2.0
*/
boolean isRemoved();
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/arena/ArenaManager.java
================================================
package me.realized.duels.api.arena;
import java.util.List;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents the ArenaManager singleton used by Duels.
*/
public interface ArenaManager {
/**
* Attempts to find an {@link Arena} instance associated with the given name.
*
* @param name Name to search through the loaded arenas. Should not be null!
* @return {@link Arena} instance that has a name matching with the given name or null if not exists.
*/
@Nullable
Arena get(@NotNull final String name);
/**
* Attempts to find an {@link Arena} instance that contains the player.
*
* @param player Player to search through the loaded arenas. Should not be null!
* @return {@link Arena} instance that contains the player or null if not exists.
*/
@Nullable
Arena get(@NotNull final Player player);
/**
* Whether or not the given player is in a match. If returned true, {@link #get(Player)} is guaranteed to return a {@link Arena} instance.
*
* @param player Player to check if in match. Should not be null!
* @return True if player was in a match. False otherwise.
*/
boolean isInMatch(@NotNull final Player player);
/**
* An UnmodifiableList of {@link Arena}s that are currently loaded.
*
* @return Never-null UnmodifiableList of {@link Arena}s that are currently loaded.
* @since 3.4.0
*/
@NotNull
List<Arena> getArenas();
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/command/SubCommand.java
================================================
package me.realized.duels.api.command;
import java.util.Objects;
import me.realized.duels.api.Duels;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* An abstract SubCommand class that hooks into commands registered by Duels.
*
* @see Duels#registerSubCommand(String, SubCommand)
*/
public abstract class SubCommand {
private final String name, usage, description, permission;
private final boolean playerOnly;
private final int length;
private final String[] aliases;
/**
* The constructor for a subcommand.
*
* @param name Name of this subcommand. Should not be null!
* @param usage Usage of this subcommand. May be null.
* @param description Description of this subcommand. May be null.
* @param permission Permission of this subcommand. May be null.
* @param playerOnly Whether or not this subcommand should be player only.
* @param length Length of this subcommand. Must be greater than or equal to 1.
* @param aliases Aliases of this subcommand.
*/
public SubCommand(@NotNull final String name, @Nullable final String usage, @Nullable final String description, @Nullable final String permission,
final boolean playerOnly, final int length, final String... aliases) {
Objects.requireNonNull(name, "name");
this.name = name;
this.usage = usage;
this.description = description;
this.permission = permission;
this.playerOnly = playerOnly;
this.length = Math.max(length, 1);
this.aliases = aliases;
}
/**
* The name of this subcommand.
*
* @return Never-null {@link String} that is the name of this subcommand.
*/
public String getName() {
return name;
}
/**
* The usage of this subcommand.
*
* @return Usage of this subcommand or null if unspecified.
*/
public String getUsage() {
return usage;
}
/**
* The description of this subcommand.
*
* @return Description of this subcommand or null if unspecified.
*/
public String getDescription() {
return description;
}
/**
* The permission of this subcommand. If set to null, it will inherit its parent's permission.
*
* @return Permission of this subcommand or null if unspecified.
*/
public String getPermission() {
return permission;
}
/**
* Whether or not this subcommand can only be used by a player. If the parent of this subcommand is player only, this value will not be considered.
*
* @return True if this subcommand is player only. False otherwise.
*/
public boolean isPlayerOnly() {
return playerOnly;
}
/**
* The length of this subcommand.
*
* @return Length of this subcommand.
*/
public int getLength() {
return length;
}
/**
* The aliases of this subcommand.
*
* @return Aliases of this subcommand.
*/
public String[] getAliases() {
return aliases;
}
public abstract void execute(final CommandSender sender, final String label, final String[] args);
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/SourcedEvent.java
================================================
package me.realized.duels.api.event;
import org.bukkit.command.CommandSender;
import org.bukkit.event.Event;
import org.jetbrains.annotations.Nullable;
/**
* Represents an event that may have a source.
*/
public abstract class SourcedEvent extends Event {
private final CommandSender source;
protected SourcedEvent(@Nullable final CommandSender source) {
this.source = source;
}
/**
* Source of this event. May be null!
*
* @return {@link CommandSender} that is the source of this event or null.
*/
@Nullable
public CommandSender getSource() {
return source;
}
/**
* Whether or not this event has a source specified.
*
* @return True if there was a source specified. False otherwise.
*/
public boolean hasSource() {
return getSource() != null;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/arena/ArenaCreateEvent.java
================================================
package me.realized.duels.api.event.arena;
import me.realized.duels.api.arena.Arena;
import org.bukkit.command.CommandSender;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Called when a new {@link Arena} is created.
*/
public class ArenaCreateEvent extends ArenaEvent {
private static final HandlerList handlers = new HandlerList();
public ArenaCreateEvent(@Nullable final CommandSender source, @NotNull final Arena arena) {
super(source, arena);
}
public static HandlerList getHandlerList() {
return handlers;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/arena/ArenaEvent.java
================================================
package me.realized.duels.api.event.arena;
import java.util.Objects;
import me.realized.duels.api.arena.Arena;
import me.realized.duels.api.event.SourcedEvent;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents an event caused by a {@link Arena}.
*/
public abstract class ArenaEvent extends SourcedEvent {
private final Arena arena;
ArenaEvent(@Nullable final CommandSender source, @NotNull final Arena arena) {
super(source);
Objects.requireNonNull(arena, "arena");
this.arena = arena;
}
/**
* {@link Arena} instance associated with this event.
*
* @return Never-null {@link Arena} instance associated with this event.
*/
@NotNull
public Arena getArena() {
return arena;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/arena/ArenaRemoveEvent.java
================================================
package me.realized.duels.api.event.arena;
import me.realized.duels.api.arena.Arena;
import org.bukkit.command.CommandSender;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Called when an {@link Arena} is removed.
*
* @see Arena#isRemoved()
*/
public class ArenaRemoveEvent extends ArenaEvent {
private static final HandlerList handlers = new HandlerList();
public ArenaRemoveEvent(@Nullable final CommandSender source, @NotNull final Arena arena) {
super(source, arena);
}
public static HandlerList getHandlerList() {
return handlers;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/arena/ArenaSetPositionEvent.java
================================================
package me.realized.duels.api.event.arena;
import java.util.Objects;
import me.realized.duels.api.arena.Arena;
import org.bukkit.Location;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Called when a new spawnpoint is set for an {@link Arena}.
*
* @see Arena#setPosition(Player, int, Location)
*/
public class ArenaSetPositionEvent extends ArenaEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private int pos;
private Location location;
private boolean cancelled;
public ArenaSetPositionEvent(@Nullable final CommandSender source, @NotNull final Arena arena, final int pos, @NotNull final Location location) {
super(source, arena);
Objects.requireNonNull(location, "location");
this.pos = pos;
this.location = location;
}
/**
* The position number of the spawnpoint set.
*
* @return position number of the spawnpoint set.
*/
public int getPos() {
return pos;
}
/**
* Sets a new position number for the spawnpoint.
*
* @param pos New position number for the spawnpoint set.
*/
public void setPos(final int pos) {
this.pos = pos;
}
/**
* The location of the spawnpoint set.
*
* @return location of the spawnpoint set.
*/
public Location getLocation() {
return location;
}
/**
* Sets a new location for the spawnpoint.
*
* @param location New location for the spawnpoint set.
*/
public void setLocation(final Location location) {
this.location = location;
}
@Override
public boolean isCancelled() {
return cancelled;
}
@Override
public void setCancelled(final boolean cancelled) {
this.cancelled = cancelled;
}
public static HandlerList getHandlerList() {
return handlers;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/arena/ArenaStateChangeEvent.java
================================================
package me.realized.duels.api.event.arena;
import me.realized.duels.api.arena.Arena;
import org.bukkit.command.CommandSender;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Called when an {@link Arena} is enabled or disabled.
*
* @see Arena#setDisabled(CommandSender, boolean)
*/
public class ArenaStateChangeEvent extends ArenaEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private boolean disabled;
private boolean cancelled;
public ArenaStateChangeEvent(@Nullable final CommandSender source, @NotNull final Arena arena, final boolean disabled) {
super(source, arena);
this.disabled = disabled;
}
/**
* Whether or not the {@link Arena} is disabling.
*
* @return True if the {@link Arena} will be disabled. False otherwise.
*/
public boolean isDisabled() {
return disabled;
}
/**
* Sets a new state for the {@link Arena}.
*
* @param disabled True to disable the {@link Arena}. False to enable.
*/
public void setDisabled(final boolean disabled) {
this.disabled = disabled;
}
@Override
public boolean isCancelled() {
return cancelled;
}
@Override
public void setCancelled(final boolean cancelled) {
this.cancelled = cancelled;
}
public static HandlerList getHandlerList() {
return handlers;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/kit/KitCreateEvent.java
================================================
package me.realized.duels.api.event.kit;
import java.util.Objects;
import me.realized.duels.api.kit.Kit;
import me.realized.duels.api.kit.KitManager;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
/**
* Called when a {@link Kit} is created.
*
* @see KitManager#create(Player, String)
*/
public class KitCreateEvent extends KitEvent {
private static final HandlerList handlers = new HandlerList();
private final Player source;
public KitCreateEvent(@NotNull final Player source, @NotNull final Kit kit) {
super(source, kit);
Objects.requireNonNull(source, "source");
this.source = source;
}
@NotNull
@Override
public Player getSource() {
return source;
}
public static HandlerList getHandlerList() {
return handlers;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/kit/KitEquipEvent.java
================================================
package me.realized.duels.api.event.kit;
import java.util.Objects;
import me.realized.duels.api.kit.Kit;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
/**
* Called when a {@link Player} equips a {@link Kit}.
*
* @see Kit#equip(Player)
*/
public class KitEquipEvent extends KitEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private final Player source;
private boolean cancelled;
public KitEquipEvent(@NotNull final Player source, @NotNull final Kit kit) {
super(source, kit);
Objects.requireNonNull(source, "source");
this.source = source;
}
/**
* {@link Player} who is equipping the {@link Kit}.
*
* @return Never-null {@link Player} who is equipping the {@link Kit}.
*/
@NotNull
@Override
public Player getSource() {
return source;
}
@Override
public boolean isCancelled() {
return cancelled;
}
@Override
public void setCancelled(final boolean cancelled) {
this.cancelled = cancelled;
}
public static HandlerList getHandlerList() {
return handlers;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/kit/KitEvent.java
================================================
package me.realized.duels.api.event.kit;
import java.util.Objects;
import me.realized.duels.api.event.SourcedEvent;
import me.realized.duels.api.kit.Kit;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents an event caused by a {@link Kit}.
*/
public abstract class KitEvent extends SourcedEvent {
private final Kit kit;
KitEvent(@Nullable final CommandSender source, @NotNull final Kit kit) {
super(source);
Objects.requireNonNull(kit, "kit");
this.kit = kit;
}
/**
* {@link Kit} instance associated with this event.
*
* @return Never-null {@link Kit} instance associated with this event.
*/
@NotNull
public Kit getKit() {
return kit;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/kit/KitRemoveEvent.java
================================================
package me.realized.duels.api.event.kit;
import me.realized.duels.api.kit.Kit;
import me.realized.duels.api.kit.KitManager;
import org.bukkit.command.CommandSender;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Called when a {@link Kit} is removed.
*
* @see KitManager#remove(CommandSender, String)
* @see Kit#isRemoved()
*/
public class KitRemoveEvent extends KitEvent {
private static final HandlerList handlers = new HandlerList();
public KitRemoveEvent(@Nullable final CommandSender source, @NotNull final Kit kit) {
super(source, kit);
}
public static HandlerList getHandlerList() {
return handlers;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/match/MatchEndEvent.java
================================================
package me.realized.duels.api.event.match;
import java.util.Objects;
import java.util.UUID;
import me.realized.duels.api.match.Match;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Called when a {@link Match} is ending.
*
* Note: {@link Match#isFinished()} will return true only after this event is called.
*/
public class MatchEndEvent extends MatchEvent {
private static final HandlerList handlers = new HandlerList();
private final UUID winner, loser;
private final Reason reason;
public MatchEndEvent(@NotNull final Match match, @Nullable final UUID winner, @Nullable final UUID loser, @NotNull final Reason reason) {
super(match);
Objects.requireNonNull(reason, "reason");
this.winner = winner;
this.loser = loser;
this.reason = reason;
}
/**
* Winner of the {@link Match}. May be null if there was a no winner!
*
* @return {@link UUID} of the winner of the {@link Match}. May be null if there was a no winner!
*/
@Nullable
public UUID getWinner() {
return winner;
}
/**
* Loser of the {@link Match}. May be null if there was a no loser!
*
* @return {@link UUID} of the loser of the {@link Match}. May be null if there was a no loser!
*/
@Nullable
public UUID getLoser() {
return loser;
}
/**
* End reason of the {@link Match}. If reason is {@link Reason#OPPONENT_DEFEAT}, {@link #getWinner()} and {@link #getLoser()} is guaranteed to not return null.
*
* @return {@link Reason} that is the end reason of the {@link Match}.
*/
@NotNull
public Reason getReason() {
return reason;
}
public static HandlerList getHandlerList() {
return handlers;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
public enum Reason {
OPPONENT_DEFEAT,
TIE,
MAX_TIME_REACHED,
PLUGIN_DISABLE,
OTHER
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/match/MatchEvent.java
================================================
package me.realized.duels.api.event.match;
import java.util.Objects;
import me.realized.duels.api.match.Match;
import org.bukkit.event.Event;
import org.jetbrains.annotations.NotNull;
/**
* Represents an event caused by a {@link Match}.
*/
public abstract class MatchEvent extends Event {
private final Match match;
MatchEvent(@NotNull final Match match) {
Objects.requireNonNull(match, "match");
this.match = match;
}
/**
* {@link Match} instance associated with this event.
*
* @return Never-null {@link Match} instance associated with this event.
*/
public Match getMatch() {
return match;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/match/MatchStartEvent.java
================================================
package me.realized.duels.api.event.match;
import java.util.Objects;
import me.realized.duels.api.match.Match;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
/**
* Called when a {@link Match} has started.
*/
public class MatchStartEvent extends MatchEvent {
private static final HandlerList handlers = new HandlerList();
private final Player[] players;
public MatchStartEvent(@NotNull final Match match, @NotNull final Player... players) {
super(match);
Objects.requireNonNull(players, "players");
this.players = players;
}
/**
* The starters of the {@link Match}.
*
* @return Never-null {@link Player} array representing the starters of the {@link Match}.
*/
@NotNull
public Player[] getPlayers() {
return players;
}
public static HandlerList getHandlerList() {
return handlers;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/queue/QueueCreateEvent.java
================================================
package me.realized.duels.api.event.queue;
import me.realized.duels.api.kit.Kit;
import me.realized.duels.api.queue.DQueue;
import me.realized.duels.api.queue.DQueueManager;
import org.bukkit.command.CommandSender;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Called when a {@link DQueue} is created.
*
* @see DQueueManager#create(CommandSender, Kit, int)
*/
public class QueueCreateEvent extends QueueEvent {
private static final HandlerList handlers = new HandlerList();
public QueueCreateEvent(@Nullable final CommandSender source, @NotNull final DQueue queue) {
super(source, queue);
}
public static HandlerList getHandlerList() {
return handlers;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/queue/QueueEvent.java
================================================
package me.realized.duels.api.event.queue;
import java.util.Objects;
import me.realized.duels.api.event.SourcedEvent;
import me.realized.duels.api.queue.DQueue;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents an event caused by a {@link DQueue}.
*
* @since 3.2.0
*/
public abstract class QueueEvent extends SourcedEvent {
private final DQueue queue;
QueueEvent(@Nullable final CommandSender source, @NotNull final DQueue queue) {
super(source);
Objects.requireNonNull(queue, "queue");
this.queue = queue;
}
/**
* {@link DQueue} instance associated with this event.
*
* @return Never-null {@link DQueue} instance associated with this event.
*/
@NotNull
public DQueue getQueue() {
return queue;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/queue/QueueJoinEvent.java
================================================
package me.realized.duels.api.event.queue;
import java.util.Objects;
import me.realized.duels.api.queue.DQueue;
import me.realized.duels.api.queue.DQueueManager;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
/**
* Called when a player is joining a {@link DQueue}.
*
* @see DQueueManager#addToQueue(Player, DQueue)
* @since 3.2.0
*/
public class QueueJoinEvent extends QueueEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private final Player source;
private boolean cancelled;
public QueueJoinEvent(@NotNull final Player source, @NotNull final DQueue queue) {
super(source, queue);
Objects.requireNonNull(source, "source");
this.source = source;
}
/**
* {@link Player} who is joining the {@link DQueue}.
*
* @return Never-null {@link Player} who is joining the {@link DQueue}.
*/
@NotNull
@Override
public Player getSource() {
return source;
}
@Override
public boolean isCancelled() {
return cancelled;
}
@Override
public void setCancelled(final boolean cancelled) {
this.cancelled = cancelled;
}
public static HandlerList getHandlerList() {
return handlers;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/queue/QueueLeaveEvent.java
================================================
package me.realized.duels.api.event.queue;
import java.util.Objects;
import me.realized.duels.api.queue.DQueue;
import me.realized.duels.api.queue.DQueueManager;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
/**
* Called when a player is leaving a {@link DQueue}.
*
* @see DQueueManager#removeFromQueue(Player)
* @since 3.2.0
*/
public class QueueLeaveEvent extends QueueEvent {
private static final HandlerList handlers = new HandlerList();
private final Player source;
public QueueLeaveEvent(@NotNull final Player source, @NotNull final DQueue queue) {
super(source, queue);
Objects.requireNonNull(source, "source");
this.source = source;
}
/**
* {@link Player} who is leaving the {@link DQueue}.
*
* @return Never-null {@link Player} who is leaving the {@link DQueue}.
*/
@NotNull
@Override
public Player getSource() {
return source;
}
public static HandlerList getHandlerList() {
return handlers;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/queue/QueueRemoveEvent.java
================================================
package me.realized.duels.api.event.queue;
import me.realized.duels.api.kit.Kit;
import me.realized.duels.api.queue.DQueue;
import me.realized.duels.api.queue.DQueueManager;
import org.bukkit.command.CommandSender;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Called when a {@link DQueue} is removed.
*
* @see DQueueManager#remove(CommandSender, Kit, int)
* @see DQueue#isRemoved()
* @since 3.2.0
*/
public class QueueRemoveEvent extends QueueEvent {
private static final HandlerList handlers = new HandlerList();
public QueueRemoveEvent(@Nullable final CommandSender source, @NotNull final DQueue queue) {
super(source, queue);
}
public static HandlerList getHandlerList() {
return handlers;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/queue/sign/QueueSignCreateEvent.java
================================================
package me.realized.duels.api.event.queue.sign;
import me.realized.duels.api.queue.sign.QueueSign;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
/**
* Called when a {@link QueueSign} is created.
*
* @since 3.2.0
*/
public class QueueSignCreateEvent extends QueueSignEvent {
private static final HandlerList handlers = new HandlerList();
public QueueSignCreateEvent(@NotNull final Player source, @NotNull final QueueSign queueSign) {
super(source, queueSign);
}
public static HandlerList getHandlerList() {
return handlers;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/queue/sign/QueueSignEvent.java
================================================
package me.realized.duels.api.event.queue.sign;
import java.util.Objects;
import me.realized.duels.api.event.SourcedEvent;
import me.realized.duels.api.queue.sign.QueueSign;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
/**
* Represents an event caused by a {@link QueueSign}.
*
* @since 3.2.0
*/
public abstract class QueueSignEvent extends SourcedEvent {
private final Player source;
private final QueueSign queueSign;
QueueSignEvent(@NotNull final Player source, @NotNull final QueueSign queueSign) {
super(source);
Objects.requireNonNull(source, "source");
Objects.requireNonNull(queueSign, "queueSign");
this.source = source;
this.queueSign = queueSign;
}
/**
* {@link Player} who is the source of this event.
*
* @return Never-null {@link Player} who is the source of this event.
*/
@NotNull
@Override
public Player getSource() {
return source;
}
/**
* {@link QueueSign} instance associated with this event.
*
* @return Never-null {@link QueueSign} instance associated with this event.
*/
@NotNull
public QueueSign getQueueSign() {
return queueSign;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/queue/sign/QueueSignRemoveEvent.java
================================================
package me.realized.duels.api.event.queue.sign;
import me.realized.duels.api.queue.sign.QueueSign;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
/**
* Called when a {@link QueueSign} is removed.
*
* @see QueueSign#isRemoved()
* @since 3.2.0
*/
public class QueueSignRemoveEvent extends QueueSignEvent {
private static final HandlerList handlers = new HandlerList();
public QueueSignRemoveEvent(@NotNull final Player source, @NotNull final QueueSign queueSign) {
super(source, queueSign);
}
public static HandlerList getHandlerList() {
return handlers;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/request/RequestAcceptEvent.java
================================================
package me.realized.duels.api.event.request;
import me.realized.duels.api.request.Request;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
/**
* Called when a {@link Player} accepts a {@link Request} from a {@link Player}.
*
* @since 3.2.1
*/
public class RequestAcceptEvent extends RequestEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private boolean cancelled;
/**
* @param source {@link Player} who is accepting this {@link Request}.
* @param target {@link Player} who sent this {@link Request}.
* @param request {@link Request} that is being handled.
*/
public RequestAcceptEvent(@NotNull final Player source, @NotNull final Player target, @NotNull final Request request) {
super(source, target, request);
}
/**
* Whether or not this event has been cancelled.
*
* @return True if this event has been cancelled. False otherwise.
*/
@Override
public boolean isCancelled() {
return cancelled;
}
/**
* Whether or not to cancel this event.
* When cancelled, the request will not be removed and remain as unhandled.
*
* @param cancelled True to cancel this event.
*/
@Override
public void setCancelled(final boolean cancelled) {
this.cancelled = cancelled;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
public static HandlerList getHandlerList() {
return handlers;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/request/RequestDenyEvent.java
================================================
package me.realized.duels.api.event.request;
import me.realized.duels.api.request.Request;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
/**
* Called when a {@link Player} denies a {@link Request} from a {@link Player}.
*
* @since 3.2.1
*/
public class RequestDenyEvent extends RequestEvent {
private static final HandlerList handlers = new HandlerList();
/**
* @param source {@link Player} who is denying this {@link Request}.
* @param target {@link Player} who sent this {@link Request}.
* @param request {@link Request} that is being handled.
*/
public RequestDenyEvent(@NotNull final Player source, @NotNull final Player target, @NotNull final Request request) {
super(source, target, request);
}
@Override
public HandlerList getHandlers() {
return handlers;
}
public static HandlerList getHandlerList() {
return handlers;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/request/RequestEvent.java
================================================
package me.realized.duels.api.event.request;
import java.util.Objects;
import me.realized.duels.api.event.SourcedEvent;
import me.realized.duels.api.request.Request;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
/**
* Represents an event caused by a {@link Request}.
*
* @since 3.2.1
*/
public abstract class RequestEvent extends SourcedEvent {
private final Player source, target;
private final Request request;
RequestEvent(@NotNull final Player source, @NotNull final Player target, @NotNull final Request request) {
super(source);
Objects.requireNonNull(source, "source");
Objects.requireNonNull(target, "target");
Objects.requireNonNull(request, "request");
this.source = source;
this.target = target;
this.request = request;
}
/**
* {@link Player} who is the source of this event.
*
* @return Never-null {@link Player} who is the source of this event.
*/
@NotNull
@Override
public Player getSource() {
return source;
}
/**
* {@link Player} who is the target of this event.
*
* @return Never-null {@link Player} who is the target of this event.
*/
@NotNull
public Player getTarget() {
return target;
}
/**
* {@link Request} instance associated with this event.
*
* @return Never-null {@link Request} instance associated with this event.
*/
@NotNull
public Request getRequest() {
return request;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/request/RequestSendEvent.java
================================================
package me.realized.duels.api.event.request;
import me.realized.duels.api.request.Request;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
/**
* Called when a {@link Player} sends a {@link Request} to a {@link Player}.
*/
public class RequestSendEvent extends RequestEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private boolean cancelled;
public RequestSendEvent(@NotNull final Player source, @NotNull final Player target, @NotNull final Request request) {
super(source, target, request);
}
/**
* Whether or not this event has been cancelled.
*
* @return True if this event has been cancelled. False otherwise.
*/
@Override
public boolean isCancelled() {
return cancelled;
}
/**
* Whether or not to cancel this event.
*
* @param cancelled True to cancel this event.
*/
@Override
public void setCancelled(final boolean cancelled) {
this.cancelled = cancelled;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
public static HandlerList getHandlerList() {
return handlers;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/spectate/SpectateEndEvent.java
================================================
package me.realized.duels.api.event.spectate;
import me.realized.duels.api.spectate.Spectator;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
/**
* Called before a player stops spectating.
*/
public class SpectateEndEvent extends SpectateEvent {
private static final HandlerList handlers = new HandlerList();
public SpectateEndEvent(@NotNull final Player source, @NotNull final Spectator spectator) {
super(source, spectator);
}
public static HandlerList getHandlerList() {
return handlers;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/spectate/SpectateEvent.java
================================================
package me.realized.duels.api.event.spectate;
import java.util.Objects;
import me.realized.duels.api.event.SourcedEvent;
import me.realized.duels.api.spectate.Spectator;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
/**
* Represents an event caused by a {@link Spectator}.
*/
public abstract class SpectateEvent extends SourcedEvent {
private final Player source;
private final Spectator spectator;
SpectateEvent(@NotNull final Player source, @NotNull Spectator spectator) {
super(source);
Objects.requireNonNull(source, "source");
Objects.requireNonNull(spectator, "spectator");
this.source = source;
this.spectator = spectator;
}
@NotNull
@Override
public Player getSource() {
return source;
}
/**
* {@link Spectator} instance associated with this event.
*
* @return Never-null {@link Spectator} instance associated with this event.
*/
@NotNull
public Spectator getSpectator() {
return spectator;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/spectate/SpectateStartEvent.java
================================================
package me.realized.duels.api.event.spectate;
import me.realized.duels.api.spectate.Spectator;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
/**
* Called before a player starts spectating.
*/
public class SpectateStartEvent extends SpectateEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private boolean cancelled;
public SpectateStartEvent(@NotNull final Player source, @NotNull final Spectator spectator) {
super(source, spectator);
}
public static HandlerList getHandlerList() {
return handlers;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
@Override
public boolean isCancelled() {
return cancelled;
}
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/event/user/UserCreateEvent.java
================================================
package me.realized.duels.api.event.user;
import java.util.Objects;
import me.realized.duels.api.user.User;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
/**
* Called when a new {@link User} is created.
*/
public class UserCreateEvent extends Event {
private static final HandlerList handlers = new HandlerList();
private final User user;
public UserCreateEvent(@NotNull final User user) {
Objects.requireNonNull(user, "user");
this.user = user;
}
/**
* The {@link User} that was created.
*
* @return Never-null {@link User} that was created.
*/
@NotNull
public User getUser() {
return user;
}
public static HandlerList getHandlerList() {
return handlers;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/extension/DuelsExtension.java
================================================
package me.realized.duels.api.extension;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.net.URLConnection;
import java.util.Objects;
import me.realized.duels.api.Duels;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public abstract class DuelsExtension {
protected Duels api;
private String name;
private File folder;
private File file;
private File dataFolder;
private boolean enabled;
private File configFile;
private FileConfiguration config;
final void init(final Duels api, final String name, final File folder, final File file) {
this.api = api;
this.name = name;
this.folder = folder;
this.file = file;
this.dataFolder = new File(folder, name);
this.configFile = new File(dataFolder, "config.yml");
}
@NotNull
public Duels getApi() {
return api;
}
@NotNull
public final String getName() {
return name;
}
@NotNull
public File getFolder() {
return folder;
}
@NotNull
public File getFile() {
return file;
}
@NotNull
public File getDataFolder() {
return dataFolder;
}
public boolean isEnabled() {
return enabled;
}
public final void setEnabled(final boolean enabled) {
if (this.enabled == enabled) {
return;
}
if (enabled) {
onEnable();
} else {
onDisable();
}
this.enabled = enabled;
}
public void saveResource(@NotNull String resourcePath) {
Objects.requireNonNull(resourcePath, "resourcePath");
resourcePath = resourcePath.replace('\\', '/');
try (InputStream in = getResource(resourcePath)) {
if (in == null) {
throw new IllegalArgumentException("The embedded resource '" + resourcePath + "' cannot be found in " + file);
}
if (!dataFolder.exists()) {
dataFolder.mkdir();
}
final File outFile = new File(dataFolder, resourcePath);
int lastIndex = resourcePath.lastIndexOf('/');
File outDir = new File(dataFolder, resourcePath.substring(0, Math.max(lastIndex, 0)));
if (!outDir.exists()) {
outDir.mkdirs();
}
try (OutputStream out = new FileOutputStream(outFile)) {
final byte[] buf = new byte[1024];
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
}
} catch (IOException ex) {
api.error("Could not save resource '" + resourcePath + "'", ex);
}
}
@Nullable
public InputStream getResource(@NotNull final String filename) {
Objects.requireNonNull(filename, "filename");
try {
final URL url = getClass().getClassLoader().getResource(filename);
if (url == null) {
return null;
}
final URLConnection connection = url.openConnection();
connection.setUseCaches(false);
return connection.getInputStream();
} catch (IOException ex) {
api.error("Could not find resource with filename '" + filename + "'", ex);
return null;
}
}
public FileConfiguration getConfig() {
if (config == null) {
reloadConfig();
}
return config;
}
public void reloadConfig() {
if (!configFile.exists()) {
saveResource("config.yml");
}
config = YamlConfiguration.loadConfiguration(configFile);
}
public void saveConfig() {
try {
getConfig().save(configFile);
} catch (IOException ex) {
api.error("Failed to save config", ex);
}
}
public void onEnable() {}
public void onDisable() {}
/**
* @return The version of Duels that this extension requires in order to enable.
*
* @deprecated As of v3.2.0. Specify 'api-version' in extension.yml instead.
*/
@Deprecated
@Nullable
public String getRequiredVersion() {
return null;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/kit/Kit.java
================================================
package me.realized.duels.api.kit;
import me.realized.duels.api.event.kit.KitEquipEvent;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.NotNull;
/**
* Represents an Kit loaded on the server.
*/
public interface Kit {
/**
* The name of this kit. Will not contain a dash character ("-").
*
* @return Never-null {@link String} that is the name of this kit.
*/
@NotNull
String getName();
/**
* The item displayed in the kit selector gui.
*
* @return item displayed in the kit selector gui.
*/
@NotNull
ItemStack getDisplayed();
/**
* Whether or not this kit requires a permission.
* If usePermission is enabled, players must have the permission 'duels.kit.[name] (space in name replaced to dash)' to use the kit.
*
* @return True if usePermission is enabled for this kit. False otherwise.
*/
boolean isUsePermission();
/**
* Enables or disables usePermission for this kit.
*
* @param usePermission True to enable usePermission. False otherwise.
*/
void setUsePermission(final boolean usePermission);
/**
* Whether or not this kit has arenaSpecific enabled.
* If arenaSpecific is enabled, only arenas with their name starting with this kit's name appended with an underscore will be available when playing with this kit.
*
* @return True if arenaSpecific is enabled. False otherwise.
*/
boolean isArenaSpecific();
/**
* Enables or disables arenaSpecific for this kit.
*
* @param arenaSpecific True to enable arenaSpecific. False otherwise.
*/
void setArenaSpecific(final boolean arenaSpecific);
/**
* Equips the {@link Player} with the contents of this kit.
* Note: Calls {@link KitEquipEvent}.
*
* @param player {@link Player} to equip this kit.
* @return True if {@link Player} has successfully equipped this kit. False otherwise.
*/
boolean equip(@NotNull final Player player);
/**
* Whether or not this {@link Kit} has been removed.
*
* @return True if this {@link Kit} has been removed. False otherwise.
* @see KitManager#remove(CommandSender, String)
* @since 3.2.0
*/
boolean isRemoved();
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/kit/KitManager.java
================================================
package me.realized.duels.api.kit;
import java.util.List;
import me.realized.duels.api.event.kit.KitCreateEvent;
import me.realized.duels.api.event.kit.KitRemoveEvent;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents the KitManager singleton used by Duels.
*/
public interface KitManager {
/**
* Attempts to find an {@link Kit} instance associated with the given name.
*
* @param name Name to search through the loaded kits. Should not be null!
* @return {@link Kit} instance that has a name matching with the given name or null if not exists.
*/
@Nullable
Kit get(@NotNull final String name);
/**
* Creates a kit with given name and {@link Player}'s inventory contents.
* Note: Calls {@link KitCreateEvent} on successful creation.
*
* @param creator {@link Player} who is the creator of this kit.
* @param name Name of the newly created {@link Kit}. Requires to be alphanumeric (underscore is allowed).
* @return The newly created {@link Kit} or null if a kit with given name already exists.
*/
@Nullable
Kit create(@NotNull final Player creator, @NotNull final String name);
/**
* Removes a kit with given name.
* Note: Calls {@link KitRemoveEvent} on successful removal.
*
* @param source {@link CommandSender} who is the source of this call.
* @param name Name of the kit to remove.
* @return The removed {@link Kit} or null if no {@link Kit} was found with the given name.
*/
@Nullable
Kit remove(@Nullable CommandSender source, @NotNull final String name);
/**
* Calls {@link #remove(CommandSender, String)} with source being null.
*
* @see #remove(CommandSender, String)
*/
@Nullable
Kit remove(@NotNull final String name);
/**
* An UnmodifiableList of {@link Kit}s that are currently loaded.
*
* @return Never-null UnmodifiableList of {@link Kit}s that are currently loaded.
* @since 3.1.0
*/
@NotNull
List<Kit> getKits();
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/match/Match.java
================================================
package me.realized.duels.api.match;
import java.util.List;
import java.util.Set;
import me.realized.duels.api.arena.Arena;
import me.realized.duels.api.kit.Kit;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents an ongoing Match.
*/
public interface Match {
/**
* The {@link Arena} this {@link Match} is taking place in.
*
* @return {@link Arena} this {@link Match} is taking place in.
*/
@NotNull
Arena getArena();
/**
* The start of this match {@link Match} milliseconds.
* Note: {@link System#currentTimeMillis()} subtracted by the result of this method will give the duration of the current {@link Match} in milliseconds.
*
* @return start of this match in milliseconds.
*/
long getStart();
/**
* The {@link Kit} used in this {@link Match}.
*
* @return {@link Kit} used in this {@link Match} or null if players are using their own inventories.
*/
@Nullable
Kit getKit();
/**
* UnmodifiableList of ItemStacks the player has bet for this {@link Match}.
*
* @param player {@link Player} to get the list of bet items.
* @return Never-null UnmodifiableList of ItemStacks the player has bet for this {@link Match}.
*/
@NotNull
List<ItemStack> getItems(@NotNull final Player player);
/**
* The bet amount for this {@link Match}.
*
* @return bet Bet amount for this {@link Match} or 0 if no bet was specified.
*/
int getBet();
/**
* Whether or not this {@link Match} is finished.
*
* @return true if this {@link Match} has finished or false otherwise.
* @since 3.4.1
*/
boolean isFinished();
/**
* UnmodifiableSet of alive players in this {@link Match}.
*
* @return Never-null UnmodifiableSet of alive players in this {@link Match}.
* @since 3.1.0
*/
@NotNull
Set<Player> getPlayers();
/**
* UnmodifiableSet of players who started this {@link Match}.
* Note: This set includes players who are offline. If you keep a reference
* to this match, all the player objects of those who started this match will
* not be garbage-collected.
*
* @return Never-null UnmodifiableSet of players who started this {@link Match}.
* @since 3.4.1
*/
@NotNull
Set<Player> getStartingPlayers();
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/queue/DQueue.java
================================================
package me.realized.duels.api.queue;
import java.util.List;
import me.realized.duels.api.kit.Kit;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents a Queue loaded on the server.
*/
public interface DQueue {
/**
* The {@link Kit} set for this {@link DQueue}.
*
* @return {@link Kit} set for this {@link DQueue} or null if no kit was set.
*/
@Nullable
Kit getKit();
/**
* The bet amount for this {@link DQueue}.
*
* @return Bet amount for this {@link DQueue} or 0 if no bet was specified.
*/
int getBet();
/**
* Whether or not the given {@link Player} is in this {@link DQueue}.
*
* @param player Player to check if in this {@link DQueue}. Must not be null!
* @return True if player is in this {@link DQueue}. False otherwise.
*/
boolean isInQueue(@NotNull final Player player);
/**
* An UnmodifiableList of {@link Player}s in this queue.
*
* @return Never-null UnmodifiableList of {@link Player}s in this queue.
*/
@NotNull
List<Player> getQueuedPlayers();
/**
* Whether or not this {@link DQueue} has been removed.
*
* @return True if this {@link DQueue} has been removed. False otherwise.
* @see DQueueManager#remove(Kit, int)
*/
boolean isRemoved();
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/queue/DQueueManager.java
================================================
package me.realized.duels.api.queue;
import java.util.List;
import me.realized.duels.api.event.queue.QueueCreateEvent;
import me.realized.duels.api.event.queue.QueueJoinEvent;
import me.realized.duels.api.event.queue.QueueLeaveEvent;
import me.realized.duels.api.event.queue.QueueRemoveEvent;
import me.realized.duels.api.kit.Kit;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents the QueueManager singleton used by Duels.
*
* @since 3.2.0
*/
public interface DQueueManager {
/**
* Gets a {@link DQueue} with the given kit and bet.
*
* @param kit Kit to check for match in the queues.
* @param bet Bet to check for match in the queues.
* @return DQueue with the given kit and bet if found, otherwise null.
*/
@Nullable
DQueue get(@Nullable final Kit kit, final int bet);
/**
* Gets a {@link DQueue} with the given {@link Player}.
*
* @param player Player to check if in queue
* @return The queue player is in or null if not in queue
*/
@Nullable
DQueue get(@NotNull final Player player);
/**
* Creates a new {@link DQueue}.
* Note: Calls {@link QueueCreateEvent} on successful creation.
*
* @param kit Kit of the DQueue to create
* @param bet Bet of the DQueue to create
* @return The newly created DQueue or null if a queue with given kit and bet already exists
*/
@Nullable
DQueue create(@Nullable final CommandSender source, @Nullable final Kit kit, final int bet);
/**
* Calls {@link #create(CommandSender, Kit, int)} with source being null.
*
* @see #create(CommandSender, Kit, int)
*/
@Nullable
DQueue create(@Nullable final Kit kit, final int bet);
/**
* Removes a new {@link DQueue}.
* Note: Calls {@link QueueRemoveEvent} on successful removal.
*
* @param kit Kit to check for match in the queues
* @param bet Bet to check for match in the queues
* @return The removed DQueue if found, otherwise null
* @see DQueue#isRemoved()
*/
@Nullable
DQueue remove(@Nullable final CommandSender source, @Nullable final Kit kit, final int bet);
/**
* Calls {@link #remove(CommandSender, Kit, int)} with source being null.
*
* @see #remove(CommandSender, Kit, int)
*/
@Nullable
DQueue remove(@Nullable final Kit kit, final int bet);
/**
* Whether or not the {@link Player} is in a queue.
*
* @param player {@link Player} to check if in queue.
* @return True if {@link Player} is in a queue. False otherwise.
*/
boolean isInQueue(@NotNull final Player player);
/**
* Adds the {@link Player} to the given {@link DQueue}.
* Note: Calls {@link QueueJoinEvent}.
*
* @param player {@link Player} to add to {@link DQueue}.
* @param queue {@link DQueue} to add the {@link Player}.
* @return True if {@link Player} was successfully queued. False otherwise.
*/
boolean addToQueue(@NotNull final Player player, @NotNull final DQueue queue);
/**
* Removes the {@link Player} from the queue.
* Note: Calls {@link QueueLeaveEvent} if {@link Player} was in a {@link DQueue}.
*
* @param player {@link Player} to remove from queue.
* @return The {@link DQueue} that {@link Player} was in or null if {@link Player} was not in a queue.
*/
@Nullable
DQueue removeFromQueue(@NotNull final Player player);
/**
* An UnmodifiableList of {@link DQueue}s that are currently loaded.
*
* @return Never-null UnmodifiableList of {@link DQueue}s that are currently loaded.
*/
@NotNull
List<DQueue> getQueues();
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/queue/sign/QueueSign.java
================================================
package me.realized.duels.api.queue.sign;
import me.realized.duels.api.event.queue.sign.QueueSignRemoveEvent;
import me.realized.duels.api.queue.DQueue;
import org.bukkit.Location;
import org.jetbrains.annotations.NotNull;
/**
* Represents a QueueSign loaded on the server.
*/
public interface QueueSign {
/**
* The {@link Location} of this {@link QueueSign}.
*
* @return Never-null {@link Location} of this {@link QueueSign}.
*/
@NotNull
Location getLocation();
/**
* The {@link DQueue} that is linked with this {@link QueueSign}.
*
* @return Never-null {@link DQueue} that is linked with this {@link QueueSign}.
*/
@NotNull
DQueue getQueue();
/**
* Whether or not this {@link QueueSign} has been removed.
*
* @return True if this {@link QueueSign} has been removed. False otherwise.
* @see QueueSignRemoveEvent
*/
boolean isRemoved();
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/queue/sign/QueueSignManager.java
================================================
package me.realized.duels.api.queue.sign;
import java.util.List;
import org.bukkit.block.Sign;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents the QueueSignManager singleton used by Duels.
*
* @since 3.2.0
*/
public interface QueueSignManager {
/**
* Gets a {@link QueueSign} that is associated with the given {@link Sign}.
*
* @param sign {@link Sign} to match in the loaded queue signs.
* @return {@link QueueSign} associated with the {@link Sign} or null if not found.
*/
@Nullable
QueueSign get(@NotNull final Sign sign);
/**
* An UnmodifiableList of {@link QueueSign}s that are currently loaded.
*
* @return Never-null UnmodifiableList of {@link QueueSign}s that are currently loaded.
*/
@NotNull
List<QueueSign> getQueueSigns();
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/request/Request.java
================================================
package me.realized.duels.api.request;
import java.util.UUID;
import me.realized.duels.api.arena.Arena;
import me.realized.duels.api.kit.Kit;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents a Request sent.
*/
public interface Request {
/**
* The {@link UUID} of sender of this {@link Request}.
*
* @return Never-null {@link UUID} of the sender of this {@link Request}.
*/
@NotNull
UUID getSender();
/**
* The {@link UUID} of the receiver of this {@link Request}.
*
* @return Never-null {@link UUID} of the receiver of this {@link Request}.
*/
@NotNull
UUID getTarget();
/**
* The {@link Kit} for this {@link Request} or null if no {@link Kit} was selected.
*
* @return {@link Kit} for this {@link Request} or null if no {@link Kit} was selected.
*/
@Nullable
Kit getKit();
/**
* The {@link Arena} for this {@link Request} or null if no {@link Arena} was selected.
*
* @return {@link Arena} for this {@link Request} or null if no {@link Arena} was selected.
*/
@Nullable
Arena getArena();
/**
* Whether or not item betting is enabled for this {@link Request}.
*
* @return True if item betting is enabled for this {@link Request}. False otherwise.
*/
boolean canBetItems();
/**
* The bet for this {@link Request}.
*
* @return Bet amount for this {@link Request} or 0 if not specified.
*/
int getBet();
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/spectate/SpectateManager.java
================================================
package me.realized.duels.api.spectate;
import java.util.List;
import me.realized.duels.api.arena.Arena;
import me.realized.duels.api.event.spectate.SpectateEndEvent;
import me.realized.duels.api.event.spectate.SpectateStartEvent;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents the SpectateManager singleton used by Duels.
*
* @since 3.4.1
*/
public interface SpectateManager {
/**
* Attempts to find a {@link Spectator} instance associated to the player given.
*
* @param player Player to search through the spectator cache. Should not be null!
* @return {@link Spectator} instance associated to player if exists or null otherwise.
*/
@Nullable
Spectator get(@NotNull final Player player);
/**
* Checks if a player is spectating a match.
*
* @param player Player to check if spectating. Should not be null!
* @return true if player is spectating or false otherwise.
*/
boolean isSpectating(@NotNull final Player player);
/**
* Attempts to put the player in spectator mode and teleports player to target player in match.
*
* The method will return a result other than Result.SUCCESS if:
* - Player is already in spectator mode
* - Player is in a queue
* - Player is in a match
* - Target is not in a match
* - {@link SpectateStartEvent} is cancelled
*
* Note: Calls {@link SpectateStartEvent} before player is turned into spectator mode.
*
* @param player Player to put in spectator mode. Should not be null!
* @param target Target player to teleport to. Should not be null!
* @return Never-null {@link Result} instance indicating the outcome of this call.
*/
@NotNull
Result startSpectating(@NotNull final Player player, @NotNull final Player target);
/**
* Puts a player out of spectator mode.
*
* Note: Calls {@link SpectateEndEvent} after player stops spectating.
*
* @param player Player to stop spectating. Should not be null!
*/
void stopSpectating(@NotNull final Player player);
/**
* An UnmodifiableList of {@link Spectator}s that are currently spectating the given {@link Arena}.
*
* @param arena {@link Arena} to get spectators
* @return Never-null UnmodifiableList of {@link Spectator}s spectating given {@link Arena}
*/
@NotNull
List<Spectator> getSpectators(@NotNull final Arena arena);
enum Result {
ALREADY_SPECTATING,
IN_QUEUE,
IN_MATCH,
TARGET_NOT_IN_MATCH,
EVENT_CANCELLED,
SUCCESS;
}
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/spectate/Spectator.java
================================================
package me.realized.duels.api.spectate;
import java.util.UUID;
import me.realized.duels.api.arena.Arena;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents a Spectator spectating a match.
*
* @since 3.4.1
*/
public interface Spectator {
/**
* The {@link UUID} of this spectator.
*
* @return {@link UUID} of this spectator.
*/
@NotNull
UUID getUuid();
/**
* The {@link Player} instance of this spectator.
*
* @return The {@link Player} instance of this spectator or null if player is not online.
* @since 3.5.1
*/
@Nullable
Player getPlayer();
/**
* The {@link UUID} of the player this spectator is spectating.
*
* @return {@link UUID} of the player this spectator is spectating.
* @since 3.5.1
*/
@NotNull
UUID getTargetUuid();
/**
* The {@link Player} instance of the player this spectator is spectating.
*
* @return The {@link Player} instance of player this spectator is spectating or null if player is not online.
* @since 3.5.1
*/
@Nullable
Player getTarget();
/**
* The {@link Arena} this spectator is spectating.
*
* @return {@link Arena} this spectator is spectating.
*/
@NotNull
Arena getArena();
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/user/MatchInfo.java
================================================
package me.realized.duels.api.user;
import java.util.GregorianCalendar;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents the data of a match that had occured in the past.
*/
public interface MatchInfo {
/**
* The name of the winner of this match.
*
* @return Never-null name of the winner of this match.
*/
@NotNull
String getWinner();
/**
* The name of the loser of this match.
*
* @return Never-null name of the loser of this match.
*/
@NotNull
String getLoser();
/**
* The name of the kit used in this match or null if no kit was used.
*
* @return Name of the kit used in this match or null if no kit was used.
*/
@Nullable
String getKit();
/**
* The created timestamp of this match info in milliseconds.
* Note: Uses {@link GregorianCalendar#getTimeInMillis()}.
*
* @return created timestamp of this match info in milliseconds.
*/
long getCreation();
/**
* The duration of this match in milliseconds.
*
* @return Duration of this match in milliseconds.
*/
long getDuration();
/**
* The winner's finishing health.
*
* @return Winner's finishing health.
*/
double getHealth();
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/user/User.java
================================================
package me.realized.duels.api.user;
import java.util.List;
import java.util.UUID;
import me.realized.duels.api.kit.Kit;
import org.jetbrains.annotations.NotNull;
/**
* Represents a User loaded on the server.
*/
public interface User {
/**
* The {@link UUID} of this user. thread-safe!
*
* @return {@link UUID} of this user.
*/
@NotNull
UUID getUuid();
/**
* The Name of this user. thread-safe!
*
* @return Name of this user.
*/
@NotNull
String getName();
/**
* Total wins of this user. thread-safe!
*
* @return total wins of this user.
*/
int getWins();
/**
* Sets new total wins for this user
*
* @param wins New total wins.
*/
void setWins(final int wins);
/**
* Total losses of this user. thread-safe!
*
* @return total losses of this user.
*/
int getLosses();
/**
* Sets new total wins for this user.
*
* @param losses New total losses.
*/
void setLosses(final int losses);
/**
* Whether or not this user is receiving duel requests.
*
* @return True if this user has requests enabled. False otherwise.
*/
boolean canRequest();
/**
* Enables or disables duel requests for this user.
*
* @param requests True to allow sending duel requests to this user. False otherwise.
*/
void setRequests(final boolean requests);
/**
* UnmodifiableList of recent matches for this user.
*
* @return Never-null UnmodifiableList of recent matches for this user.
*/
@NotNull
List<MatchInfo> getMatches();
/**
* Gets the no kit rating. thread-safe!
*
* @return no kit rating.
* @since 3.3.0
*/
int getRating();
/**
* Gets the rating of the given {@link Kit}. thread-safe!
*
* @param kit {@link Kit} to check for rating.
* @return Rating for this {@link Kit}.
*/
int getRating(@NotNull final Kit kit);
/**
* Resets the rating to default for the no kit rating. thread-safe!
*
* @since 3.3.0
*/
void resetRating();
/**
* Resets the rating to default for the given {@link Kit}. thread-safe!
*
* @param kit {@link Kit} to reset the rating to default.
*/
void resetRating(@NotNull final Kit kit);
/**
* Resets user's wins, losses, recent matches, and all rating.
*/
void reset();
}
================================================
FILE: duels-api/src/main/java/me/realized/duels/api/user/UserManager.java
================================================
package me.realized.duels.api.user;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
import me.realized.duels.api.kit.Kit;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents the UserManager singleton used by Duels.
*/
public interface UserManager {
/**
* Whether or not had all users completed loading to the memory.
*
* @return True if all users have completed loading to the memory. False otherwise.
*/
boolean isLoaded();
/**
* Gets a {@link User} with the given name.
* Note: If {@link #isLoaded()} returns false, this may return null even if userdata file exists.
*
* @param name Name of the user to get.
* @return {@link User} with the given name or null if not exists.
*/
@Nullable
User get(@NotNull final String name);
/**
* Gets a {@link User} with the given {@link UUID}.
* Note: If {@link #isLoaded()} returns false, this may return null even if userdata file exists.
*
* @param uuid {@link UUID} of the user to get.
* @return {@link User} with the given {@link UUID} or null if not exists.
*/
@Nullable
User get(@NotNull final UUID uuid);
/**
* Calls {@link #get(UUID)} with {@link Player#getUniqueId()}.
*
* @see #get(UUID)
*/
@Nullable
User get(@NotNull final Player player);
/**
* Gets the top wins. thread-safe!
*
* @return {@link TopEntry} containing name and wins of the top 10 Wins or null if the leaderboard has not loaded yet.
*/
@Nullable
TopEntry getTopWins();
/**
* Gets the top losses. thread-safe!
*
* @return {@link TopEntry} containing name and losses of the top 10 Losses or null if the leaderboard has not loaded yet.
*/
@Nullable
TopEntry getTopLosses();
/**
* Gets the top rating for no kit. thread-safe!
*
* @return {@link TopEntry} containing name and rating of the top 10 Rating for no kit or null if the leaderboard has not loaded yet.
* @since 3.3.0
*/
@Nullable
TopEntry getTopRatings();
/**
* Gets the top rating for the given {@link Kit}. thread-safe!
*
* @param kit {@link Kit} to get {@link TopEntry}.
* @return {@link TopEntry} containing name and rating of the top 10 Rating for kit or null if the leaderboard has not loaded yet.
*/
@Nullable
TopEntry getTopRatings(@NotNull final Kit kit);
class TopEntry {
private final long creation;
private final String type, identifier;
private final List<TopData> data;
public TopEntry(@NotNull final String type, @NotNull final String identifier, @NotNull final List<TopData> data) {
Objects.requireNonNull(type, "type");
Objects.requireNonNull(identifier, "identifier");
Objects.requireNonNull(data, "data");
this.creation = System.currentTimeMillis();
this.type = type;
this.identifier = identifier;
this.data = data;
}
public long getCreation() {
return creation;
}
public String getType() {
return type;
}
public String getIdentifier() {
return identifier;
}
public List<TopData> getData() {
return data;
}
@Override
public boolean equals(final Object other) {
if (this == other) {
return true;
}
if (other == null || getClass() != other.getClass()) {
return false;
}
final TopEntry topEntry = (TopEntry) other;
return Objects.equals(type, topEntry.type) && Objects.equals(identifier, topEntry.identifier) && Objects.equals(data, topEntry.data);
}
@Override
public int hashCode() {
return Objects.hash(type, identifier, data);
}
}
class TopData implements Comparable<TopData> {
private final UUID uuid;
private final String name;
private final int value;
public TopData(@NotNull final UUID uuid, @NotNull final String name, final int value) {
Objects.requireNonNull(uuid, "uuid");
Objects.requireNonNull(name, "name");
this.uuid = uuid;
this.name = name;
this.value = value;
}
public UUID getUuid() {
return uuid;
}
public String getName() {
return name;
}
public int getValue() {
return value;
}
@Override
public int compareTo(@NotNull final TopData data) {
Objects.requireNonNull(data, "data");
return Integer.compare(value, data.value);
}
@Override
public boolean equals(final Object other) {
if (this == other) {
return true;
}
if (other == null || getClass() != other.getClass()) {
return false;
}
final TopData topData = (TopData) other;
return value == topData.value && Objects.equals(uuid, topData.uuid) && Objects.equals(name, topData.name);
}
@Override
public int hashCode() {
return Objects.hash(uuid, name, value);
}
}
}
================================================
FILE: duels-plugin/build.gradle
================================================
import org.apache.tools.ant.filters.ReplaceTokens
clean.doFirst {
delete "$rootDir/out/"
}
processResources {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
from(sourceSets.main.resources.srcDirs) {
include '**/*.yml'
filter(ReplaceTokens, tokens: [VERSION: project.version])
}
}
dependencies {
compileOnly 'org.jetbrains:annotations-java5:22.0.0'
compileOnly 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
implementation 'org.spigotmc:spigot-api:1.14.4-R0.1-SNAPSHOT'
implementation 'com.mojang:authlib:1.5.21'
implementation 'me.clip:placeholderapi:2.11.1'
implementation 'com.SirBlobman.combatlogx:CombatLogX-API:10.0.0.0-SNAPSHOT'
implementation ('net.essentialsx:EssentialsX:2.19.2') {
transitive = false
}
implementation (name: 'MVdWPlaceholderAPI-3.1.1') {
transitive = false
}
implementation name: 'Vault-1.6.7'
implementation name: 'CombatTagPlus'
implementation name: 'PvPManager-3.7.16'
implementation name: 'Factions-1.6.9.5-U0.1.14'
implementation name: 'MassiveCore'
implementation name: 'Factions'
implementation name: 'MyPet-2.3.4'
implementation name: 'BountyHunters-2.2.6'
implementation name: 'SimpleClans-2.14.4.1'
implementation name: 'LeaderHeadsAPI'
implementation project(':duels-api')
implementation project(':duels-worldguard')
implementation project(':duels-worldguard-v6')
implementation project(':duels-worldguard-v7')
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.1'
}
shadowJar {
getDestinationDirectory().set(file("$rootDir/out/"))
final String archiveName = parent.name + '-' + project.version + '.jar'
getArchiveFileName().set(archiveName)
dependencies {
include(project(':duels-api'))
include(project(':duels-worldguard'))
include(project(':duels-worldguard-v6'))
include(project(':duels-worldguard-v7'))
include(dependency('com.fasterxml.jackson.core:.*'))
}
final String group = project.group.toString() + "." + parent.name.toLowerCase() + ".shaded."
relocate 'com.fasterxml.jackson.core', group + 'jackson-core'
}
// To build Duels plugin jar, run './gradlew clean build'.
build {
dependsOn(shadowJar)
}
publishing {
publications {
maven(MavenPublication) {
groupId = project.group.toString()
artifactId = project.name.toLowerCase()
version = project.version
from components.java
}
}
}
================================================
FILE: duels-plugin/src/main/java/me/realized/duels/DuelsPlugin.java
================================================
package me.realized.duels;
import com.google.common.collect.Lists;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.logging.Level;
import java.util.stream.Collectors;
import lombok.Getter;
import me.realized.duels.api.Duels;
import me.realized.duels.api.command.SubCommand;
import me.realized.duels.arena.ArenaManagerImpl;
import me.realized.duels.betting.BettingManager;
import me.realized.duels.command.commands.SpectateCommand;
import me.realized.duels.command.commands.duel.DuelCommand;
import me.realized.duels.command.commands.duels.DuelsCommand;
import me.realized.duels.command.commands.queue.QueueCommand;
import me.realized.duels.config.Config;
import me.realized.duels.config.Lang;
import me.realized.duels.data.ItemData;
import me.realized.duels.data.ItemData.ItemDataDeserializer;
import me.realized.duels.data.UserManagerImpl;
import me.realized.duels.duel.DuelManager;
import me.realized.duels.extension.ExtensionClassLoader;
import me.realized.duels.extension.ExtensionManager;
import me.realized.duels.hook.HookManager;
import me.realized.duels.inventories.InventoryManager;
import me.realized.duels.kit.KitManagerImpl;
import me.realized.duels.listeners.DamageListener;
import me.realized.duels.listeners.EnderpearlListener;
import me.realized.duels.listeners.KitItemListener;
import me.realized.duels.listeners.KitOptionsListener;
import me.realized.duels.listeners.LingerPotionListener;
import me.realized.duels.listeners.PotionListener;
import me.realized.duels.listeners.ProjectileHitListener;
import me.realized.duels.listeners.TeleportListener;
import me.realized.duels.logging.LogManager;
import me.realized.duels.player.PlayerInfoManager;
import me.realized.duels.queue.QueueManager;
import me.realized.duels.queue.sign.QueueSignManagerImpl;
import me.realized.duels.request.RequestManager;
import me.realized.duels.setting.SettingsManager;
import me.realized.duels.shaded.bstats.Metrics;
import me.realized.duels.spectate.SpectateManagerImpl;
import me.realized.duels.teleport.Teleport;
import me.realized.duels.util.Loadable;
import me.realized.duels.util.Log;
import me.realized.duels.util.Log.LogSource;
import me.realized.duels.util.Reloadable;
import me.realized.duels.util.UpdateChecker;
import me.realized.duels.util.command.AbstractCommand;
import me.realized.duels.util.gui.GuiListener;
import me.realized.duels.util.json.JsonUtil;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitTask;
import org.jetbrains.annotations.NotNull;
public class DuelsPlugin extends JavaPlugin implements Duels, LogSource {
private static final int BSTATS_ID = 2696;
private static final int RESOURCE_ID = 20171;
private static final String SPIGOT_INSTALLATION_URL = "https://www.spigotmc.org/wiki/spigot-installation/";
@Getter
private static DuelsPlugin instance;
private final List<Loadable> loadables = new ArrayList<>();
private int lastLoad;
@Getter
private LogManager logManager;
@Getter
private Config configuration;
@Getter
private Lang lang;
@Getter
private UserManagerImpl userManager;
@Getter
private GuiListener<DuelsPlugin> guiListener;
@Getter
private KitManagerImpl kitManager;
@Getter
private ArenaManagerImpl arenaManager;
@Getter
private SettingsManager settingManager;
@Getter
private PlayerInfoManager playerManager;
@Getter
private SpectateManagerImpl spectateManager;
@Getter
private BettingManager bettingManager;
@Getter
private InventoryManager inventoryManager;
@Getter
private DuelManager duelManager;
@Getter
private QueueManager queueManager;
@Getter
private QueueSignManagerImpl queueSignManager;
@Getter
private RequestManager requestManager;
@Getter
private HookManager hookManager;
@Getter
private Teleport teleport;
@Getter
private ExtensionManager extensionManager;
private final Map<String, AbstractCommand<DuelsPlugin>> commands = new HashMap<>();
private final List<Listener> registeredListeners = new ArrayList<>();
@Getter
private volatile boolean updateAvailable;
@Getter
private volatile String newVersion;
@Override
public void onEnable() {
instance = this;
Log.addSource(this);
JsonUtil.registerDeserializer(ItemData.class, ItemDataDeserializer.class);
try {
logManager = new LogManager(this);
} catch (IOException ex) {
Log.error("Could not load LogManager. Please contact the developer.");
// Manually print the stacktrace since Log#error only prints errors to non-plugin log sources.
ex.printStackTrace();
getPluginLoader().disablePlugin(this);
return;
}
Log.addSource(logManager);
logManager.debug("onEnable start -> " + System.currentTimeMillis() + "\n");
try {
Class.forName("org.spigotmc.SpigotConfig");
} catch (ClassNotFoundException ex) {
Log.error("================= *** DUELS LOAD FAILURE *** =================");
Log.error("Duels requires a spigot server to run, but this server was not running on spigot!");
Log.error("To run your server on spigot, follow this guide: " + SPIGOT_INSTALLATION_URL);
Log.error("Spigot is compatible with CraftBukkit/Bukkit plugins.");
Log.error("================= *** DUELS LOAD FAILURE *** =================");
getPluginLoader().disablePlugin(this);
return;
}
loadables.add(configuration = new Config(this));
loadables.add(lang = new Lang(this));
loadables.add(userManager = new UserManagerImpl(this));
loadables.add(guiListener = new GuiListener<>(this));
loadables.add(kitManager = new KitManagerImpl(this));
loadables.add(arenaManager = new ArenaManagerImpl(this));
loadables.add(settingManager = new SettingsManager(this));
loadables.add(playerManager = new PlayerInfoManager(this));
loadables.add(spectateManager = new SpectateManagerImpl(this));
loadables.add(bettingManager = new BettingManager(this));
loadables.add(inventoryManager = new InventoryManager(this));
loadables.add(duelManager = new DuelManager(this));
loadables.add(queueManager = new QueueManager(this));
loadables.add(queueSignManager = new QueueSignManagerImpl(this));
loadables.add(requestManager = new RequestManager(this));
hookManager = new HookManager(this);
loadables.add(teleport = new Teleport(this));
loadables.add(extensionManager = new ExtensionManager(this));
if (!load()) {
getPluginLoader().disablePlugin(this);
return;
}
new KitItemListener(this);
new DamageListener(this);
new PotionListener(this);
new TeleportListener(this);
new ProjectileHitListener(this);
new EnderpearlListener(this);
new KitOptionsListener(this);
new LingerPotionListener(this);
new Metrics(this, BSTATS_ID);
if (!configuration.isCheckForUpdates()) {
return;
}
final UpdateChecker updateChecker = new UpdateChecker(this, RESOURCE_ID);
updateChecker.check((hasUpdate, newVersion) -> {
if (hasUpdate) {
DuelsPlugin.this.updateAvailable = true;
DuelsPlugin.this.newVersion = newVersion;
Log.info("===============================================");
Log.info("An update for " + getName() + " is available!");
Log.info("Download " + getName() + " v" + newVersion + " here:");
Log.info(getDescription().getWebsite());
Log.info("===============================================");
} else {
Log.info("No updates were available. You are on the latest version!");
}
});
}
@Override
public void onDisable() {
final long start = System.currentTimeMillis();
long last = start;
logManager.debug("onDisable start -> " + start + "\n");
unload();
logManager.debug("unload done (took " + Math.abs(last - (last = System.currentTimeMillis())) + "ms)");
Log.clearSources();
logManager.debug("Log#clearSources done (took " + Math.abs(last - System.currentTimeMillis()) + "ms)");
logManager.handleDisable();
instance = null;
log(Level.INFO, "Disable process took " + (System.currentTimeMillis() - start) + "ms.");
}
/**
* @return true if load was successful, otherwise false
*/
private boolean load() {
registerCommands(
new DuelCommand(this),
new QueueCommand(this),
new SpectateCommand(this),
new DuelsCommand(this)
);
for (final Loadable loadable : loadables) {
final String name = loadable.getClass().getSimpleName();
try {
final long now = System.currentTimeMillis();
logManager.debug("Starting load of " + name + " at " + now);
loadable.handleLoad();
logManager.debug(name + " has been loaded. (took " + (System.currentTimeMillis() - now) + "ms)");
lastLoad = loadables.indexOf(loadable);
} catch (Exception ex) {
// Handles the case of exceptions from LogManager not being logged in file
if (loadable instanceof LogSource) {
ex.printStackTrace();
}
Log.error("There was an error while loading " + name + "! If you believe this is an issue from the plugin, please contact the developer.", ex);
return false;
}
}
return true;
}
/**
* @return true if unload was successful, otherwise false
*/
private boolean unload() {
registeredListeners.forEach(HandlerList::unregisterAll);
registeredListeners.clear();
// Unregister all extension listeners that isn't using the method Duels#registerListener
HandlerList.getRegisteredListeners(this)
.stream()
.filter(listener -> listener.getListener().getClass().getClassLoader().getClass().isAssignableFrom(ExtensionClassLoader.class))
.forEach(listener -> HandlerList.unregisterAll(listener.getListener()));
commands.clear();
for (final Loadable loadable : Lists.reverse(loadables)) {
final String name = loadable.getClass().getSimpleName();
try {
if (loadables.indexOf(loadable) > lastLoad) {
continue;
}
final long now = System.currentTimeMillis();
logManager.debug("Starting unload of " + name + " at " + now);
loadable.handleUnload();
logManager.debug(name + " has been unloaded. (took " + (System.currentTimeMillis() - now) + "ms)");
} catch (Exception ex) {
Log.error("There was an error while unloading " + name + "! If you believe this is an issue from the plugin, please contact the developer.", ex);
return false;
}
}
return true;
}
@SafeVarargs
private final void registerCommands(final AbstractCommand<DuelsPlugin>... commands) {
for (final AbstractCommand<DuelsPlugin> command : commands) {
this.commands.put(command.getName().toLowerCase(), command);
command.register();
}
}
@Override
public boolean registerSubCommand(@NotNull final String command, @NotNull final SubCommand subCommand) {
Objects.requireNonNull(command, "command");
Objects.requireNonNull(subCommand, "subCommand");
final AbstractCommand<DuelsPlugin> result = commands.get(command.toLowerCase());
if (result == null || result.isChild(subCommand.getName().toLowerCase())) {
return false;
}
result.child(new AbstractCommand<DuelsPlugin>(this, subCommand) {
@Override
protected void execute(final CommandSender sender, final String label, final String[] args) {
subCommand.execute(sender, label, args);
}
});
return true;
}
@Override
public void registerListener(@NotNull final Listener listener) {
Objects.requireNonNull(listener, "listener");
registeredListeners.add(listener);
Bukkit.getPluginManager().registerEvents(listener, this);
}
@Override
public boolean reload() {
if (!(unload() && load())) {
getPluginLoader().disablePlugin(this);
return false;
}
return true;
}
@Override
public String getVersion() {
return getDescription().getVersion();
}
public boolean reload(final Loadable loadable) {
boolean unloaded = false;
try {
loadable.handleUnload();
unloaded = true;
loadable.handleLoad();
return true;
} catch (Exception ex) {
Log.error("There was an error while " + (unloaded ? "loading " : "unloading ")
+ loadable.getClass().getSimpleName()
+ "! If you believe this is an issue from the plugin, please contact the developer.", ex);
return false;
}
}
@Override
public BukkitTask doSync(@NotNull final Runnable task) {
Objects.requireNonNull(task, "task");
return Bukkit.getScheduler().runTask(this, task);
}
@Override
public BukkitTask doSyncAfter(@NotNull final Runnable task, final long delay) {
Objects.requireNonNull(task, "task");
return Bukkit.getScheduler().runTaskLater(this, task, delay);
}
@Override
public BukkitTask doSyncRepeat(@NotNull final Runnable task, final long delay, final long period) {
Objects.requireNonNull(task, "task");
return Bukkit.getScheduler().runTaskTimer(this, task, delay, period);
}
@Override
public BukkitTask doAsync(@NotNull final Runnable task) {
Objects.requireNonNull(task, "task");
return Bukkit.getScheduler().runTaskAsynchronously(this, task);
}
@Override
public BukkitTask doAsyncAfter(@NotNull final Runnable task, final long delay) {
Objects.requireNonNull(task, "task");
return Bukkit.getScheduler().runTaskLaterAsynchronously(this, task, delay);
}
@Override
public BukkitTask doAsyncRepeat(@NotNull final Runnable task, final long delay, final long period) {
Objects.requireNonNull(task, "task");
return Bukkit.getScheduler().runTaskTimerAsynchronously(this, task, delay, period);
}
@Override
public void cancelTask(@NotNull final BukkitTask task) {
Objects.requireNonNull(task, "task");
task.cancel();
}
@Override
public void cancelTask(final int id) {
Bukkit.getScheduler().cancelTask(id);
}
@Override
public void info(@NotNull final String message) {
Objects.requireNonNull(message, "message");
Log.info(message);
}
@Override
public void warn(@NotNull final String message) {
Objects.requireNonNull(message, "message");
Log.warn(message);
}
@Override
public void error(@NotNull final String message) {
Objects.requireNonNull(message, "message");
Log.error(message);
}
@Override
public void error(@NotNull final String message, @NotNull final Throwable thrown) {
Objects.requireNonNull(message, "message");
Objects.requireNonNull(thrown, "thrown");
Log.error(message, thrown);
}
public Loadable find(final String name) {
return loadables.stream().filter(loadable -> loadable.getClass().getSimpleName().equalsIgnoreCase(name)).findFirst().orElse(null);
}
public List<String> getReloadables() {
return loadables.stream()
.filter(loadable -> loadable instanceof Reloadable)
.map(loadable -> loadable.getClass().getSimpleName())
.collect(Collectors.toList());
}
@Override
public void log(final Level level, final String s) {
getLogger().log(level, s);
}
@Override
public void log(final Level level, final String s, final Throwable thrown) {
getLogger().log(level, s, thrown);
}
}
================================================
FILE: duels-plugin/src/main/java/me/realized/duels/Permissions.java
================================================
package me.realized.duels;
public final class Permissions {
public static final String DUEL = "duels.duel";
public static final String STATS = "duels.stats";
public static final String STATS_OTHERS = STATS + ".others";
public static final String TOGGLE = "duels.toggle";
public static final String TOP = "duels.top";
public static final String SPECTATE = "duels.spectate";
public static final String SPEC_ANON = SPECTATE + ".anonymously";
public static final String ADMIN = "duels.admin";
public static final String TP_BYPASS = "duels.teleport.bypass";
public static final String KIT = "duels.kits.%s";
public static final String KIT_ALL = "duels.kits.*";
public static final String KIT_SELECTING = "duels.use.kit-select";
public static final String OWN_INVENTORY = "duels.use.own-inventory";
public static final String ARENA_SELECTING = "duels.use.arena-select";
public static final String ITEM_BETTING = "duels.use.item-betting";
public static final String MONEY_BETTING = "duels.use.money-betting";
public static final String SETTING_ALL = "duels.use.*";
public static final String QUEUE = "duels.queue";
private Permissions() {}
}
================================================
FILE: duels-plugin/src/main/java/me/realized/duels/api/DuelsAPI.java
================================================
package me.realized.duels.api;
import java.util.UUID;
import me.realized.duels.DuelsPlugin;
import me.realized.duels.api.arena.ArenaManager;
import me.realized.duels.api.user.UserManager;
import me.realized.duels.data.UserData;
import org.bukkit.entity.Player;
/**
* A static API for Duels.
* (This is an old, deprecated API for Duels v2 and below.)
*
* @deprecated As of v3.0.0, use {@link Duels} instead.
*/
@Deprecated
public class DuelsAPI {
/**
* @deprecated As of v3.0.0, use {@link UserManager#get(UUID)} instead.
*/
@Deprecated
public static UserData getUser(final UUID uuid, boolean force) {
return DuelsPlugin.getInstance().getUserManager().get(uuid);
}
/**
* @deprecated As of v3.0.0, use {@link UserManager#get(Player)} instead.
*/
@Deprecated
public static UserData getUser(final Player player, boolean force) {
return DuelsPlugin.getInstance().getUserManager().get(player);
}
/**
* @deprecated As of v3.0.0, use {@link ArenaManager#isInMatch(Player)} instead.
*/
@Deprecated
public static boolean isInMatch(final Player player) {
return DuelsPlugin.getInstance().getArenaManager().isInMatch(player);
}
/**
* @deprecated As of v3.0.0, get the version from {@link Duels#getVersion()} instead.
*/
@Deprecated
public static String getVersion() {
return DuelsPlugin.getInstance().getVersion();
}
}
================================================
FILE: duels-plugin/src/main/java/me/realized/duels/arena/ArenaImpl.java
================================================
package me.realized.duels.arena;
import com.google.common.collect.Lists;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.UUID;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import me.realized.duels.DuelsPlugin;
import me.realized.duels.api.arena.Arena;
import me.realized.duels.api.event.arena.ArenaSetPositionEvent;
import me.realized.duels.api.event.arena.ArenaStateChangeEvent;
import me.realized.duels.api.event.match.MatchEndEvent;
import me.realized.duels.api.event.match.MatchEndEvent.Reason;
import me.realized.duels.gui.BaseButton;
import me.realized.duels.kit.KitImpl;
import me.realized.duels.queue.Queue;
import me.realized.duels.setting.Settings;
import me.realized.duels.util.compat.Items;
import me.realized.duels.util.function.Pair;
import me.realized.duels.util.inventory.ItemBuilder;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class ArenaImpl extends BaseButton implements Arena {
@Getter
private final String name;
@Getter
private boolean disabled;
@Getter
private final Set<KitImpl> kits = new HashSet<>();
@Getter
private final Map<Integer, Location> positions = new HashMap<>();
@Getter
private MatchImpl match;
@Getter(value = AccessLevel.PACKAGE)
@Setter(value = AccessLevel.PACKAGE)
private Countdown countdown;
@Getter
@Setter(value = AccessLevel.PACKAGE)
private boolean removed;
public ArenaImpl(final DuelsPlugin plugin, final String name, final boolean disabled) {
super(plugin, ItemBuilder
.of(Items.EMPTY_MAP)
.name(plugin.getLang().getMessage("GUI.arena-selector.buttons.arena.name", "name", name))
.lore(plugin.getLang().getMessage("GUI.arena-selector.buttons.arena.lore-unavailable").split("\n"))
.build()
);
this.name = name;
this.disabled = disabled;
}
public ArenaImpl(final DuelsPlugin plugin, final String name) {
this(plugin, name, false);
}
public void refreshGui(final boolean available) {
setLore(lang.getMessage("GUI.arena-selector.buttons.arena.lore-" + (available ? "available" : "unavailable")).split("\n"));
arenaManager.getGui().calculatePages();
}
@Nullable
@Override
public Location getPosition(final int pos) {
return positions.get(pos);
}
@Override
public boolean setPosition(@Nullable final Player source, final int pos, @NotNull final Location location) {
Objects.requireNonNull(location, "location");
if (pos <= 0 || pos > 2) {
return false;
}
final ArenaSetPositionEvent event = new ArenaSetPositionEvent(source, this, pos, location);
Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled()) {
return false;
}
positions.put(pos, location);
arenaManager.saveArenas();
refreshGui(isAvailable());
return true;
}
@Override
public boolean setPosition(final int pos, @NotNull final Location location) {
return setPosition(null, pos, location);
}
@Override
public boolean setDisabled(@Nullable final CommandSender source, final boolean disabled) {
final ArenaStateChangeEvent event = new ArenaStateChangeEvent(source, this, disabled);
Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled()) {
return false;
}
this.disabled = event.isDisabled();
arenaManager.saveArenas();
refreshGui(isAvailable());
return true;
}
@Override
public boolean setDisabled(final boolean disabled) {
return setDisabled(null, disabled);
}
public boolean isBoundless() {
return kits.isEmpty();
}
public boolean isBound(@Nullable final KitImpl kit) {
return kit != null && kits.contains(kit);
}
public void bind(final KitImpl kit) {
if (isBound(kit)) {
kits.remove(kit);
} else {
kits.add(kit);
}
arenaManager.saveArenas();
}
@Override
public boolean isUsed() {
return match != null;
}
public boolean isAvailable() {
return !isDisabled() && !isUsed() && getPosition(1) != null && getPosition(2) != null;
}
public MatchImpl startMatch(final KitImpl kit, final Map<UUID, List<ItemStack>> items, final int bet, final Queue source) {
this.match = new MatchImpl(this, kit, items, bet, source);
refreshGui(false);
return match;
}
public void endMatch(final UUID winner, final UUID loser, final Reason reason) {
spectateManager.stopSpectating(this);
final MatchEndEvent event = new MatchEndEvent(match, winner, loser, reason);
Bukkit.getPluginManager().callEvent(event);
final Queue source = match.getSource();
match.setFinished();
match = null;
if (source != null) {
source.update();
queueManager.getGui().calculatePages();
}
refreshGui(true);
}
public void startCountdown(final String kit, final Map<UUID, Pair<String, Integer>> info) {
final List<String> messages = config.getCdMessages();
if (messages.isEmpty()) {
return;
}
this.countdown = new Countdown(plugin, this, kit, info, messages, config.getTitles());
countdown.runTaskTimer(plugin, 0L, 20L);
}
boolean isCounting() {
return countdown != null;
}
@Override
public boolean has(@NotNull final Player player) {
Objects.requireNonNull(player, "player");
return isUsed() && !match.getPlayerMap().getOrDefault(player, true);
}
public void add(final Player player) {
if (isUsed()) {
match.getPlayerMap().put(player, false);
}
}
public void remove(final Player player) {
if (isUsed() && match.getPlayerMap().containsKey(player)) {
match.getPlayerMap().put(player, true);
}
}
public boolean isEndGame() {
return size() <= 1;
}
public int size() {
return isUsed() ? match.getAlivePlayers().size() : 0;
}
public Player first() {
return isUsed() ? match.getAlivePlayers().iterator().next() : null;
}
public Player getOpponent(final Player player) {
return isUsed() ? match.getAllPlayers().stream().filter(other -> !player.equals(other)).findFirst().orElse(null) : null;
}
public Set<Player> getPlayers() {
return isUsed() ? match.getAllPlayers() : Collections.emptySet();
}
public void broadcast(final String message) {
final List<Player> receivers = Lists.newArrayList(getPlayers());
spectateManager.getSpectatorsImpl(this)
.stream()
.map(spectator -> Bukkit.getPlayer(spectator.getUuid()))
.forEach(receivers::add);
receivers.forEach(player -> player.sendMessage(message));
}
@Override
public void onClick(final Player player) {
if (!isAvailable()) {
return;
}
final Settings settings = settingManager.getSafely(player);
final String kitName = settings.getKit() != null ? settings.getKit().getName() : lang.getMessage("GENERAL.none");
if (!arenaManager.isSelectable(settings.getKit(), this)) {
lang.sendMessage(player, "ERROR.setting.arena-not-applicable", "kit", kitName, "arena", name);
return;
}
settings.setArena(this);
settings.openGui(player);
}
@Override
public boolean equals(final Object other) {
if (this == other) { return true; }
if (other == null || getClass() != other.getClass()) { return false; }
final ArenaImpl arena = (ArenaImpl) other;
return Objects.equals(name, arena.name);
}
@Override
public int hashCode() {
return Objects.hash(name);
}
}
================================================
FILE: duels-plugin/src/main/java/me/realized/duels/arena/ArenaManagerImpl.java
================================================
package me.realized.duels.arena;
import com.fasterxml.jackson.core.type.TypeReference;
import com.google.common.base.Charsets;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.Reader;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.ThreadLocalRandom;
import java.util.stream.Collectors;
import lombok.Getter;
import me.realized.duels.DuelsPlugin;
import me.realized.duels.api.arena.Arena;
import me.realized.duels.api.arena.ArenaManager;
import me.realized.duels.api.event.arena.ArenaCreateEvent;
import me.realized.duels.api.event.arena.ArenaRemoveEvent;
import me.realized.duels.config.Config;
import me.realized.duels.config.Lang;
import me.realized.duels.data.ArenaData;
import me.realized.duels.kit.KitImpl;
import me.realized.duels.queue.Queue;
import me.realized.duels.util.Loadable;
import me.realized.duels.util.Log;
import me.realized.duels.util.StringUtil;
import me.realized.duels.util.compat.Items;
import me.realized.duels.util.gui.MultiPageGui;
import me.realized.duels.util.inventory.ItemBuilder;
import me.realized.duels.util.io.FileUtil;
import me.realized.duels.util.json.JsonUtil;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.ProjectileLaunchEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.projectiles.ProjectileSource;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class ArenaManagerImpl implements Loadable, ArenaManager {
private static final String FILE_NAME = "arenas.json";
private static final String ERROR_NOT_ALPHANUMERIC = "Could not load arena %s: Name is not alphanumeric.";
private static final String ARENAS_LOADED = "Loaded %s arena(s).";
private final DuelsPlugin plugin;
private final Config config;
private final Lang lang;
private final File file;
private final List<ArenaImpl> arenas = new ArrayList<>();
@Getter
private MultiPageGui<DuelsPlugin> gui;
public ArenaManagerImpl(final DuelsPlugin plugin) {
this.plugin = plugin;
this.config = plugin.getConfiguration();
this.lang = plugin.getLang();
this.file = new File(plugin.getDataFolder(), FILE_NAME);
Bukkit.getPluginManager().registerEvents(new ArenaListener(), plugin);
}
@Override
public void handleLoad() throws IOException {
gui = new MultiPageGui<>(plugin, lang.getMessage("GUI.arena-selector.title"), config.getArenaSelectorRows(), arenas);
gui.setSpaceFiller(Items.from(config.getArenaSelectorFillerType(), config.getArenaSelectorFillerData()));
gui.setPrevButton(ItemBuilder.of(Material.PAPER).name(lang.getMessage("GUI.kit-selector.buttons.previous-page.name")).build());
gui.setNextButton(ItemBuilder.of(Material.PAPER).name(lang.getMessage("GUI.kit-selector.buttons.next-page.name")).build());
gui.setEmptyIndicator(ItemBuilder.of(Material.PAPER).name(lang.getMessage("GUI.kit-selector.buttons.empty.name")).build());
plugin.getGuiListener().addGui(gui);
if (FileUtil.checkNonEmpty(file, true)) {
try (final Reader reader = new InputStreamReader(new FileInputStream(file), Charsets.UTF_8)) {
final List<ArenaData> data = JsonUtil.getObjectMapper().readValue(reader, new TypeReference<List<ArenaData>>() {});
if (data != null) {
for (final ArenaData arenaData : data) {
if (!StringUtil.isAlphanumeric(arenaData.getName())) {
Log.warn(this, String.format(ERROR_NOT_ALPHANUMERIC, arenaData.getName()));
continue;
}
arenas.add(arenaData.toArena(plugin));
}
}
}
}
Log.info(this, String.format(ARENAS_LOADED, arenas.size()));
gui.calculatePages();
}
@Override
public void handleUnload() {
if (gui != null) {
plugin.getGuiListener().removeGui(gui);
}
arenas.clear();
}
void saveArenas() {
final List<ArenaData> data = new ArrayList<>();
for (final ArenaImpl arena : arenas) {
data.add(new ArenaData(arena));
}
try (final Writer writer = new OutputStreamWriter(new FileOutputStream(file), Charsets.UTF_8)) {
JsonUtil.getObjectWriter().writeValue(writer, data);
writer.flush();
} catch (IOException ex) {
Log.error(this, ex.getMessage(), ex);
}
}
@Nullable
@Override
public ArenaImpl get(@NotNull final String name) {
Objects.requireNonNull(name, "name");
return arenas.stream().filter(arena -> arena.getName().equals(name)).findFirst().orElse(null);
}
@Nullable
@Override
public ArenaImpl get(@NotNull final Player player) {
Objects.requireNonNull(player, "player");
return arenas.stream().filter(arena -> arena.has(player)).findFirst().orElse(null);
}
@Override
public boolean isInMatch(@NotNull final Player player) {
Objects.requireNonNull(player, "player");
return get(player) != null;
}
@NotNull
@Override
public List<Arena> getArenas() {
return Collections.unmodifiableList(arenas);
}
public boolean create(final CommandSender source, final String name) {
if (get(name) != null) {
return false;
}
final ArenaImpl arena = new ArenaImpl(plugin, name);
arenas.add(arena);
saveArenas();
final ArenaCreateEvent event = new ArenaCreateEvent(source, arena);
Bukkit.getPluginManager().callEvent(event);
gui.calculatePages();
return true;
}
public boolean remove(final CommandSender source, final ArenaImpl arena) {
if (arenas.remove(arena)) {
arena.setRemoved(true);
saveArenas();
final ArenaRemoveEvent event = new ArenaRemoveEvent(source, arena);
Bukkit.getPluginManager().callEvent(event);
gui.calculatePages();
return true;
}
return false;
}
public List<ArenaImpl> getArenasImpl() {
return arenas;
}
public Set<Player> getPlayers() {
return arenas.stream().flatMap(arena -> arena.getPlayers().stream()).collect(Collectors.toSet());
}
public long getPlayersInMatch(final Queue queue) {
return arenas.stream().filter(arena -> arena.isUsed() && arena.getMatch().isFromQueue() && arena.getMatch().getSource().equals(queue)).count() * 2;
}
public boolean isSelectable(@Nullable final KitImpl kit, @NotNull final ArenaImpl arena) {
if (!arena.isAvailable()) {
return false;
}
if (arena.isBoundless()) {
if (kit == null) {
return true;
} else {
return !kit.isArenaSpecific();
}
}
return arena.isBound(kit);
}
public ArenaImpl randomArena(final KitImpl kit) {
final List<ArenaImpl> available = arenas.stream().filter(arena -> isSelectable(kit, arena)).collect(Collectors.toList());
return !available.isEmpty() ? available.get(ThreadLocalRandom.current().nextInt(available.size())) : null;
}
public List<String> getNames() {
return arenas.stream().map(ArenaImpl::getName).collect(Collectors.toList());
}
// Called on kit removal
public void clearBinds(final KitImpl kit) {
arenas.stream().filter(arena -> arena.isBound(kit)).forEach(arena -> arena.bind(kit));
}
private class ArenaListener implements Listener {
@EventHandler(ignoreCancelled = true)
public void on(final PlayerInteractEvent event) {
if (!event.hasBlock() || !config.isPreventInteract()) {
return;
}
final ArenaImpl arena = get(event.getPlayer());
if (arena == null || !arena.isCounting()) {
return;
}
event.setCancelled(true);
}
@EventHandler(ignoreCancelled = true)
public void on(final EntityDamageEvent event) {
if (!config.isPreventPvp() || !(event.getEntity() instanceof Player)) {
return;
}
final ArenaImpl arena = get((Player) event.getEntity());
if (arena == null || !arena.isCounting()) {
return;
}
event.setCancelled(true);
}
@EventHandler(ignoreCancelled = true)
public void on(final ProjectileLaunchEvent event) {
if (!config.isPreventLaunchProjectile()) {
return;
}
final ProjectileSource shooter = event.getEntity().getShooter();
if (!(shooter instanceof Player)) {
return;
}
final ArenaImpl arena = get((Player) shooter);
if (arena == null || !arena.isCounting()) {
return;
}
event.setCancelled(true);
}
@EventHandler(ignoreCancelled = true)
public void on(final PlayerMoveEvent event) {
if (!config.isPreventMovement()) {
return;
}
final Location from = event.getFrom();
final Location to = event.getTo();
if (from.getBlockX() == to.getBlockX() && from.getBlockY() == to.getBlockY() && from.getBlockZ() == to.getBlockZ()) {
return;
}
final ArenaImpl arena = get(event.getPlayer());
if (arena == null || !arena.isCounting()) {
return;
}
event.setTo(event.getFrom());
}
}
}
================================================
FILE: duels-plugin/src/main/java/me/realized/duels/arena/Countdown.java
================================================
package me.realized.duels.arena;
import com.google.common.collect.Lists;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import me.realized.duels.DuelsPlugin;
import me.realized.duels.config.Config;
import me.realized.duels.util.StringUtil;
import me.realized.duels.util.compat.Titles;
import me.realized.duels.util.function.Pair;
import org.bukkit.scheduler.BukkitRunnable;
class Countdown extends BukkitRunnable {
private final Config config;
private final ArenaImpl arena;
private final String kit;
private final Map<UUID, Pair<String, Integer>> info;
private final List<String> messages;
private final List<String> titles;
private boolean finished;
Countdown(final DuelsPlugin plugin, final ArenaImpl arena, final String kit, final Map<UUID, Pair<String, Integer>> info, final List<String> messages, final List<String> titles) {
this.config = plugin.getConfiguration();
this.arena = arena;
this.kit = kit;
this.info = info;
this.messages = Lists.newArrayList(messages);
this.titles = Lists.newArrayList(titles);
}
@Override
public void run() {
if (finished) {
return;
}
final String rawMessage = messages.remove(0);
final String message = StringUtil.color(rawMessage);
final String title = !titles.isEmpty() ? titles.remove(0) : null;
arena.getPlayers().forEach(player -> {
config.playSound(player, rawMessage);
final Pair<String, Integer> info = this.info.get(player.getUniqueId());
if (info != null) {
player.sendMessage(message
.replace("%opponent%", info.getKey())
.replace("%opponent_rating%", String.valueOf(info.getValue()))
.replace("%kit%", kit)
.replace("%arena%", arena.getName())
);
} else {
player.sendMessage(message);
}
if (title != null) {
Titles.send(player, title, null, 0, 20, 50);
}
});
if (!arena.isUsed() || messages.isEmpty()) {
arena.setCountdown(null);
cancel();
finished = true;
}
}
}
================================================
FILE: duels-plugin/src/main/java/me/realized/duels/arena/MatchImpl.java
================================================
package me.realized.duels.arena;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
import java.util.Set;
import java.util.UUID;
import java.util.stream.Collectors;
import lombok.Getter;
import me.realized.duels.api.match.Match;
import me.realized.duels.kit.KitImpl;
import me.realized.duels.queue.Queue;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.NotNull;
public class MatchImpl implements Match {
@Getter
private final ArenaImpl arena;
@Getter
private final long start;
@Getter
private final KitImpl kit;
private final Map<UUID, List<ItemStack>> items;
@Getter
private final int bet;
@Getter
private final Queue source;
@Getter
private boolean finished;
// Default value for players is false, which is set to true if player is killed in the match.
private final Map<Player, Boolean> players = new HashMap<>();
MatchImpl(final ArenaImpl arena, final KitImpl kit, final Map<UUID, List<ItemStack>> items, final int bet, final Queue source) {
this.arena = arena;
this.start = System.currentTimeMillis();
this.kit = kit;
this.items = items;
this.bet = bet;
this.source = source;
}
Map<Player, Boolean> getPlayerMap() {
return players;
}
Set<Player> getAlivePlayers() {
return players.entrySet().stream().filter(entry -> !entry.getValue()).map(Entry::getKey).collect(Collectors.toSet());
}
public Set<Player> getAllPlayers() {
return players.keySet();
}
public boolean isDead(final Player player) {
return players.getOrDefault(player, true);
}
public boolean isFromQueue() {
return source != null;
}
public boolean isOwnInventory() {
return kit == null;
}
public List<ItemStack> getItems() {
return items != null ? items.values().stream().flatMap(Collection::stream).collect(Collectors.toList()) : Collections.emptyList();
}
void setFinished() {
finished = true;
}
public long getDurationInMillis() {
return System.currentTimeMillis() - start;
}
@NotNull
@Override
public List<ItemStack> getItems(@NotNull final Player player) {
Objects.requireNonNull(player, "player");
if (this.items == null) {
return Collections.emptyList();
}
final List<ItemStack> items = this.items.get(player.getUniqueId());
return items != null ? items : Collections.emptyList();
}
@NotNull
@Override
public Set<Player> getPlayers() {
return Collections.unmodifiableSet(getAlivePlayers());
}
@NotNull
@Override
public Set<Player> getStartingPlayers() {
return Collections.unmodifiableSet(getAllPlayers());
}
}
================================================
FILE: duels-plugin/src/main/java/me/realized/duels/betting/BettingManager.java
================================================
package me.realized.duels.betting;
import me.realized.duels.DuelsPlugin;
import me.realized.duels.gui.betting.BettingGui;
import me.realized.duels.hook.hooks.VaultHook;
import me.realized.duels.setting.Settings;
import me.realized.duels.util.Loadable;
import me.realized.duels.util.Log;
import me.realized.duels.util.gui.GuiListener;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
public class BettingManager implements Loadable, Listener {
private final DuelsPlugin plugin;
private final GuiListener<DuelsPlugin> guiListener;
public BettingManager(final DuelsPlugin plugin) {
this.plugin = plugin;
this.guiListener = plugin.getGuiListener();
}
@Override
public void handleLoad() {
final VaultHook vaultHook = plugin.getHookManager().getHook(VaultHook.class);
if (vaultHook == null) {
Log.info(this, "Vault was not found! Money betting feature will be automatically disabled.");
} else if (vaultHook.getEconomy() == null) {
Log.info(this, "Economy plugin supporting Vault was not found! Money betting feature will be automatically disabled.");
}
}
@Override
public void handleUnload() {}
public void open(final Settings settings, final Player first, final Player second) {
final BettingGui gui = new BettingGui(plugin, settings, first, second);
guiListener.addGui(first, gui).open(first);
guiListener.addGui(second, gui).open(second);
}
}
================================================
FILE: duels-plugin/src/main/java/me/realized/duels/command/BaseCommand.java
================================================
package me.realized.duels.command;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
import me.realized.duels.DuelsPlugin;
import me.realized.duels.arena.ArenaManagerImpl;
import me.realized.duels.betting.BettingManager;
import me.realized.duels.config.Config;
import me.realized.duels.config.Lang;
import me.realized.duels.data.UserManagerImpl;
import me.realized.duels.duel.DuelManager;
import me.realized.duels.hook.HookManager;
import me.realized.duels.inventories.InventoryManager;
import me.realized.duels.kit.KitManagerImpl;
import me.realized.duels.player.PlayerInfoManager;
import me.realized.duels.queue.QueueManager;
import me.realized.duels.queue.sign.QueueSignManagerImpl;
import me.realized.duels.request.RequestManager;
import me.realized.duels.setting.SettingsManager;
import me.realized.duels.spectate.SpectateManagerImpl;
import me.realized.duels.util.command.AbstractCommand;
import org.bukkit.command.CommandSender;
public abstract class BaseCommand extends AbstractCommand<DuelsPlugin> {
protected final DuelsPlugin plugin;
protected final Config config;
protected final Lang lang;
protected final UserManagerImpl userManager;
protected final KitManagerImpl kitManager;
protected final ArenaManagerImpl arenaManager;
protected final QueueManager queueManager;
protected final QueueSignManagerImpl queueSignManager;
protected final SettingsManager settingManager;
protected final PlayerInfoManager playerManager;
protected final SpectateManagerImpl spectateManager;
protected final BettingManager bettingManager;
protected final InventoryManager inventoryManager;
protected final DuelManager duelManager;
protected final RequestManager requestManager;
protected final HookManager hookManager;
/**
* Constructor for a sub command
*/
protected BaseCommand(final DuelsPlugin plugin, final String name, final String usage, final String description, final String permission, final int length,
final boolean playerOnly, final String... aliases) {
super(plugin, name, usage, description, permission, length, playerOnly, aliases);
this.plugin = plugin;
this.config = plugin.getConfiguration();
this.lang = plugin.getLang();
this.userManager = plugin.getUserManager();
this.kitManager = plugin.getKitManager();
this.arenaManager = plugin.getArenaManager();
this.queueManager = plugin.getQueueManager();
this.queueSignManager = plugin.getQueueSignManager();
this.settingManager = plugin.getSettingManager();
this.playerManager = plugin.getPlayerManager();
this.spectateManager = plugin.getSpectateManager();
this.bettingManager = plugin.getBettingManager();
this.inventoryManager = plugin.getInventoryManager();
this.duelManager = plugin.getDuelManager();
this.requestManager = plugin.getRequestManager();
this.hookManager = plugin.getHookManager();
}
/**
* Constructor for a sub command, inherits parent permission
*/
protected BaseCommand(final DuelsPlugin plugin, final String name, final String usage, final String description, final int length, final boolean playerOnly,
final String... aliases) {
this(plugin, name, usage, description, null, length, playerOnly, aliases);
}
/**
* Constructor for a parent command
*/
protected BaseCommand(final DuelsPlugin plugin, final String name, final String permission, final boolean playerOnly) {
this(plugin, name, null, null, permission, -1, playerOnly);
}
@Override
protected void handleMessage(final CommandSender sender, final MessageType type, final String... args) {
switch (type) {
case PLAYER_ONLY:
super.handleMessage(sender, type, args);
break;
case NO_PERMISSION:
lang.sendMessage(sender, "ERROR.no-permission", "permission", args[0]);
break;
case SUB_COMMAND_INVALID:
lang.sendMessage(sender, "ERROR.command.invalid-sub-command", "command", args[0], "argument", args[1]);
break;
case SUB_COMMAND_USAGE:
lang.sendMessage(sender, "COMMAND.sub-command-usage", "command", args[0], "usage", args[1], "description", args[2]);
break;
}
}
protected List<String> handleTabCompletion(final String argument, final Collection<String> collection) {
return collection.stream()
.filter(value -> value.toLowerCase().startsWith(argument.toLowerCase()))
.map(value -> value.replace(" ", "-"))
.collect(Collectors.toList());
}
}
================================================
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/SpectateCommand.java
================================================
package me.realized.duels.command.commands;
import me.realized.duels.DuelsPlugin;
import me.realized.duels.Permissions;
import me.realized.duels.api.spectate.SpectateManager.Result;
import me.realized.duels.arena.ArenaImpl;
import me.realized.duels.arena.MatchImpl;
import me.realized.duels.command.BaseCommand;
import me.realized.duels.spectate.SpectatorImpl;
import me.realized.duels.util.inventory.InventoryUtil;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class SpectateCommand extends BaseCommand {
public SpectateCommand(final DuelsPlugin plugin) {
super(plugin, "spectate", Permissions.SPECTATE, true);
}
@Override
protected void execute(final CommandSender sender, final String label, final String[] args) {
final Player player = (Player) sender;
final SpectatorImpl spectator = spectateManager.get(player);
// If player is already spectating, using /spectate will put them out of spectator mode.
if (spectator != null) {
spectateManager.stopSpectating(player);
lang.sendMessage(player, "COMMAND.spectate.stop-spectate", "name", spectator.getTargetName());
return;
}
if (args.length == 0) {
lang.sendMessage(sender, "COMMAND.spectate.usage", "command", label);
return;
}
if (config.isSpecRequiresClearedInventory() && InventoryUtil.hasItem(player)) {
lang.sendMessage(sender, "ERROR.duel.inventory-not-empty");
return;
}
final Player target = Bukkit.getPlayerExact(args[0]);
if (target == null) {
lang.sendMessage(sender, "ERROR.player.not-found", "name", args[0]);
return;
}
final Result result = spectateManager.startSpectating(player, target);
switch (result) {
case EVENT_CANCELLED:
return;
case IN_MATCH:
lang.sendMessage(player, "ERROR.spectate.already-spectating.sender");
return;
case IN_QUEUE:
lang.sendMessage(player, "ERROR.duel.already-in-queue");
return;
case ALREADY_SPECTATING:
lang.sendMessage(player, "ERROR.duel.already-in-match.sender");
return;
case TARGET_NOT_IN_MATCH:
lang.sendMessage(player, "ERROR.spectate.not-in-match", "name", target.getName());
return;
case SUCCESS:
final ArenaImpl arena = arenaManager.get(target);
// Meaningless checks to halt IDE warnings as target is guaranteed to be in a match if result is SUCCESS.
if (arena == null || arena.getMatch() == null) {
return;
}
final MatchImpl match = arena.getMatch();
final String kit = match.getKit() != null ? match.getKit().getName() : lang.getMessage("GENERAL.none");
lang.sendMessage(player, "COMMAND.spectate.start-spectate",
"name", target.getName(),
"opponent", arena.getOpponent(target).getName(),
"kit", kit,
"arena", arena.getName(),
"bet_amount", match.getBet()
);
}
}
}
================================================
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duel/DuelCommand.java
================================================
package me.realized.duels.command.commands.duel;
import java.util.List;
import me.realized.duels.DuelsPlugin;
import me.realized.duels.Permissions;
import me.realized.duels.command.BaseCommand;
import me.realized.duels.command.commands.duel.subcommands.AcceptCommand;
import me.realized.duels.command.commands.duel.subcommands.DenyCommand;
import me.realized.duels.command.commands.duel.subcommands.InventoryCommand;
import me.realized.duels.command.commands.duel.subcommands.StatsCommand;
import me.realized.duels.command.commands.duel.subcommands.ToggleCommand;
import me.realized.duels.command.commands.duel.subcommands.TopCommand;
import me.realized.duels.command.commands.duel.subcommands.VersionCommand;
import me.realized.duels.data.UserData;
import me.realized.duels.hook.hooks.CombatLogXHook;
import me.realized.duels.hook.hooks.CombatTagPlusHook;
import me.realized.duels.hook.hooks.PvPManagerHook;
import me.realized.duels.hook.hooks.VaultHook;
import me.realized.duels.hook.hooks.worldguard.WorldGuardHook;
import me.realized.duels.kit.KitImpl;
import me.realized.duels.setting.Settings;
import me.realized.duels.util.NumberUtil;
import me.realized.duels.util.StringUtil;
import me.realized.duels.util.inventory.InventoryUtil;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class DuelCommand extends BaseCommand {
private final CombatTagPlusHook combatTagPlus;
private final PvPManagerHook pvpManager;
private final CombatLogXHook combatLogX;
private final WorldGuardHook worldGuard;
private final VaultHook vault;
public DuelCommand(final DuelsPlugin plugin) {
super(plugin, "duel", Permissions.DUEL, true);
child(
new AcceptCommand(plugin),
new DenyCommand(plugin),
new StatsCommand(plugin),
new ToggleCommand(plugin),
new TopCommand(plugin),
new InventoryCommand(plugin),
new VersionCommand(plugin)
);
this.combatTagPlus = hookManager.getHook(CombatTagPlusHook.class);
this.pvpManager = hookManager.getHook(PvPManagerHook.class);
this.combatLogX = hookManager.getHook(CombatLogXHook.class);
this.worldGuard = hookManager.getHook(WorldGuardHook.class);
this.vault = hookManager.getHook(VaultHook.class);
}
@Override
protected boolean executeFirst(final CommandSender sender, final String label, final String[] args) {
final Player player = (Player) sender;
if (userManager.get(player) == null) {
lang.sendMessage(sender, "ERROR.data.load-failure");
return true;
}
if (args.length == 0) {
lang.sendMessage(sender, "COMMAND.duel.usage", "command", label);
return true;
}
if (isChild(args[0])) {
return false;
}
if (config.isRequiresClearedInventory() && InventoryUtil.hasItem(player)) {
lang.sendMessage(sender, "ERROR.duel.inventory-not-empty");
return true;
}
if (config.isPreventCreativeMode() && player.getGameMode() == GameMode.CREATIVE) {
lang.sendMessage(sender, "ERROR.duel.in-creative-mode");
return true;
}
if (config.getBlacklistedWorlds().contains(player.getWorld().getName())) {
lang.sendMessage(sender, "ERROR.duel.in-blacklisted-world");
return true;
}
if ((combatTagPlus != null && combatTagPlus.isTagged(player))
|| (pvpManager != null && pvpManager.isTagged(player))
|| (combatLogX != null && combatLogX.isTagged(player))) {
lang.sendMessage(sender, "ERROR.duel.is-tagged");
return true;
}
String duelzone = null;
if (worldGuard != null && config.isDuelzoneEnabled() && (duelzone = worldGuard.findDuelZone(player)) == null) {
lang.sendMessage(sender, "ERROR.duel.not-in-duelzone", "regions", config.getDuelzones());
return true;
}
if (arenaManager.isInMatch(player)) {
lang.sendMessage(sender, "ERROR.duel.already-in-match.sender");
return true;
}
if (spectateManager.isSpectating(player)) {
lang.sendMessage(sender, "ERROR.spectate.already-spectating.sender");
return true;
}
final Player target = Bukkit.getPlayerExact(args[0]);
if (target == null || !player.canSee(target)) {
lang.sendMessage(sender, "ERROR.player.not-found", "name", args[0]);
return true;
}
if (player.equals(target)) {
lang.sendMessage(sender, "ERROR.duel.is-self");
return true;
}
final UserData user = userManager.get(target);
if (user == null) {
lang.sendMessage(sender, "ERROR.data.not-found", "name", target.getName());
return true;
}
if (!sender.hasPermission(Permissions.ADMIN) && !user.canRequest()) {
lang.sendMessage(sender, "ERROR.duel.requests-disabled", "name", target.getName());
return true;
}
if (requestManager.has(player, target)) {
lang.sendMessage(sender, "ERROR.duel.already-has-request", "name", target.getName());
return true;
}
if (arenaManager.isInMatch(target)) {
lang.sendMessage(sender, "ERROR.duel.already-in-match.target", "name", target.getName());
return true;
}
if (spectateManager.isSpectating(target)) {
lang.sendMessage(sender, "ERROR.spectate.already-spectating.target", "name", target.getName());
return true;
}
final Settings settings = settingManager.getSafely(player);
// Reset bet to prevent accidents
settings.setBet(0);
settings.setTarget(target);
settings.setBaseLoc(player);
settings.setDuelzone(player, duelzone);
boolean sendRequest = false;
if (args.length > 1) {
final int amount = NumberUtil.parseInt(args[1]).orElse(0);
if (amount > 0 && config.isMoneyBettingEnabled()) {
if (config.isMoneyBettingUsePermission() && !player.hasPermission(Permissions.MONEY_BETTING) && !player.hasPermission(Permissions.SETTING_ALL)) {
lang.sendMessage(player, "ERROR.no-permission", "permission", Permissions.MONEY_BETTING);
return true;
}
if (vault == null || vault.getEconomy() == null) {
lang.sendMessage(sender, "ERROR.setting.disabled-option", "option", lang.getMessage("GENERAL.betting"));
return true;
}
if (!vault.getEconomy().has(player, amount)) {
lang.sendMessage(sender, "ERROR.command.not-enough-money");
return true;
}
settings.setBet(amount);
}
if (args.length > 2) {
if (args[2].equalsIgnoreCase("true")) {
if (!config.isItemBettingEnabled()) {
lang.sendMessage(player, "ERROR.setting.disabled-option", "option", lang.getMessage("GENERAL.item-betting"));
return true;
}
if (config.isItemBettingUsePermission() && !player.hasPermission(Permissions.ITEM_BETTING) && !player.hasPermission(Permissions.SETTING_ALL)) {
lang.sendMessage(player, "ERROR.no-permission", "permission", Permissions.ITEM_BETTING);
return true;
}
settings.setItemBetting(true);
}
if (args.length > 3) {
if (args[3].equals("-")) {
if (!config.isOwnInventoryEnabled()) {
lang.sendMessage(player, "ERROR.setting.disabled-option", "option", lang.getMessage("GENERAL.own-inventory"));
return true;
}
if (config.isOwnInventoryUsePermission() && !player.hasPermission(Permissions.OWN_INVENTORY) && !player.hasPermission(Permissions.SETTING_ALL)) {
lang.sendMessage(player, "ERROR.no-permission", "permission", Permissions.OWN_INVENTORY);
return true;
}
settings.setOwnInventory(true);
} else if (!config.isKitSelectingEnabled()) {
lang.sendMessage(player, "ERROR.setting.disabled-option", "option", lang.getMessage("GENERAL.kit-selector"));
return true;
} else {
final String name = StringUtil.join(args, " ", 3, args.length);
final KitImpl kit = kitManager.get(name);
if (kit == null) {
lang.sendMessage(sender, "ERROR.kit.not-found", "name", name);
return true;
}
final String permission = String.format(Permissions.KIT, name.replace(" ", "-").toLowerCase());
if (kit.isUsePermission() && !player.hasPermission(Permissions.KIT_ALL) && !player.hasPermission(permission)) {
lang.sendMessage(player, "ERROR.no-permission", "permission", permission);
return true;
}
settings.setKit(kit);
}
sendRequest = true;
}
}
}
if (sendRequest) {
// If all settings were selected via command, send request without opening settings GUI.
requestManager.send(player, target, settings);
} else if (config.isOwnInventoryEnabled()) {
// If own inventory is enabled, prompt request settings GUI.
settings.openGui(player);
} else {
// Maintain old behavior: If own inventory is disabled, prompt kit selector first instead of request settings GUI.
kitManager.getGui().open(player);
}
return true;
}
@Override
protected void execute(final CommandSender sender, final String label, final String[] args) {}
// Disables default TabCompleter
@Override
public List<String> onTabComplete(final CommandSender sender, final Command command, final String alias, final String[] args) {
return null;
}
}
================================================
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duel/subcommands/AcceptCommand.java
================================================
package me.realized.duels.command.commands.duel.subcommands;
import me.realized.duels.DuelsPlugin;
import me.realized.duels.api.event.request.RequestAcceptEvent;
import me.realized.duels.command.BaseCommand;
import me.realized.duels.hook.hooks.CombatLogXHook;
import me.realized.duels.hook.hooks.CombatTagPlusHook;
import me.realized.duels.hook.hooks.PvPManagerHook;
import me.realized.duels.hook.hooks.worldguard.WorldGuardHook;
import me.realized.duels.request.RequestImpl;
import me.realized.duels.setting.Settings;
import me.realized.duels.util.inventory.InventoryUtil;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class AcceptCommand extends BaseCommand {
private final CombatTagPlusHook combatTagPlus;
private final PvPManagerHook pvpManager;
private final CombatLogXHook combatLogX;
private final WorldGuardHook worldGuard;
public AcceptCommand(final DuelsPlugin plugin) {
super(plugin, "accept", "accept [player]", "Accepts a duel request.", 2, true);
this.combatTagPlus = hookManager.getHook(CombatTagPlusHook.class);
this.pvpManager = hookManager.getHook(PvPManagerHook.class);
this.combatLogX = plugin.getHookManager().getHook(CombatLogXHook.class);
this.worldGuard = hookManager.getHook(WorldGuardHook.class);
}
@Override
protected void execute(final CommandSender sender, final String label, final String[] args) {
final Player player = (Player) sender;
if (config.isRequiresClearedInventory() && InventoryUtil.hasItem(player)) {
lang.sendMessage(sender, "ERROR.duel.inventory-not-empty");
return;
}
if (config.isPreventCreativeMode() && player.getGameMode() == GameMode.CREATIVE) {
lang.sendMessage(sender, "ERROR.duel.in-creative-mode");
return;
}
if ((combatTagPlus != null && combatTagPlus.isTagged(player))
|| (pvpManager != null && pvpManager.isTagged(player))
|| (combatLogX != null && combatLogX.isTagged(player))) {
lang.sendMessage(sender, "ERROR.duel.is-tagged");
return;
}
String duelzone = null;
if (worldGuard != null && config.isDuelzoneEnabled() && (duelzone = worldGuard.findDuelZone(player)) == null) {
lang.sendMessage(sender, "ERROR.duel.not-in-duelzone", "regions", config.getDuelzones());
return;
}
if (arenaManager.isInMatch(player)) {
lang.sendMessage(sender, "ERROR.duel.already-in-match.sender");
return;
}
if (spectateManager.isSpectating(player)) {
lang.sendMessage(sender, "ERROR.spectate.already-spectating.sender");
return;
}
final Player target = Bukkit.getPlayerExact(args[1]);
if (target == null || !player.canSee(target)) {
lang.sendMessage(sender, "ERROR.player.not-found", "name", args[1]);
return;
}
final RequestImpl request = requestManager.get(target, player);
if (request == null) {
lang.sendMessage(sender, "ERROR.duel.no-request", "name", target.getName());
return;
}
final RequestAcceptEvent event = new RequestAcceptEvent(player, target, request);
Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled()) {
return;
}
requestManager.remove(target, player);
gitextract_mv1mshjz/ ├── .gitignore ├── LICENSE.md ├── README.md ├── build.gradle ├── duels-api/ │ ├── build.gradle │ └── src/ │ └── main/ │ └── java/ │ └── me/ │ └── realized/ │ └── duels/ │ └── api/ │ ├── Duels.java │ ├── arena/ │ │ ├── Arena.java │ │ └── ArenaManager.java │ ├── command/ │ │ └── SubCommand.java │ ├── event/ │ │ ├── SourcedEvent.java │ │ ├── arena/ │ │ │ ├── ArenaCreateEvent.java │ │ │ ├── ArenaEvent.java │ │ │ ├── ArenaRemoveEvent.java │ │ │ ├── ArenaSetPositionEvent.java │ │ │ └── ArenaStateChangeEvent.java │ │ ├── kit/ │ │ │ ├── KitCreateEvent.java │ │ │ ├── KitEquipEvent.java │ │ │ ├── KitEvent.java │ │ │ └── KitRemoveEvent.java │ │ ├── match/ │ │ │ ├── MatchEndEvent.java │ │ │ ├── MatchEvent.java │ │ │ └── MatchStartEvent.java │ │ ├── queue/ │ │ │ ├── QueueCreateEvent.java │ │ │ ├── QueueEvent.java │ │ │ ├── QueueJoinEvent.java │ │ │ ├── QueueLeaveEvent.java │ │ │ ├── QueueRemoveEvent.java │ │ │ └── sign/ │ │ │ ├── QueueSignCreateEvent.java │ │ │ ├── QueueSignEvent.java │ │ │ └── QueueSignRemoveEvent.java │ │ ├── request/ │ │ │ ├── RequestAcceptEvent.java │ │ │ ├── RequestDenyEvent.java │ │ │ ├── RequestEvent.java │ │ │ └── RequestSendEvent.java │ │ ├── spectate/ │ │ │ ├── SpectateEndEvent.java │ │ │ ├── SpectateEvent.java │ │ │ └── SpectateStartEvent.java │ │ └── user/ │ │ └── UserCreateEvent.java │ ├── extension/ │ │ └── DuelsExtension.java │ ├── kit/ │ │ ├── Kit.java │ │ └── KitManager.java │ ├── match/ │ │ └── Match.java │ ├── queue/ │ │ ├── DQueue.java │ │ ├── DQueueManager.java │ │ └── sign/ │ │ ├── QueueSign.java │ │ └── QueueSignManager.java │ ├── request/ │ │ └── Request.java │ ├── spectate/ │ │ ├── SpectateManager.java │ │ └── Spectator.java │ └── user/ │ ├── MatchInfo.java │ ├── User.java │ └── UserManager.java ├── duels-plugin/ │ ├── build.gradle │ └── src/ │ └── main/ │ ├── java/ │ │ └── me/ │ │ └── realized/ │ │ └── duels/ │ │ ├── DuelsPlugin.java │ │ ├── Permissions.java │ │ ├── api/ │ │ │ └── DuelsAPI.java │ │ ├── arena/ │ │ │ ├── ArenaImpl.java │ │ │ ├── ArenaManagerImpl.java │ │ │ ├── Countdown.java │ │ │ └── MatchImpl.java │ │ ├── betting/ │ │ │ └── BettingManager.java │ │ ├── command/ │ │ │ ├── BaseCommand.java │ │ │ └── commands/ │ │ │ ├── SpectateCommand.java │ │ │ ├── duel/ │ │ │ │ ├── DuelCommand.java │ │ │ │ └── subcommands/ │ │ │ │ ├── AcceptCommand.java │ │ │ │ ├── DenyCommand.java │ │ │ │ ├── InventoryCommand.java │ │ │ │ ├── StatsCommand.java │ │ │ │ ├── ToggleCommand.java │ │ │ │ ├── TopCommand.java │ │ │ │ └── VersionCommand.java │ │ │ ├── duels/ │ │ │ │ ├── DuelsCommand.java │ │ │ │ └── subcommands/ │ │ │ │ ├── AddsignCommand.java │ │ │ │ ├── BindCommand.java │ │ │ │ ├── CreateCommand.java │ │ │ │ ├── CreatequeueCommand.java │ │ │ │ ├── DeleteCommand.java │ │ │ │ ├── DeletekitCommand.java │ │ │ │ ├── DeletequeueCommand.java │ │ │ │ ├── DeletesignCommand.java │ │ │ │ ├── EditCommand.java │ │ │ │ ├── HelpCommand.java │ │ │ │ ├── InfoCommand.java │ │ │ │ ├── ListCommand.java │ │ │ │ ├── LoadkitCommand.java │ │ │ │ ├── LobbyCommand.java │ │ │ │ ├── OptionsCommand.java │ │ │ │ ├── PlaysoundCommand.java │ │ │ │ ├── ReloadCommand.java │ │ │ │ ├── ResetCommand.java │ │ │ │ ├── ResetratingCommand.java │ │ │ │ ├── SavekitCommand.java │ │ │ │ ├── SetCommand.java │ │ │ │ ├── SetitemCommand.java │ │ │ │ ├── SetlobbyCommand.java │ │ │ │ ├── SetratingCommand.java │ │ │ │ ├── TeleportCommand.java │ │ │ │ └── ToggleCommand.java │ │ │ └── queue/ │ │ │ ├── QueueCommand.java │ │ │ └── subcommands/ │ │ │ ├── JoinCommand.java │ │ │ └── LeaveCommand.java │ │ ├── config/ │ │ │ ├── Config.java │ │ │ ├── Lang.java │ │ │ └── converters/ │ │ │ └── ConfigConverter9_10.java │ │ ├── data/ │ │ │ ├── ArenaData.java │ │ │ ├── ItemData.java │ │ │ ├── KitData.java │ │ │ ├── LocationData.java │ │ │ ├── MatchData.java │ │ │ ├── PlayerData.java │ │ │ ├── PotionEffectData.java │ │ │ ├── QueueData.java │ │ │ ├── QueueSignData.java │ │ │ ├── UserData.java │ │ │ └── UserManagerImpl.java │ │ ├── duel/ │ │ │ └── DuelManager.java │ │ ├── extension/ │ │ │ ├── ExtensionClassLoader.java │ │ │ ├── ExtensionInfo.java │ │ │ └── ExtensionManager.java │ │ ├── gui/ │ │ │ ├── BaseButton.java │ │ │ ├── betting/ │ │ │ │ ├── BettingGui.java │ │ │ │ └── buttons/ │ │ │ │ ├── CancelButton.java │ │ │ │ ├── DetailsButton.java │ │ │ │ ├── HeadButton.java │ │ │ │ └── StateButton.java │ │ │ ├── bind/ │ │ │ │ ├── BindGui.java │ │ │ │ └── buttons/ │ │ │ │ └── BindButton.java │ │ │ ├── inventory/ │ │ │ │ ├── InventoryGui.java │ │ │ │ └── buttons/ │ │ │ │ ├── EffectsButton.java │ │ │ │ ├── HeadButton.java │ │ │ │ ├── HealthButton.java │ │ │ │ ├── HungerButton.java │ │ │ │ └── PotionCounterButton.java │ │ │ ├── options/ │ │ │ │ ├── OptionsGui.java │ │ │ │ └── buttons/ │ │ │ │ └── OptionButton.java │ │ │ └── settings/ │ │ │ ├── SettingsGui.java │ │ │ └── buttons/ │ │ │ ├── ArenaSelectButton.java │ │ │ ├── CancelButton.java │ │ │ ├── ItemBettingButton.java │ │ │ ├── KitSelectButton.java │ │ │ ├── OwnInventoryButton.java │ │ │ ├── RequestDetailsButton.java │ │ │ └── RequestSendButton.java │ │ ├── hook/ │ │ │ ├── HookManager.java │ │ │ └── hooks/ │ │ │ ├── BountyHuntersHook.java │ │ │ ├── CombatLogXHook.java │ │ │ ├── CombatTagPlusHook.java │ │ │ ├── EssentialsHook.java │ │ │ ├── FactionsHook.java │ │ │ ├── LeaderHeadsHook.java │ │ │ ├── MVdWPlaceholderHook.java │ │ │ ├── McMMOHook.java │ │ │ ├── MyPetHook.java │ │ │ ├── PlaceholderHook.java │ │ │ ├── PvPManagerHook.java │ │ │ ├── SimpleClansHook.java │ │ │ ├── VaultHook.java │ │ │ └── worldguard/ │ │ │ └── WorldGuardHook.java │ │ ├── inventories/ │ │ │ └── InventoryManager.java │ │ ├── kit/ │ │ │ ├── KitImpl.java │ │ │ └── KitManagerImpl.java │ │ ├── listeners/ │ │ │ ├── DamageListener.java │ │ │ ├── EnderpearlListener.java │ │ │ ├── KitItemListener.java │ │ │ ├── KitOptionsListener.java │ │ │ ├── LingerPotionListener.java │ │ │ ├── PotionListener.java │ │ │ ├── ProjectileHitListener.java │ │ │ └── TeleportListener.java │ │ ├── logging/ │ │ │ └── LogManager.java │ │ ├── player/ │ │ │ ├── PlayerInfo.java │ │ │ └── PlayerInfoManager.java │ │ ├── queue/ │ │ │ ├── Queue.java │ │ │ ├── QueueEntry.java │ │ │ ├── QueueManager.java │ │ │ └── sign/ │ │ │ ├── QueueSignImpl.java │ │ │ └── QueueSignManagerImpl.java │ │ ├── request/ │ │ │ ├── RequestImpl.java │ │ │ └── RequestManager.java │ │ ├── setting/ │ │ │ ├── CachedInfo.java │ │ │ ├── Settings.java │ │ │ └── SettingsManager.java │ │ ├── shaded/ │ │ │ └── bstats/ │ │ │ └── Metrics.java │ │ ├── spectate/ │ │ │ ├── SpectateManagerImpl.java │ │ │ └── SpectatorImpl.java │ │ ├── teleport/ │ │ │ └── Teleport.java │ │ └── util/ │ │ ├── BlockUtil.java │ │ ├── DateUtil.java │ │ ├── EnumUtil.java │ │ ├── EventUtil.java │ │ ├── Loadable.java │ │ ├── Log.java │ │ ├── NumberUtil.java │ │ ├── PlayerUtil.java │ │ ├── Reloadable.java │ │ ├── StringUtil.java │ │ ├── TextBuilder.java │ │ ├── UUIDUtil.java │ │ ├── UpdateChecker.java │ │ ├── collection/ │ │ │ └── StreamUtil.java │ │ ├── command/ │ │ │ └── AbstractCommand.java │ │ ├── compat/ │ │ │ ├── CompatUtil.java │ │ │ ├── Identifiers.java │ │ │ ├── Inventories.java │ │ │ ├── Items.java │ │ │ ├── Panes.java │ │ │ ├── Skulls.java │ │ │ ├── Titles.java │ │ │ └── nbt/ │ │ │ └── NBT.java │ │ ├── config/ │ │ │ ├── AbstractConfiguration.java │ │ │ └── convert/ │ │ │ └── Converter.java │ │ ├── function/ │ │ │ ├── Pair.java │ │ │ └── TriFunction.java │ │ ├── gui/ │ │ │ ├── AbstractGui.java │ │ │ ├── Button.java │ │ │ ├── GuiListener.java │ │ │ ├── MultiPageGui.java │ │ │ └── SinglePageGui.java │ │ ├── hook/ │ │ │ ├── AbstractHookManager.java │ │ │ └── PluginHook.java │ │ ├── inventory/ │ │ │ ├── InventoryBuilder.java │ │ │ ├── InventoryUtil.java │ │ │ ├── ItemBuilder.java │ │ │ ├── ItemUtil.java │ │ │ └── Slots.java │ │ ├── io/ │ │ │ └── FileUtil.java │ │ ├── json/ │ │ │ ├── DefaultBasedDeserializer.java │ │ │ └── JsonUtil.java │ │ ├── metadata/ │ │ │ └── MetadataUtil.java │ │ ├── reflect/ │ │ │ └── ReflectionUtil.java │ │ └── yaml/ │ │ └── YamlUtil.java │ └── resources/ │ ├── config.yml │ ├── lang.yml │ └── plugin.yml ├── duels-worldguard/ │ ├── build.gradle │ └── src/ │ └── main/ │ └── java/ │ └── me/ │ └── realized/ │ └── duels/ │ └── hook/ │ └── hooks/ │ └── worldguard/ │ └── WorldGuardHandler.java ├── duels-worldguard-v6/ │ ├── build.gradle │ └── src/ │ └── main/ │ └── java/ │ └── me/ │ └── realized/ │ └── duels/ │ └── hook/ │ └── hooks/ │ └── worldguard/ │ └── WorldGuard6Handler.java ├── duels-worldguard-v7/ │ ├── build.gradle │ └── src/ │ └── main/ │ └── java/ │ └── me/ │ └── realized/ │ └── duels/ │ └── hook/ │ └── hooks/ │ └── worldguard/ │ └── WorldGuard7Handler.java ├── gradle/ │ └── wrapper/ │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── libs/ │ ├── BountyHunters-2.2.6.jar │ ├── CombatTagPlus.jar │ ├── Factions-1.6.9.5-U0.1.14.jar │ ├── Factions.jar │ ├── LeaderHeadsAPI.jar │ ├── MVdWPlaceholderAPI-3.1.1.jar │ ├── MassiveCore.jar │ ├── MyPet-2.3.4.jar │ ├── PvPManager-3.7.16.jar │ ├── SimpleClans-2.14.4.1.jar │ └── Vault-1.6.7.jar └── settings.gradle
SYMBOL INDEX (1478 symbols across 228 files)
FILE: duels-api/src/main/java/me/realized/duels/api/Duels.java
type Duels (line 16) | public interface Duels extends Plugin {
method getUserManager (line 23) | @NotNull
method getArenaManager (line 32) | @NotNull
method getKitManager (line 41) | @NotNull
method getSpectateManager (line 51) | @NotNull
method getQueueManager (line 60) | @NotNull
method getQueueSignManager (line 69) | @NotNull
method registerSubCommand (line 80) | boolean registerSubCommand(@NotNull final String command, @NotNull fin...
method registerListener (line 89) | void registerListener(@NotNull final Listener listener);
method reload (line 97) | boolean reload();
method doSync (line 107) | BukkitTask doSync(@NotNull final Runnable task);
method doSyncAfter (line 118) | BukkitTask doSyncAfter(@NotNull final Runnable task, long delay);
method doSyncRepeat (line 130) | BukkitTask doSyncRepeat(@NotNull final Runnable task, long delay, long...
method doAsync (line 140) | BukkitTask doAsync(@NotNull final Runnable task);
method doAsyncAfter (line 151) | BukkitTask doAsyncAfter(@NotNull final Runnable task, long delay);
method doAsyncRepeat (line 163) | BukkitTask doAsyncRepeat(@NotNull final Runnable task, long delay, lon...
method cancelTask (line 172) | void cancelTask(@NotNull final BukkitTask task);
method cancelTask (line 181) | void cancelTask(final int id);
method info (line 190) | void info(@NotNull final String message);
method warn (line 199) | void warn(@NotNull final String message);
method error (line 208) | void error(@NotNull final String message);
method error (line 218) | void error(@NotNull final String message, @NotNull Throwable thrown);
method getVersion (line 227) | String getVersion();
FILE: duels-api/src/main/java/me/realized/duels/api/arena/Arena.java
type Arena (line 16) | public interface Arena {
method getName (line 23) | @NotNull
method isDisabled (line 33) | boolean isDisabled();
method setDisabled (line 44) | boolean setDisabled(@Nullable final CommandSender source, final boolea...
method setDisabled (line 53) | boolean setDisabled(final boolean disabled);
method getPosition (line 62) | @Nullable
method setPosition (line 75) | boolean setPosition(@Nullable final Player source, final int pos, @Not...
method setPosition (line 84) | boolean setPosition(final int pos, @NotNull final Location location);
method isUsed (line 92) | boolean isUsed();
method getMatch (line 100) | @Nullable
method has (line 110) | boolean has(@NotNull final Player player);
method isRemoved (line 120) | boolean isRemoved();
FILE: duels-api/src/main/java/me/realized/duels/api/arena/ArenaManager.java
type ArenaManager (line 11) | public interface ArenaManager {
method get (line 19) | @Nullable
method get (line 29) | @Nullable
method isInMatch (line 39) | boolean isInMatch(@NotNull final Player player);
method getArenas (line 48) | @NotNull
FILE: duels-api/src/main/java/me/realized/duels/api/command/SubCommand.java
class SubCommand (line 14) | public abstract class SubCommand {
method SubCommand (line 32) | public SubCommand(@NotNull final String name, @Nullable final String u...
method getName (line 49) | public String getName() {
method getUsage (line 58) | public String getUsage() {
method getDescription (line 67) | public String getDescription() {
method getPermission (line 76) | public String getPermission() {
method isPlayerOnly (line 85) | public boolean isPlayerOnly() {
method getLength (line 94) | public int getLength() {
method getAliases (line 103) | public String[] getAliases() {
method execute (line 107) | public abstract void execute(final CommandSender sender, final String ...
FILE: duels-api/src/main/java/me/realized/duels/api/event/SourcedEvent.java
class SourcedEvent (line 10) | public abstract class SourcedEvent extends Event {
method SourcedEvent (line 14) | protected SourcedEvent(@Nullable final CommandSender source) {
method getSource (line 23) | @Nullable
method hasSource (line 34) | public boolean hasSource() {
FILE: duels-api/src/main/java/me/realized/duels/api/event/arena/ArenaCreateEvent.java
class ArenaCreateEvent (line 12) | public class ArenaCreateEvent extends ArenaEvent {
method ArenaCreateEvent (line 16) | public ArenaCreateEvent(@Nullable final CommandSender source, @NotNull...
method getHandlerList (line 20) | public static HandlerList getHandlerList() {
method getHandlers (line 24) | @Override
FILE: duels-api/src/main/java/me/realized/duels/api/event/arena/ArenaEvent.java
class ArenaEvent (line 13) | public abstract class ArenaEvent extends SourcedEvent {
method ArenaEvent (line 17) | ArenaEvent(@Nullable final CommandSender source, @NotNull final Arena ...
method getArena (line 28) | @NotNull
FILE: duels-api/src/main/java/me/realized/duels/api/event/arena/ArenaRemoveEvent.java
class ArenaRemoveEvent (line 14) | public class ArenaRemoveEvent extends ArenaEvent {
method ArenaRemoveEvent (line 18) | public ArenaRemoveEvent(@Nullable final CommandSender source, @NotNull...
method getHandlerList (line 22) | public static HandlerList getHandlerList() {
method getHandlers (line 26) | @Override
FILE: duels-api/src/main/java/me/realized/duels/api/event/arena/ArenaSetPositionEvent.java
class ArenaSetPositionEvent (line 18) | public class ArenaSetPositionEvent extends ArenaEvent implements Cancell...
method ArenaSetPositionEvent (line 26) | public ArenaSetPositionEvent(@Nullable final CommandSender source, @No...
method getPos (line 38) | public int getPos() {
method setPos (line 47) | public void setPos(final int pos) {
method getLocation (line 56) | public Location getLocation() {
method setLocation (line 65) | public void setLocation(final Location location) {
method isCancelled (line 69) | @Override
method setCancelled (line 74) | @Override
method getHandlerList (line 79) | public static HandlerList getHandlerList() {
method getHandlers (line 83) | @Override
FILE: duels-api/src/main/java/me/realized/duels/api/event/arena/ArenaStateChangeEvent.java
class ArenaStateChangeEvent (line 15) | public class ArenaStateChangeEvent extends ArenaEvent implements Cancell...
method ArenaStateChangeEvent (line 22) | public ArenaStateChangeEvent(@Nullable final CommandSender source, @No...
method isDisabled (line 32) | public boolean isDisabled() {
method setDisabled (line 41) | public void setDisabled(final boolean disabled) {
method isCancelled (line 45) | @Override
method setCancelled (line 50) | @Override
method getHandlerList (line 55) | public static HandlerList getHandlerList() {
method getHandlers (line 59) | @Override
FILE: duels-api/src/main/java/me/realized/duels/api/event/kit/KitCreateEvent.java
class KitCreateEvent (line 15) | public class KitCreateEvent extends KitEvent {
method KitCreateEvent (line 21) | public KitCreateEvent(@NotNull final Player source, @NotNull final Kit...
method getSource (line 27) | @NotNull
method getHandlerList (line 33) | public static HandlerList getHandlerList() {
method getHandlers (line 37) | @Override
FILE: duels-api/src/main/java/me/realized/duels/api/event/kit/KitEquipEvent.java
class KitEquipEvent (line 15) | public class KitEquipEvent extends KitEvent implements Cancellable {
method KitEquipEvent (line 22) | public KitEquipEvent(@NotNull final Player source, @NotNull final Kit ...
method getSource (line 33) | @NotNull
method isCancelled (line 39) | @Override
method setCancelled (line 44) | @Override
method getHandlerList (line 49) | public static HandlerList getHandlerList() {
method getHandlers (line 53) | @Override
FILE: duels-api/src/main/java/me/realized/duels/api/event/kit/KitEvent.java
class KitEvent (line 13) | public abstract class KitEvent extends SourcedEvent {
method KitEvent (line 17) | KitEvent(@Nullable final CommandSender source, @NotNull final Kit kit) {
method getKit (line 28) | @NotNull
FILE: duels-api/src/main/java/me/realized/duels/api/event/kit/KitRemoveEvent.java
class KitRemoveEvent (line 16) | public class KitRemoveEvent extends KitEvent {
method KitRemoveEvent (line 20) | public KitRemoveEvent(@Nullable final CommandSender source, @NotNull f...
method getHandlerList (line 24) | public static HandlerList getHandlerList() {
method getHandlers (line 28) | @Override
FILE: duels-api/src/main/java/me/realized/duels/api/event/match/MatchEndEvent.java
class MatchEndEvent (line 15) | public class MatchEndEvent extends MatchEvent {
method MatchEndEvent (line 22) | public MatchEndEvent(@NotNull final Match match, @Nullable final UUID ...
method getWinner (line 35) | @Nullable
method getLoser (line 45) | @Nullable
method getReason (line 55) | @NotNull
method getHandlerList (line 60) | public static HandlerList getHandlerList() {
method getHandlers (line 64) | @Override
type Reason (line 69) | public enum Reason {
FILE: duels-api/src/main/java/me/realized/duels/api/event/match/MatchEvent.java
class MatchEvent (line 11) | public abstract class MatchEvent extends Event {
method MatchEvent (line 15) | MatchEvent(@NotNull final Match match) {
method getMatch (line 25) | public Match getMatch() {
FILE: duels-api/src/main/java/me/realized/duels/api/event/match/MatchStartEvent.java
class MatchStartEvent (line 12) | public class MatchStartEvent extends MatchEvent {
method MatchStartEvent (line 18) | public MatchStartEvent(@NotNull final Match match, @NotNull final Play...
method getPlayers (line 29) | @NotNull
method getHandlerList (line 34) | public static HandlerList getHandlerList() {
method getHandlers (line 38) | @Override
FILE: duels-api/src/main/java/me/realized/duels/api/event/queue/QueueCreateEvent.java
class QueueCreateEvent (line 16) | public class QueueCreateEvent extends QueueEvent {
method QueueCreateEvent (line 20) | public QueueCreateEvent(@Nullable final CommandSender source, @NotNull...
method getHandlerList (line 24) | public static HandlerList getHandlerList() {
method getHandlers (line 28) | @Override
FILE: duels-api/src/main/java/me/realized/duels/api/event/queue/QueueEvent.java
class QueueEvent (line 15) | public abstract class QueueEvent extends SourcedEvent {
method QueueEvent (line 19) | QueueEvent(@Nullable final CommandSender source, @NotNull final DQueue...
method getQueue (line 30) | @NotNull
FILE: duels-api/src/main/java/me/realized/duels/api/event/queue/QueueJoinEvent.java
class QueueJoinEvent (line 17) | public class QueueJoinEvent extends QueueEvent implements Cancellable {
method QueueJoinEvent (line 24) | public QueueJoinEvent(@NotNull final Player source, @NotNull final DQu...
method getSource (line 35) | @NotNull
method isCancelled (line 41) | @Override
method setCancelled (line 46) | @Override
method getHandlerList (line 51) | public static HandlerList getHandlerList() {
method getHandlers (line 55) | @Override
FILE: duels-api/src/main/java/me/realized/duels/api/event/queue/QueueLeaveEvent.java
class QueueLeaveEvent (line 16) | public class QueueLeaveEvent extends QueueEvent {
method QueueLeaveEvent (line 22) | public QueueLeaveEvent(@NotNull final Player source, @NotNull final DQ...
method getSource (line 33) | @NotNull
method getHandlerList (line 39) | public static HandlerList getHandlerList() {
method getHandlers (line 43) | @Override
FILE: duels-api/src/main/java/me/realized/duels/api/event/queue/QueueRemoveEvent.java
class QueueRemoveEvent (line 18) | public class QueueRemoveEvent extends QueueEvent {
method QueueRemoveEvent (line 22) | public QueueRemoveEvent(@Nullable final CommandSender source, @NotNull...
method getHandlerList (line 26) | public static HandlerList getHandlerList() {
method getHandlers (line 30) | @Override
FILE: duels-api/src/main/java/me/realized/duels/api/event/queue/sign/QueueSignCreateEvent.java
class QueueSignCreateEvent (line 13) | public class QueueSignCreateEvent extends QueueSignEvent {
method QueueSignCreateEvent (line 17) | public QueueSignCreateEvent(@NotNull final Player source, @NotNull fin...
method getHandlerList (line 21) | public static HandlerList getHandlerList() {
method getHandlers (line 25) | @Override
FILE: duels-api/src/main/java/me/realized/duels/api/event/queue/sign/QueueSignEvent.java
class QueueSignEvent (line 14) | public abstract class QueueSignEvent extends SourcedEvent {
method QueueSignEvent (line 19) | QueueSignEvent(@NotNull final Player source, @NotNull final QueueSign ...
method getSource (line 32) | @NotNull
method getQueueSign (line 43) | @NotNull
FILE: duels-api/src/main/java/me/realized/duels/api/event/queue/sign/QueueSignRemoveEvent.java
class QueueSignRemoveEvent (line 14) | public class QueueSignRemoveEvent extends QueueSignEvent {
method QueueSignRemoveEvent (line 18) | public QueueSignRemoveEvent(@NotNull final Player source, @NotNull fin...
method getHandlerList (line 22) | public static HandlerList getHandlerList() {
method getHandlers (line 26) | @Override
FILE: duels-api/src/main/java/me/realized/duels/api/event/request/RequestAcceptEvent.java
class RequestAcceptEvent (line 14) | public class RequestAcceptEvent extends RequestEvent implements Cancella...
method RequestAcceptEvent (line 25) | public RequestAcceptEvent(@NotNull final Player source, @NotNull final...
method isCancelled (line 34) | @Override
method setCancelled (line 45) | @Override
method getHandlers (line 50) | @Override
method getHandlerList (line 55) | public static HandlerList getHandlerList() {
FILE: duels-api/src/main/java/me/realized/duels/api/event/request/RequestDenyEvent.java
class RequestDenyEvent (line 13) | public class RequestDenyEvent extends RequestEvent {
method RequestDenyEvent (line 22) | public RequestDenyEvent(@NotNull final Player source, @NotNull final P...
method getHandlers (line 26) | @Override
method getHandlerList (line 31) | public static HandlerList getHandlerList() {
FILE: duels-api/src/main/java/me/realized/duels/api/event/request/RequestEvent.java
class RequestEvent (line 14) | public abstract class RequestEvent extends SourcedEvent {
method RequestEvent (line 19) | RequestEvent(@NotNull final Player source, @NotNull final Player targe...
method getSource (line 34) | @NotNull
method getTarget (line 45) | @NotNull
method getRequest (line 55) | @NotNull
FILE: duels-api/src/main/java/me/realized/duels/api/event/request/RequestSendEvent.java
class RequestSendEvent (line 12) | public class RequestSendEvent extends RequestEvent implements Cancellable {
method RequestSendEvent (line 18) | public RequestSendEvent(@NotNull final Player source, @NotNull final P...
method isCancelled (line 27) | @Override
method setCancelled (line 37) | @Override
method getHandlers (line 42) | @Override
method getHandlerList (line 47) | public static HandlerList getHandlerList() {
FILE: duels-api/src/main/java/me/realized/duels/api/event/spectate/SpectateEndEvent.java
class SpectateEndEvent (line 11) | public class SpectateEndEvent extends SpectateEvent {
method SpectateEndEvent (line 15) | public SpectateEndEvent(@NotNull final Player source, @NotNull final S...
method getHandlerList (line 19) | public static HandlerList getHandlerList() {
method getHandlers (line 23) | @Override
FILE: duels-api/src/main/java/me/realized/duels/api/event/spectate/SpectateEvent.java
class SpectateEvent (line 12) | public abstract class SpectateEvent extends SourcedEvent {
method SpectateEvent (line 17) | SpectateEvent(@NotNull final Player source, @NotNull Spectator spectat...
method getSource (line 25) | @NotNull
method getSpectator (line 36) | @NotNull
FILE: duels-api/src/main/java/me/realized/duels/api/event/spectate/SpectateStartEvent.java
class SpectateStartEvent (line 12) | public class SpectateStartEvent extends SpectateEvent implements Cancell...
method SpectateStartEvent (line 18) | public SpectateStartEvent(@NotNull final Player source, @NotNull final...
method getHandlerList (line 22) | public static HandlerList getHandlerList() {
method getHandlers (line 26) | @Override
method isCancelled (line 31) | @Override
method setCancelled (line 36) | @Override
FILE: duels-api/src/main/java/me/realized/duels/api/event/user/UserCreateEvent.java
class UserCreateEvent (line 12) | public class UserCreateEvent extends Event {
method UserCreateEvent (line 18) | public UserCreateEvent(@NotNull final User user) {
method getUser (line 28) | @NotNull
method getHandlerList (line 33) | public static HandlerList getHandlerList() {
method getHandlers (line 37) | @Override
FILE: duels-api/src/main/java/me/realized/duels/api/extension/DuelsExtension.java
class DuelsExtension (line 17) | public abstract class DuelsExtension {
method init (line 30) | final void init(final Duels api, final String name, final File folder,...
method getApi (line 39) | @NotNull
method getName (line 44) | @NotNull
method getFolder (line 49) | @NotNull
method getFile (line 54) | @NotNull
method getDataFolder (line 59) | @NotNull
method isEnabled (line 64) | public boolean isEnabled() {
method setEnabled (line 68) | public final void setEnabled(final boolean enabled) {
method saveResource (line 82) | public void saveResource(@NotNull String resourcePath) {
method getResource (line 116) | @Nullable
method getConfig (line 136) | public FileConfiguration getConfig() {
method reloadConfig (line 144) | public void reloadConfig() {
method saveConfig (line 152) | public void saveConfig() {
method onEnable (line 160) | public void onEnable() {}
method onDisable (line 162) | public void onDisable() {}
method getRequiredVersion (line 169) | @Deprecated
FILE: duels-api/src/main/java/me/realized/duels/api/kit/Kit.java
type Kit (line 12) | public interface Kit {
method getName (line 19) | @NotNull
method getDisplayed (line 28) | @NotNull
method isUsePermission (line 38) | boolean isUsePermission();
method setUsePermission (line 46) | void setUsePermission(final boolean usePermission);
method isArenaSpecific (line 55) | boolean isArenaSpecific();
method setArenaSpecific (line 63) | void setArenaSpecific(final boolean arenaSpecific);
method equip (line 73) | boolean equip(@NotNull final Player player);
method isRemoved (line 83) | boolean isRemoved();
FILE: duels-api/src/main/java/me/realized/duels/api/kit/KitManager.java
type KitManager (line 14) | public interface KitManager {
method get (line 22) | @Nullable
method create (line 34) | @Nullable
method remove (line 46) | @Nullable
method remove (line 55) | @Nullable
method getKits (line 65) | @NotNull
FILE: duels-api/src/main/java/me/realized/duels/api/match/Match.java
type Match (line 15) | public interface Match {
method getArena (line 23) | @NotNull
method getStart (line 33) | long getStart();
method getKit (line 41) | @Nullable
method getItems (line 51) | @NotNull
method getBet (line 60) | int getBet();
method isFinished (line 69) | boolean isFinished();
method getPlayers (line 78) | @NotNull
method getStartingPlayers (line 91) | @NotNull
FILE: duels-api/src/main/java/me/realized/duels/api/queue/DQueue.java
type DQueue (line 12) | public interface DQueue {
method getKit (line 19) | @Nullable
method getBet (line 28) | int getBet();
method isInQueue (line 37) | boolean isInQueue(@NotNull final Player player);
method getQueuedPlayers (line 45) | @NotNull
method isRemoved (line 55) | boolean isRemoved();
FILE: duels-api/src/main/java/me/realized/duels/api/queue/DQueueManager.java
type DQueueManager (line 19) | public interface DQueueManager {
method get (line 28) | @Nullable
method get (line 38) | @Nullable
method create (line 50) | @Nullable
method create (line 59) | @Nullable
method remove (line 72) | @Nullable
method remove (line 81) | @Nullable
method isInQueue (line 91) | boolean isInQueue(@NotNull final Player player);
method addToQueue (line 102) | boolean addToQueue(@NotNull final Player player, @NotNull final DQueue...
method removeFromQueue (line 112) | @Nullable
method getQueues (line 121) | @NotNull
FILE: duels-api/src/main/java/me/realized/duels/api/queue/sign/QueueSign.java
type QueueSign (line 11) | public interface QueueSign {
method getLocation (line 18) | @NotNull
method getQueue (line 27) | @NotNull
method isRemoved (line 37) | boolean isRemoved();
FILE: duels-api/src/main/java/me/realized/duels/api/queue/sign/QueueSignManager.java
type QueueSignManager (line 13) | public interface QueueSignManager {
method get (line 21) | @Nullable
method getQueueSigns (line 30) | @NotNull
FILE: duels-api/src/main/java/me/realized/duels/api/request/Request.java
type Request (line 12) | public interface Request {
method getSender (line 19) | @NotNull
method getTarget (line 28) | @NotNull
method getKit (line 37) | @Nullable
method getArena (line 46) | @Nullable
method canBetItems (line 55) | boolean canBetItems();
method getBet (line 63) | int getBet();
FILE: duels-api/src/main/java/me/realized/duels/api/spectate/SpectateManager.java
type SpectateManager (line 16) | public interface SpectateManager {
method get (line 24) | @Nullable
method isSpectating (line 34) | boolean isSpectating(@NotNull final Player player);
method startSpectating (line 53) | @NotNull
method stopSpectating (line 64) | void stopSpectating(@NotNull final Player player);
method getSpectators (line 73) | @NotNull
type Result (line 77) | enum Result {
FILE: duels-api/src/main/java/me/realized/duels/api/spectate/Spectator.java
type Spectator (line 14) | public interface Spectator {
method getUuid (line 21) | @NotNull
method getPlayer (line 30) | @Nullable
method getTargetUuid (line 39) | @NotNull
method getTarget (line 48) | @Nullable
method getArena (line 56) | @NotNull
FILE: duels-api/src/main/java/me/realized/duels/api/user/MatchInfo.java
type MatchInfo (line 10) | public interface MatchInfo {
method getWinner (line 17) | @NotNull
method getLoser (line 26) | @NotNull
method getKit (line 35) | @Nullable
method getCreation (line 45) | long getCreation();
method getDuration (line 53) | long getDuration();
method getHealth (line 61) | double getHealth();
FILE: duels-api/src/main/java/me/realized/duels/api/user/User.java
type User (line 11) | public interface User {
method getUuid (line 18) | @NotNull
method getName (line 27) | @NotNull
method getWins (line 36) | int getWins();
method setWins (line 44) | void setWins(final int wins);
method getLosses (line 52) | int getLosses();
method setLosses (line 60) | void setLosses(final int losses);
method canRequest (line 68) | boolean canRequest();
method setRequests (line 76) | void setRequests(final boolean requests);
method getMatches (line 84) | @NotNull
method getRating (line 94) | int getRating();
method getRating (line 103) | int getRating(@NotNull final Kit kit);
method resetRating (line 111) | void resetRating();
method resetRating (line 119) | void resetRating(@NotNull final Kit kit);
method reset (line 125) | void reset();
FILE: duels-api/src/main/java/me/realized/duels/api/user/UserManager.java
type UserManager (line 14) | public interface UserManager {
method isLoaded (line 22) | boolean isLoaded();
method get (line 32) | @Nullable
method get (line 43) | @Nullable
method get (line 52) | @Nullable
method getTopWins (line 61) | @Nullable
method getTopLosses (line 70) | @Nullable
method getTopRatings (line 80) | @Nullable
method getTopRatings (line 90) | @Nullable
class TopEntry (line 94) | class TopEntry {
method TopEntry (line 100) | public TopEntry(@NotNull final String type, @NotNull final String id...
method getCreation (line 110) | public long getCreation() {
method getType (line 114) | public String getType() {
method getIdentifier (line 118) | public String getIdentifier() {
method getData (line 122) | public List<TopData> getData() {
method equals (line 126) | @Override
method hashCode (line 140) | @Override
class TopData (line 146) | class TopData implements Comparable<TopData> {
method TopData (line 152) | public TopData(@NotNull final UUID uuid, @NotNull final String name,...
method getUuid (line 160) | public UUID getUuid() {
method getName (line 164) | public String getName() {
method getValue (line 168) | public int getValue() {
method compareTo (line 172) | @Override
method equals (line 178) | @Override
method hashCode (line 192) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/DuelsPlugin.java
class DuelsPlugin (line 65) | public class DuelsPlugin extends JavaPlugin implements Duels, LogSource {
method onEnable (line 124) | @Override
method onDisable (line 211) | @Override
method load (line 228) | private boolean load() {
method unload (line 262) | private boolean unload() {
method registerCommands (line 293) | @SafeVarargs
method registerSubCommand (line 301) | @Override
method registerListener (line 321) | @Override
method reload (line 328) | @Override
method getVersion (line 338) | @Override
method reload (line 343) | public boolean reload(final Loadable loadable) {
method doSync (line 358) | @Override
method doSyncAfter (line 364) | @Override
method doSyncRepeat (line 370) | @Override
method doAsync (line 376) | @Override
method doAsyncAfter (line 382) | @Override
method doAsyncRepeat (line 388) | @Override
method cancelTask (line 394) | @Override
method cancelTask (line 400) | @Override
method info (line 405) | @Override
method warn (line 411) | @Override
method error (line 417) | @Override
method error (line 423) | @Override
method find (line 430) | public Loadable find(final String name) {
method getReloadables (line 434) | public List<String> getReloadables() {
method log (line 441) | @Override
method log (line 446) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/Permissions.java
class Permissions (line 3) | public final class Permissions {
method Permissions (line 24) | private Permissions() {}
FILE: duels-plugin/src/main/java/me/realized/duels/api/DuelsAPI.java
class DuelsAPI (line 16) | @Deprecated
method getUser (line 23) | @Deprecated
method getUser (line 32) | @Deprecated
method isInMatch (line 41) | @Deprecated
method getVersion (line 50) | @Deprecated
FILE: duels-plugin/src/main/java/me/realized/duels/arena/ArenaImpl.java
class ArenaImpl (line 36) | public class ArenaImpl extends BaseButton implements Arena {
method ArenaImpl (line 55) | public ArenaImpl(final DuelsPlugin plugin, final String name, final bo...
method ArenaImpl (line 66) | public ArenaImpl(final DuelsPlugin plugin, final String name) {
method refreshGui (line 70) | public void refreshGui(final boolean available) {
method getPosition (line 75) | @Nullable
method setPosition (line 81) | @Override
method setPosition (line 102) | @Override
method setDisabled (line 107) | @Override
method setDisabled (line 122) | @Override
method isBoundless (line 127) | public boolean isBoundless() {
method isBound (line 131) | public boolean isBound(@Nullable final KitImpl kit) {
method bind (line 135) | public void bind(final KitImpl kit) {
method isUsed (line 144) | @Override
method isAvailable (line 149) | public boolean isAvailable() {
method startMatch (line 153) | public MatchImpl startMatch(final KitImpl kit, final Map<UUID, List<It...
method endMatch (line 159) | public void endMatch(final UUID winner, final UUID loser, final Reason...
method startCountdown (line 177) | public void startCountdown(final String kit, final Map<UUID, Pair<Stri...
method isCounting (line 188) | boolean isCounting() {
method has (line 192) | @Override
method add (line 198) | public void add(final Player player) {
method remove (line 204) | public void remove(final Player player) {
method isEndGame (line 210) | public boolean isEndGame() {
method size (line 214) | public int size() {
method first (line 218) | public Player first() {
method getOpponent (line 222) | public Player getOpponent(final Player player) {
method getPlayers (line 226) | public Set<Player> getPlayers() {
method broadcast (line 230) | public void broadcast(final String message) {
method onClick (line 239) | @Override
method equals (line 257) | @Override
method hashCode (line 265) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/arena/ArenaManagerImpl.java
class ArenaManagerImpl (line 54) | public class ArenaManagerImpl implements Loadable, ArenaManager {
method ArenaManagerImpl (line 71) | public ArenaManagerImpl(final DuelsPlugin plugin) {
method handleLoad (line 80) | @Override
method handleUnload (line 110) | @Override
method saveArenas (line 119) | void saveArenas() {
method get (line 134) | @Nullable
method get (line 141) | @Nullable
method isInMatch (line 148) | @Override
method getArenas (line 154) | @NotNull
method create (line 160) | public boolean create(final CommandSender source, final String name) {
method remove (line 175) | public boolean remove(final CommandSender source, final ArenaImpl aren...
method getArenasImpl (line 189) | public List<ArenaImpl> getArenasImpl() {
method getPlayers (line 193) | public Set<Player> getPlayers() {
method getPlayersInMatch (line 197) | public long getPlayersInMatch(final Queue queue) {
method isSelectable (line 201) | public boolean isSelectable(@Nullable final KitImpl kit, @NotNull fina...
method randomArena (line 217) | public ArenaImpl randomArena(final KitImpl kit) {
method getNames (line 222) | public List<String> getNames() {
method clearBinds (line 227) | public void clearBinds(final KitImpl kit) {
class ArenaListener (line 231) | private class ArenaListener implements Listener {
method on (line 233) | @EventHandler(ignoreCancelled = true)
method on (line 248) | @EventHandler(ignoreCancelled = true)
method on (line 263) | @EventHandler(ignoreCancelled = true)
method on (line 284) | @EventHandler(ignoreCancelled = true)
FILE: duels-plugin/src/main/java/me/realized/duels/arena/Countdown.java
class Countdown (line 14) | class Countdown extends BukkitRunnable {
method Countdown (line 25) | Countdown(final DuelsPlugin plugin, final ArenaImpl arena, final Strin...
method run (line 34) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/arena/MatchImpl.java
class MatchImpl (line 21) | public class MatchImpl implements Match {
method MatchImpl (line 41) | MatchImpl(final ArenaImpl arena, final KitImpl kit, final Map<UUID, Li...
method getPlayerMap (line 50) | Map<Player, Boolean> getPlayerMap() {
method getAlivePlayers (line 54) | Set<Player> getAlivePlayers() {
method getAllPlayers (line 58) | public Set<Player> getAllPlayers() {
method isDead (line 62) | public boolean isDead(final Player player) {
method isFromQueue (line 66) | public boolean isFromQueue() {
method isOwnInventory (line 70) | public boolean isOwnInventory() {
method getItems (line 74) | public List<ItemStack> getItems() {
method setFinished (line 78) | void setFinished() {
method getDurationInMillis (line 82) | public long getDurationInMillis() {
method getItems (line 86) | @NotNull
method getPlayers (line 99) | @NotNull
method getStartingPlayers (line 105) | @NotNull
FILE: duels-plugin/src/main/java/me/realized/duels/betting/BettingManager.java
class BettingManager (line 13) | public class BettingManager implements Loadable, Listener {
method BettingManager (line 18) | public BettingManager(final DuelsPlugin plugin) {
method handleLoad (line 23) | @Override
method handleUnload (line 34) | @Override
method open (line 37) | public void open(final Settings settings, final Player first, final Pl...
FILE: duels-plugin/src/main/java/me/realized/duels/command/BaseCommand.java
class BaseCommand (line 25) | public abstract class BaseCommand extends AbstractCommand<DuelsPlugin> {
method BaseCommand (line 47) | protected BaseCommand(final DuelsPlugin plugin, final String name, fin...
method BaseCommand (line 71) | protected BaseCommand(final DuelsPlugin plugin, final String name, fin...
method BaseCommand (line 79) | protected BaseCommand(final DuelsPlugin plugin, final String name, fin...
method handleMessage (line 83) | @Override
method handleTabCompletion (line 101) | protected List<String> handleTabCompletion(final String argument, fina...
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/SpectateCommand.java
class SpectateCommand (line 15) | public class SpectateCommand extends BaseCommand {
method SpectateCommand (line 17) | public SpectateCommand(final DuelsPlugin plugin) {
method execute (line 21) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duel/DuelCommand.java
class DuelCommand (line 31) | public class DuelCommand extends BaseCommand {
method DuelCommand (line 39) | public DuelCommand(final DuelsPlugin plugin) {
method executeFirst (line 57) | @Override
method execute (line 253) | @Override
method onTabComplete (line 257) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duel/subcommands/AcceptCommand.java
class AcceptCommand (line 18) | public class AcceptCommand extends BaseCommand {
method AcceptCommand (line 25) | public AcceptCommand(final DuelsPlugin plugin) {
method execute (line 33) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duel/subcommands/DenyCommand.java
class DenyCommand (line 11) | public class DenyCommand extends BaseCommand {
method DenyCommand (line 13) | public DenyCommand(final DuelsPlugin plugin) {
method execute (line 17) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duel/subcommands/InventoryCommand.java
class InventoryCommand (line 11) | public class InventoryCommand extends BaseCommand {
method InventoryCommand (line 13) | public InventoryCommand(final DuelsPlugin plugin) {
method execute (line 17) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duel/subcommands/StatsCommand.java
class StatsCommand (line 15) | public class StatsCommand extends BaseCommand {
method StatsCommand (line 17) | public StatsCommand(final DuelsPlugin plugin) {
method execute (line 21) | @Override
method displayStats (line 38) | private void displayStats(final Player sender, final String name) {
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duel/subcommands/ToggleCommand.java
class ToggleCommand (line 10) | public class ToggleCommand extends BaseCommand {
method ToggleCommand (line 12) | public ToggleCommand(final DuelsPlugin plugin) {
method execute (line 16) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duel/subcommands/TopCommand.java
class TopCommand (line 13) | public class TopCommand extends BaseCommand {
method TopCommand (line 15) | public TopCommand(final DuelsPlugin plugin) {
method execute (line 19) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duel/subcommands/VersionCommand.java
class VersionCommand (line 13) | public class VersionCommand extends BaseCommand {
method VersionCommand (line 15) | public VersionCommand(final DuelsPlugin plugin) {
method execute (line 19) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/DuelsCommand.java
class DuelsCommand (line 34) | public class DuelsCommand extends BaseCommand {
method DuelsCommand (line 36) | public DuelsCommand(final DuelsPlugin plugin) {
method execute (line 68) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/AddsignCommand.java
class AddsignCommand (line 18) | public class AddsignCommand extends BaseCommand {
method AddsignCommand (line 20) | public AddsignCommand(final DuelsPlugin plugin) {
method execute (line 24) | @Override
method onTabComplete (line 64) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/BindCommand.java
class BindCommand (line 13) | public class BindCommand extends BaseCommand {
method BindCommand (line 15) | public BindCommand(final DuelsPlugin plugin) {
method execute (line 19) | @Override
method onTabComplete (line 33) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/CreateCommand.java
class CreateCommand (line 8) | public class CreateCommand extends BaseCommand {
method CreateCommand (line 10) | public CreateCommand(final DuelsPlugin plugin) {
method execute (line 14) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/CreatequeueCommand.java
class CreatequeueCommand (line 13) | public class CreatequeueCommand extends BaseCommand {
method CreatequeueCommand (line 15) | public CreatequeueCommand(final DuelsPlugin plugin) {
method execute (line 19) | @Override
method onTabComplete (line 44) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/DeleteCommand.java
class DeleteCommand (line 11) | public class DeleteCommand extends BaseCommand {
method DeleteCommand (line 13) | public DeleteCommand(final DuelsPlugin plugin) {
method execute (line 17) | @Override
method onTabComplete (line 36) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/DeletekitCommand.java
class DeletekitCommand (line 10) | public class DeletekitCommand extends BaseCommand {
method DeletekitCommand (line 12) | public DeletekitCommand(final DuelsPlugin plugin) {
method execute (line 16) | @Override
method onTabComplete (line 28) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/DeletequeueCommand.java
class DeletequeueCommand (line 13) | public class DeletequeueCommand extends BaseCommand {
method DeletequeueCommand (line 15) | public DeletequeueCommand(final DuelsPlugin plugin) {
method execute (line 19) | @Override
method onTabComplete (line 44) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/DeletesignCommand.java
class DeletesignCommand (line 16) | public class DeletesignCommand extends BaseCommand {
method DeletesignCommand (line 18) | public DeletesignCommand(final DuelsPlugin plugin) {
method execute (line 22) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/EditCommand.java
class EditCommand (line 19) | public class EditCommand extends BaseCommand {
method EditCommand (line 25) | public EditCommand(final DuelsPlugin plugin) {
method execute (line 36) | @Override
method onTabComplete (line 66) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/HelpCommand.java
class HelpCommand (line 11) | public class HelpCommand extends BaseCommand {
method HelpCommand (line 15) | public HelpCommand(final DuelsPlugin plugin) {
method execute (line 19) | @Override
method onTabComplete (line 29) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/InfoCommand.java
class InfoCommand (line 14) | public class InfoCommand extends BaseCommand {
method InfoCommand (line 16) | public InfoCommand(final DuelsPlugin plugin) {
method execute (line 20) | @Override
method onTabComplete (line 40) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/ListCommand.java
class ListCommand (line 15) | public class ListCommand extends BaseCommand {
method ListCommand (line 17) | public ListCommand(final DuelsPlugin plugin) {
method execute (line 21) | @Override
method getColor (line 36) | private String getColor(final ArenaImpl arena) {
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/LoadkitCommand.java
class LoadkitCommand (line 12) | public class LoadkitCommand extends BaseCommand {
method LoadkitCommand (line 14) | public LoadkitCommand(final DuelsPlugin plugin) {
method execute (line 18) | @Override
method onTabComplete (line 34) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/LobbyCommand.java
class LobbyCommand (line 8) | public class LobbyCommand extends BaseCommand {
method LobbyCommand (line 10) | public LobbyCommand(final DuelsPlugin plugin) {
method execute (line 14) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/OptionsCommand.java
class OptionsCommand (line 13) | public class OptionsCommand extends BaseCommand {
method OptionsCommand (line 15) | public OptionsCommand(final DuelsPlugin plugin) {
method execute (line 19) | @Override
method onTabComplete (line 33) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/PlaysoundCommand.java
class PlaysoundCommand (line 12) | public class PlaysoundCommand extends BaseCommand {
method PlaysoundCommand (line 14) | public PlaysoundCommand(final DuelsPlugin plugin) {
method execute (line 18) | @Override
method onTabComplete (line 31) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/ReloadCommand.java
class ReloadCommand (line 14) | public class ReloadCommand extends BaseCommand {
method ReloadCommand (line 16) | public ReloadCommand(final DuelsPlugin plugin) {
method execute (line 20) | @Override
method onTabComplete (line 48) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/ResetCommand.java
class ResetCommand (line 8) | public class ResetCommand extends BaseCommand {
method ResetCommand (line 10) | public ResetCommand(final DuelsPlugin plugin) {
method execute (line 14) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/ResetratingCommand.java
class ResetratingCommand (line 12) | public class ResetratingCommand extends BaseCommand {
method ResetratingCommand (line 14) | public ResetratingCommand(final DuelsPlugin plugin) {
method execute (line 18) | @Override
method onTabComplete (line 48) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/SavekitCommand.java
class SavekitCommand (line 10) | public class SavekitCommand extends BaseCommand {
method SavekitCommand (line 12) | public SavekitCommand(final DuelsPlugin plugin) {
method execute (line 16) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/SetCommand.java
class SetCommand (line 15) | public class SetCommand extends BaseCommand {
method SetCommand (line 17) | public SetCommand(final DuelsPlugin plugin) {
method execute (line 21) | @Override
method onTabComplete (line 44) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/SetitemCommand.java
class SetitemCommand (line 15) | public class SetitemCommand extends BaseCommand {
method SetitemCommand (line 17) | public SetitemCommand(final DuelsPlugin plugin) {
method execute (line 21) | @Override
method onTabComplete (line 44) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/SetlobbyCommand.java
class SetlobbyCommand (line 8) | public class SetlobbyCommand extends BaseCommand {
method SetlobbyCommand (line 10) | public SetlobbyCommand(final DuelsPlugin plugin) {
method execute (line 14) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/SetratingCommand.java
class SetratingCommand (line 14) | public class SetratingCommand extends BaseCommand {
method SetratingCommand (line 16) | public SetratingCommand(final DuelsPlugin plugin) {
method execute (line 20) | @Override
method onTabComplete (line 47) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/TeleportCommand.java
class TeleportCommand (line 13) | public class TeleportCommand extends BaseCommand {
method TeleportCommand (line 15) | public TeleportCommand(final DuelsPlugin plugin) {
method execute (line 19) | @Override
method onTabComplete (line 47) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/ToggleCommand.java
class ToggleCommand (line 11) | public class ToggleCommand extends BaseCommand {
method ToggleCommand (line 13) | public ToggleCommand(final DuelsPlugin plugin) {
method execute (line 17) | @Override
method onTabComplete (line 31) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/queue/QueueCommand.java
class QueueCommand (line 11) | public class QueueCommand extends BaseCommand {
method QueueCommand (line 13) | public QueueCommand(final DuelsPlugin plugin) {
method execute (line 21) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/queue/subcommands/JoinCommand.java
class JoinCommand (line 16) | public class JoinCommand extends BaseCommand {
method JoinCommand (line 18) | public JoinCommand(final DuelsPlugin plugin) {
method execute (line 22) | @Override
method onTabComplete (line 49) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/command/commands/queue/subcommands/LeaveCommand.java
class LeaveCommand (line 9) | public class LeaveCommand extends BaseCommand {
method LeaveCommand (line 11) | public LeaveCommand(final DuelsPlugin plugin) {
method execute (line 15) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/config/Config.java
class Config (line 17) | public class Config extends AbstractConfiguration<DuelsPlugin> {
method Config (line 249) | public Config(final DuelsPlugin plugin) {
method loadValues (line 253) | @Override
method playSound (line 399) | public void playSound(final Player player, final String message) {
method getSound (line 405) | public MessageSound getSound(final String name) {
method getSounds (line 409) | public Set<String> getSounds() {
class MessageSound (line 413) | public class MessageSound {
method MessageSound (line 422) | MessageSound(final Sound type, final double pitch, final double volu...
FILE: duels-plugin/src/main/java/me/realized/duels/config/Lang.java
class Lang (line 20) | public class Lang extends AbstractConfiguration<DuelsPlugin> implements ...
method Lang (line 25) | public Lang(final DuelsPlugin plugin) {
method loadValues (line 30) | @Override
method transferredSections (line 77) | @Override
method handleUnload (line 82) | @Override
method getRawMessage (line 87) | private String getRawMessage(final String key) {
method getMessage (line 99) | public String getMessage(final String key) {
method replace (line 104) | private String replace(String message, Object... replacers) {
method getMessage (line 121) | public String getMessage(final String key, final Object... replacers) {
method sendMessage (line 126) | public void sendMessage(final CommandSender receiver, final String key...
method sendMessage (line 140) | public void sendMessage(final Collection<Player> players, final String...
FILE: duels-plugin/src/main/java/me/realized/duels/config/converters/ConfigConverter9_10.java
class ConfigConverter9_10 (line 7) | public class ConfigConverter9_10 implements Converter {
method renamedKeys (line 9) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/data/ArenaData.java
class ArenaData (line 12) | public class ArenaData {
method ArenaData (line 20) | private ArenaData() {}
method ArenaData (line 22) | public ArenaData(final ArenaImpl arena) {
method toArena (line 30) | public ArenaImpl toArena(final DuelsPlugin plugin) {
FILE: duels-plugin/src/main/java/me/realized/duels/data/ItemData.java
class ItemData (line 29) | public class ItemData {
method fromItemStack (line 31) | public static ItemData fromItemStack(final ItemStack item) {
method patchItemFlags (line 35) | @SuppressWarnings("unchecked")
method ItemData (line 51) | private ItemData() {}
method ItemData (line 53) | private ItemData(ItemStack item) {
method toItemStack (line 59) | public ItemStack toItemStack(final boolean kitItem) {
method toItemStack (line 73) | public ItemStack toItemStack() {
class ItemDataDeserializer (line 77) | public static class ItemDataDeserializer extends DefaultBasedDeseriali...
method ItemDataDeserializer (line 81) | public ItemDataDeserializer(final JsonDeserializer<?> defaultDeseria...
method deserialize (line 85) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/data/KitData.java
class KitData (line 16) | public class KitData {
method fromKit (line 21) | public static KitData fromKit(final KitImpl kit) {
method KitData (line 33) | private KitData() {}
method KitData (line 35) | private KitData(final KitImpl kit) {
method toKit (line 52) | public KitImpl toKit(final DuelsPlugin plugin) {
FILE: duels-plugin/src/main/java/me/realized/duels/data/LocationData.java
class LocationData (line 7) | public class LocationData {
method fromLocation (line 9) | public static LocationData fromLocation(final Location location) {
method LocationData (line 20) | private LocationData() {}
method LocationData (line 22) | private LocationData(final World world, final double x, final double y...
method LocationData (line 31) | private LocationData(final Location location) {
method getWorld (line 35) | public World getWorld() {
method toLocation (line 39) | public Location toLocation() {
FILE: duels-plugin/src/main/java/me/realized/duels/data/MatchData.java
class MatchData (line 6) | public class MatchData implements MatchInfo {
method MatchData (line 21) | private MatchData() {}
method MatchData (line 23) | public MatchData(final String winner, final String loser, final String...
method getCreation (line 32) | @Override
method toString (line 37) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/data/PlayerData.java
class PlayerData (line 14) | public class PlayerData {
method fromPlayerInfo (line 18) | public static PlayerData fromPlayerInfo(final PlayerInfo info) {
method PlayerData (line 29) | private PlayerData() {}
method PlayerData (line 31) | private PlayerData(final PlayerInfo info) {
method toPlayerInfo (line 48) | public PlayerInfo toPlayerInfo() {
FILE: duels-plugin/src/main/java/me/realized/duels/data/PotionEffectData.java
class PotionEffectData (line 6) | public class PotionEffectData {
method fromPotionEffect (line 8) | public static PotionEffectData fromPotionEffect(final PotionEffect eff...
method PotionEffectData (line 16) | private PotionEffectData() {}
method PotionEffectData (line 18) | private PotionEffectData(final PotionEffect effect) {
method toPotionEffect (line 24) | public PotionEffect toPotionEffect() {
FILE: duels-plugin/src/main/java/me/realized/duels/data/QueueData.java
class QueueData (line 6) | public class QueueData {
method QueueData (line 11) | private QueueData() {}
method QueueData (line 13) | public QueueData(final Queue queue) {
method toQueue (line 18) | public Queue toQueue(final DuelsPlugin plugin) {
FILE: duels-plugin/src/main/java/me/realized/duels/data/QueueSignData.java
class QueueSignData (line 11) | public class QueueSignData {
method QueueSignData (line 17) | private QueueSignData() {}
method QueueSignData (line 19) | public QueueSignData(final QueueSignImpl sign) {
method toQueueSign (line 27) | public QueueSignImpl toQueueSign(final DuelsPlugin plugin) {
FILE: duels-plugin/src/main/java/me/realized/duels/data/UserData.java
class UserData (line 26) | public class UserData implements User {
method UserData (line 48) | private UserData() {}
method UserData (line 50) | public UserData(final File folder, final int defaultRating, final int ...
method setWins (line 58) | @Override
method setLosses (line 67) | @Override
method canRequest (line 76) | @Override
method setRequests (line 81) | @Override
method getMatches (line 90) | @NotNull
method getRating (line 96) | @Override
method getRating (line 101) | @Override
method resetRating (line 106) | @Override
method resetRating (line 111) | @Override
method reset (line 116) | @Override
method getRatingUnsafe (line 128) | private int getRatingUnsafe(final Kit kit) {
method setRating (line 132) | public void setRating(final Kit kit, final int rating) {
method isOnline (line 144) | private boolean isOnline() {
method addWin (line 148) | public void addWin() {
method addLoss (line 153) | public void addLoss() {
method addMatch (line 158) | public void addMatch(final MatchData matchData) {
method refreshMatches (line 166) | void refreshMatches() {
method trySave (line 176) | public void trySave() {
method toString (line 193) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/data/UserManagerImpl.java
class UserManagerImpl (line 43) | public class UserManagerImpl implements Loadable, Listener, UserManager {
method UserManagerImpl (line 68) | public UserManagerImpl(final DuelsPlugin plugin) {
method handleLoad (line 81) | @Override
method handleUnload (line 169) | @Override
method get (line 179) | @Nullable
method get (line 187) | @Nullable
method get (line 194) | @Nullable
method getTopWins (line 201) | @Nullable
method getTopLosses (line 207) | @Nullable
method getTopRatings (line 213) | @Nullable
method getTopRatings (line 219) | @Nullable
method getNextUpdate (line 226) | public String getNextUpdate(final long creation) {
method get (line 230) | private TopEntry get(final long interval, final TopEntry previous, fin...
method subList (line 238) | private List<TopData> subList(final List<TopData> list) {
method sorted (line 242) | private List<TopData> sorted(final Function<User, Integer> function) {
method tryLoad (line 249) | private UserData tryLoad(final Player player) {
method saveUsers (line 281) | private void saveUsers(final Collection<? extends Player> players) {
method on (line 291) | @EventHandler
method on (line 325) | @EventHandler
FILE: duels-plugin/src/main/java/me/realized/duels/duel/DuelManager.java
class DuelManager (line 77) | public class DuelManager implements Loadable {
method DuelManager (line 102) | public DuelManager(final DuelsPlugin plugin) {
method handleLoad (line 114) | @Override
method handleUnload (line 148) | @Override
method handleTie (line 193) | private void handleTie(final Player player, final ArenaImpl arena, fin...
method handleWin (line 238) | private void handleWin(final Player player, final Player opponent, fin...
method startMatch (line 282) | public void startMatch(final Player first, final Player second, final ...
method refundItems (line 367) | private void refundItems(final Map<UUID, List<ItemStack>> items, final...
method isBlacklistedWorld (line 373) | private boolean isBlacklistedWorld(final Player player) {
method isTagged (line 377) | private boolean isTagged(final Player player) {
method notInLoc (line 383) | private boolean notInLoc(final Player player, final Location location) {
method notInDz (line 395) | private boolean notInDz(final Player player, final String duelzone) {
method getRating (line 399) | private int getRating(final KitImpl kit, final UserData user) {
method addPlayers (line 403) | private void addPlayers(final MatchImpl match, final ArenaImpl arena, ...
method handleInventories (line 451) | private void handleInventories(final MatchImpl match) {
method handleStats (line 473) | private void handleStats(final MatchImpl match, final UserData winner,...
class DuelListener (line 514) | private class DuelListener implements Listener {
method on (line 516) | @EventHandler(priority = EventPriority.HIGHEST)
method on (line 607) | @EventHandler(ignoreCancelled = true)
method on (line 623) | @EventHandler
method on (line 634) | @EventHandler(ignoreCancelled = true)
method on (line 644) | @EventHandler(ignoreCancelled = true)
method on (line 658) | @EventHandler(ignoreCancelled = true)
method on (line 671) | @EventHandler(ignoreCancelled = true)
method on (line 693) | @EventHandler(ignoreCancelled = true)
FILE: duels-plugin/src/main/java/me/realized/duels/extension/ExtensionClassLoader.java
class ExtensionClassLoader (line 20) | public class ExtensionClassLoader extends URLClassLoader {
method ExtensionClassLoader (line 29) | ExtensionClassLoader(final File file, final ExtensionInfo info, final ...
method findClass (line 44) | protected Class<?> findClass(final String name) throws ClassNotFoundEx...
method getResource (line 95) | @Override
method getResources (line 100) | @Override
method close (line 105) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/extension/ExtensionInfo.java
class ExtensionInfo (line 12) | public class ExtensionInfo {
method ExtensionInfo (line 19) | ExtensionInfo(final File file) throws Exception {
method getOrThrow (line 41) | private String getOrThrow(final FileConfiguration config, final String...
FILE: duels-plugin/src/main/java/me/realized/duels/extension/ExtensionManager.java
class ExtensionManager (line 15) | public class ExtensionManager implements Loadable {
method ExtensionManager (line 32) | public ExtensionManager(final DuelsPlugin plugin) {
method handleLoad (line 41) | @Override
method handleUnload (line 94) | @Override
method getExtension (line 114) | public DuelsExtension getExtension(final String name) {
method getInfo (line 118) | public ExtensionInfo getInfo(final DuelsExtension extension) {
FILE: duels-plugin/src/main/java/me/realized/duels/gui/BaseButton.java
class BaseButton (line 16) | public abstract class BaseButton extends Button<DuelsPlugin> {
method BaseButton (line 28) | protected BaseButton(final DuelsPlugin plugin, final ItemStack display...
FILE: duels-plugin/src/main/java/me/realized/duels/gui/betting/BettingGui.java
class BettingGui (line 35) | public class BettingGui extends AbstractGui<DuelsPlugin> {
method BettingGui (line 48) | public BettingGui(final DuelsPlugin plugin, final Settings settings, f...
method isFirst (line 68) | private boolean isFirst(final Player player) {
method getSection (line 72) | private Section getSection(final Player player) {
method isReady (line 76) | public boolean isReady(final Player player) {
method setReady (line 80) | public void setReady(final Player player) {
method update (line 92) | public void update(final Player player, final Button<DuelsPlugin> butt...
method open (line 96) | @Override
method isPart (line 104) | @Override
method on (line 109) | @Override
method on (line 154) | @Override
method on (line 183) | @Override
method clear (line 204) | @Override
class Section (line 217) | private class Section {
method Section (line 221) | Section(final int start, final int end, final int height) {
method isPart (line 227) | private boolean isPart(final int slot) {
method collect (line 239) | private List<ItemStack> collect() {
class WaitTask (line 253) | private class WaitTask extends BukkitRunnable {
method run (line 259) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/gui/betting/buttons/CancelButton.java
class CancelButton (line 9) | public class CancelButton extends BaseButton {
method CancelButton (line 11) | public CancelButton(final DuelsPlugin plugin) {
method onClick (line 20) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/gui/betting/buttons/DetailsButton.java
class DetailsButton (line 10) | public class DetailsButton extends BaseButton {
method DetailsButton (line 14) | public DetailsButton(final DuelsPlugin plugin, final Settings settings) {
method update (line 23) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/gui/betting/buttons/HeadButton.java
class HeadButton (line 9) | public class HeadButton extends BaseButton {
method HeadButton (line 11) | public HeadButton(final DuelsPlugin plugin, final Player owner) {
FILE: duels-plugin/src/main/java/me/realized/duels/gui/betting/buttons/StateButton.java
class StateButton (line 11) | public class StateButton extends BaseButton {
method StateButton (line 16) | public StateButton(final DuelsPlugin plugin, final BettingGui gui, fin...
method onClick (line 26) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/gui/bind/BindGui.java
class BindGui (line 14) | public class BindGui extends MultiPageGui<DuelsPlugin> {
method BindGui (line 16) | public BindGui(final DuelsPlugin plugin, final KitImpl kit) {
FILE: duels-plugin/src/main/java/me/realized/duels/gui/bind/buttons/BindButton.java
class BindButton (line 15) | public class BindButton extends BaseButton {
method BindButton (line 22) | public BindButton(final DuelsPlugin plugin, final KitImpl kit, final A...
method update (line 30) | private void update() {
method onClick (line 39) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/gui/inventory/InventoryGui.java
class InventoryGui (line 16) | public class InventoryGui extends SinglePageGui<DuelsPlugin> {
method InventoryGui (line 18) | public InventoryGui(final DuelsPlugin plugin, final Player player, fin...
FILE: duels-plugin/src/main/java/me/realized/duels/gui/inventory/buttons/EffectsButton.java
class EffectsButton (line 13) | public class EffectsButton extends BaseButton {
method EffectsButton (line 15) | public EffectsButton(final DuelsPlugin plugin, final Player player) {
FILE: duels-plugin/src/main/java/me/realized/duels/gui/inventory/buttons/HeadButton.java
class HeadButton (line 9) | public class HeadButton extends BaseButton {
method HeadButton (line 11) | public HeadButton(final DuelsPlugin plugin, final Player owner) {
FILE: duels-plugin/src/main/java/me/realized/duels/gui/inventory/buttons/HealthButton.java
class HealthButton (line 10) | public class HealthButton extends BaseButton {
method HealthButton (line 12) | public HealthButton(final DuelsPlugin plugin, final Player player, fin...
FILE: duels-plugin/src/main/java/me/realized/duels/gui/inventory/buttons/HungerButton.java
class HungerButton (line 9) | public class HungerButton extends BaseButton {
method HungerButton (line 11) | public HungerButton(final DuelsPlugin plugin, final Player player) {
FILE: duels-plugin/src/main/java/me/realized/duels/gui/inventory/buttons/PotionCounterButton.java
class PotionCounterButton (line 10) | public class PotionCounterButton extends BaseButton {
method PotionCounterButton (line 12) | public PotionCounterButton(final DuelsPlugin plugin, final int count) {
FILE: duels-plugin/src/main/java/me/realized/duels/gui/options/OptionsGui.java
class OptionsGui (line 19) | public class OptionsGui extends SinglePageGui<DuelsPlugin> {
method OptionsGui (line 24) | public OptionsGui(final DuelsPlugin plugin, final Player player, final...
method on (line 39) | @Override
type Option (line 44) | public enum Option {
method Option (line 61) | Option(final Material displayed, final Function<KitImpl, Boolean> ge...
method Option (line 68) | Option(final Material displayed, final Characteristic characteristic...
method get (line 75) | public boolean get(final KitImpl kit) {
method set (line 79) | public void set(final KitImpl kit) {
FILE: duels-plugin/src/main/java/me/realized/duels/gui/options/buttons/OptionButton.java
class OptionButton (line 14) | public class OptionButton extends BaseButton {
method OptionButton (line 20) | public OptionButton(final DuelsPlugin plugin, final OptionsGui gui, fi...
method update (line 29) | private void update() {
method onClick (line 44) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/gui/settings/SettingsGui.java
class SettingsGui (line 20) | public class SettingsGui extends SinglePageGui<DuelsPlugin> {
method SettingsGui (line 29) | public SettingsGui(final DuelsPlugin plugin) {
FILE: duels-plugin/src/main/java/me/realized/duels/gui/settings/buttons/ArenaSelectButton.java
class ArenaSelectButton (line 11) | public class ArenaSelectButton extends BaseButton {
method ArenaSelectButton (line 13) | public ArenaSelectButton(final DuelsPlugin plugin) {
method update (line 17) | @Override
method onClick (line 30) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/gui/settings/buttons/CancelButton.java
class CancelButton (line 9) | public class CancelButton extends BaseButton {
method CancelButton (line 11) | public CancelButton(final DuelsPlugin plugin) {
method onClick (line 15) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/gui/settings/buttons/ItemBettingButton.java
class ItemBettingButton (line 11) | public class ItemBettingButton extends BaseButton {
method ItemBettingButton (line 13) | public ItemBettingButton(final DuelsPlugin plugin) {
method update (line 17) | @Override
method onClick (line 30) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/gui/settings/buttons/KitSelectButton.java
class KitSelectButton (line 11) | public class KitSelectButton extends BaseButton {
method KitSelectButton (line 13) | public KitSelectButton(final DuelsPlugin plugin) {
method update (line 17) | @Override
method onClick (line 30) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/gui/settings/buttons/OwnInventoryButton.java
class OwnInventoryButton (line 11) | public class OwnInventoryButton extends BaseButton {
method OwnInventoryButton (line 13) | public OwnInventoryButton(final DuelsPlugin plugin) {
method update (line 17) | @Override
method onClick (line 30) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/gui/settings/buttons/RequestDetailsButton.java
class RequestDetailsButton (line 11) | public class RequestDetailsButton extends BaseButton {
method RequestDetailsButton (line 13) | public RequestDetailsButton(final DuelsPlugin plugin) {
method update (line 17) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/gui/settings/buttons/RequestSendButton.java
class RequestSendButton (line 11) | public class RequestSendButton extends BaseButton {
method RequestSendButton (line 13) | public RequestSendButton(final DuelsPlugin plugin) {
method onClick (line 17) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/hook/HookManager.java
class HookManager (line 20) | public class HookManager extends AbstractHookManager<DuelsPlugin> {
method HookManager (line 22) | public HookManager(final DuelsPlugin plugin) {
FILE: duels-plugin/src/main/java/me/realized/duels/hook/hooks/BountyHuntersHook.java
class BountyHuntersHook (line 14) | public class BountyHuntersHook extends PluginHook<DuelsPlugin> implement...
method BountyHuntersHook (line 21) | public BountyHuntersHook(final DuelsPlugin plugin) {
method on (line 36) | @EventHandler(ignoreCancelled = true)
method on (line 45) | @EventHandler(ignoreCancelled = true)
FILE: duels-plugin/src/main/java/me/realized/duels/hook/hooks/CombatLogXHook.java
class CombatLogXHook (line 14) | public class CombatLogXHook extends PluginHook<DuelsPlugin> {
method CombatLogXHook (line 21) | public CombatLogXHook(final DuelsPlugin plugin) {
method isTagged (line 35) | public boolean isTagged(final Player player) {
class CombatLogXListener (line 39) | public class CombatLogXListener implements Listener {
method on (line 41) | @EventHandler(ignoreCancelled = true)
FILE: duels-plugin/src/main/java/me/realized/duels/hook/hooks/CombatTagPlusHook.java
class CombatTagPlusHook (line 14) | public class CombatTagPlusHook extends PluginHook<DuelsPlugin> {
method CombatTagPlusHook (line 21) | public CombatTagPlusHook(final DuelsPlugin plugin) {
method isTagged (line 28) | public boolean isTagged(final Player player) {
class CombatTagPlusListener (line 32) | public class CombatTagPlusListener implements Listener {
method on (line 34) | @EventHandler(ignoreCancelled = true)
FILE: duels-plugin/src/main/java/me/realized/duels/hook/hooks/EssentialsHook.java
class EssentialsHook (line 11) | public class EssentialsHook extends PluginHook<DuelsPlugin> {
method EssentialsHook (line 17) | public EssentialsHook(final DuelsPlugin plugin) {
method getPlugin (line 22) | @Override
method tryUnvanish (line 27) | public void tryUnvanish(final Player player) {
method setBackLocation (line 39) | public void setBackLocation(final Player player, final Location locati...
method isVanished (line 51) | public boolean isVanished(final Player player) {
FILE: duels-plugin/src/main/java/me/realized/duels/hook/hooks/FactionsHook.java
class FactionsHook (line 17) | public class FactionsHook extends PluginHook<DuelsPlugin> {
method FactionsHook (line 24) | public FactionsHook(final DuelsPlugin plugin) {
class Factions2Listener (line 45) | public class Factions2Listener implements Listener {
method on (line 47) | @EventHandler
class FactionsUUIDListener (line 64) | public class FactionsUUIDListener implements Listener {
method on (line 66) | @EventHandler
FILE: duels-plugin/src/main/java/me/realized/duels/hook/hooks/LeaderHeadsHook.java
class LeaderHeadsHook (line 13) | public class LeaderHeadsHook extends PluginHook<DuelsPlugin> {
method LeaderHeadsHook (line 20) | public LeaderHeadsHook(final DuelsPlugin plugin) {
class DuelWinsCollector (line 32) | public class DuelWinsCollector extends OnlineDataCollector {
method DuelWinsCollector (line 34) | DuelWinsCollector(final String title, final String command) {
method getScore (line 38) | @Override
class DuelLossesCollector (line 45) | public class DuelLossesCollector extends OnlineDataCollector {
method DuelLossesCollector (line 47) | DuelLossesCollector(final String title, final String command) {
method getScore (line 51) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/hook/hooks/MVdWPlaceholderHook.java
class MVdWPlaceholderHook (line 12) | public class MVdWPlaceholderHook extends PluginHook<DuelsPlugin> {
method MVdWPlaceholderHook (line 18) | public MVdWPlaceholderHook(final DuelsPlugin plugin) {
class Placeholders (line 28) | public class Placeholders implements PlaceholderReplacer {
method onPlaceholderReplace (line 30) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/hook/hooks/McMMOHook.java
class McMMOHook (line 12) | public class McMMOHook extends PluginHook<DuelsPlugin> {
method McMMOHook (line 19) | public McMMOHook(final DuelsPlugin plugin) {
method disableSkills (line 24) | public void disableSkills(final Player player) {
method enableSkills (line 34) | public void enableSkills(final Player player) {
FILE: duels-plugin/src/main/java/me/realized/duels/hook/hooks/MyPetHook.java
class MyPetHook (line 10) | public class MyPetHook extends PluginHook<DuelsPlugin> {
method MyPetHook (line 16) | public MyPetHook(final DuelsPlugin plugin) {
method removePet (line 30) | public void removePet(final Player player) {
FILE: duels-plugin/src/main/java/me/realized/duels/hook/hooks/PlaceholderHook.java
class PlaceholderHook (line 10) | public class PlaceholderHook extends PluginHook<DuelsPlugin> {
method PlaceholderHook (line 16) | public PlaceholderHook(final DuelsPlugin plugin) {
class Placeholders (line 22) | public class Placeholders extends PlaceholderExpansion {
method getIdentifier (line 24) | @Override
method getAuthor (line 29) | @Override
method getVersion (line 34) | @Override
method persist (line 39) | @Override
method onPlaceholderRequest (line 44) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/hook/hooks/PvPManagerHook.java
class PvPManagerHook (line 16) | public class PvPManagerHook extends PluginHook<DuelsPlugin> {
method PvPManagerHook (line 23) | public PvPManagerHook(final DuelsPlugin plugin) {
method isTagged (line 37) | public boolean isTagged(final Player player) {
class PvPManagerListener (line 52) | public class PvPManagerListener implements Listener {
method on (line 54) | @EventHandler(ignoreCancelled = true)
FILE: duels-plugin/src/main/java/me/realized/duels/hook/hooks/SimpleClansHook.java
class SimpleClansHook (line 13) | public class SimpleClansHook extends PluginHook<DuelsPlugin> {
method SimpleClansHook (line 20) | public SimpleClansHook(final DuelsPlugin plugin) {
class SimpleClansListener (line 34) | public class SimpleClansListener implements Listener {
method on (line 36) | @EventHandler(ignoreCancelled = true)
FILE: duels-plugin/src/main/java/me/realized/duels/hook/hooks/VaultHook.java
class VaultHook (line 13) | public class VaultHook extends PluginHook<DuelsPlugin> {
method VaultHook (line 20) | public VaultHook(final DuelsPlugin plugin) {
method has (line 34) | public boolean has(final int amount, final Player... players) {
method add (line 48) | public void add(final int amount, final Player... players) {
method remove (line 54) | public void remove(final int amount, final Player... players) {
FILE: duels-plugin/src/main/java/me/realized/duels/hook/hooks/worldguard/WorldGuardHook.java
class WorldGuardHook (line 10) | public class WorldGuardHook extends PluginHook<DuelsPlugin> {
method WorldGuardHook (line 17) | public WorldGuardHook(final DuelsPlugin plugin) {
method findDuelZone (line 23) | public String findDuelZone(final Player player) {
FILE: duels-plugin/src/main/java/me/realized/duels/inventories/InventoryManager.java
class InventoryManager (line 12) | public class InventoryManager implements Loadable {
method InventoryManager (line 20) | public InventoryManager(final DuelsPlugin plugin) {
method handleLoad (line 25) | @Override
method handleUnload (line 41) | @Override
method get (line 47) | public InventoryGui get(final UUID uuid) {
method create (line 51) | public void create(final Player player, final boolean dead) {
FILE: duels-plugin/src/main/java/me/realized/duels/kit/KitImpl.java
class KitImpl (line 26) | public class KitImpl extends BaseButton implements Kit {
method KitImpl (line 42) | public KitImpl(final DuelsPlugin plugin, final String name, final Item...
method KitImpl (line 55) | public KitImpl(final DuelsPlugin plugin, final String name, final Play...
method getDisplayed (line 61) | @NotNull
method setDisplayed (line 66) | @Override
method hasCharacteristic (line 72) | public boolean hasCharacteristic(final Characteristic characteristic) {
method toggleCharacteristic (line 76) | public void toggleCharacteristic(final Characteristic characteristic) {
method setUsePermission (line 85) | @Override
method setArenaSpecific (line 91) | @Override
method equip (line 97) | @Override
method onClick (line 112) | @Override
method equals (line 132) | @Override
method hashCode (line 145) | @Override
type Characteristic (line 150) | public enum Characteristic {
FILE: duels-plugin/src/main/java/me/realized/duels/kit/KitManagerImpl.java
class KitManagerImpl (line 44) | public class KitManagerImpl implements Loadable, KitManager {
method KitManagerImpl (line 61) | public KitManagerImpl(final DuelsPlugin plugin) {
method handleLoad (line 68) | @Override
method handleUnload (line 98) | @Override
method saveKits (line 107) | void saveKits() {
method get (line 122) | @Nullable
method create (line 129) | public KitImpl create(@NotNull final Player creator, @NotNull final St...
method create (line 147) | @Nullable
method remove (line 153) | @Nullable
method remove (line 174) | @Nullable
method getKits (line 180) | @NotNull
method getNames (line 186) | public List<String> getNames(final boolean nokit) {
FILE: duels-plugin/src/main/java/me/realized/duels/listeners/DamageListener.java
class DamageListener (line 17) | public class DamageListener implements Listener {
method DamageListener (line 21) | public DamageListener(final DuelsPlugin plugin) {
method on (line 29) | @EventHandler(priority = EventPriority.HIGHEST)
FILE: duels-plugin/src/main/java/me/realized/duels/listeners/EnderpearlListener.java
class EnderpearlListener (line 26) | public class EnderpearlListener implements Listener {
method EnderpearlListener (line 35) | public EnderpearlListener(final DuelsPlugin plugin) {
method removeExpired (line 40) | private void removeExpired(final Player player) {
method on (line 51) | @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
method on (line 74) | @EventHandler
method on (line 104) | @EventHandler
method on (line 123) | @EventHandler
class Pearl (line 128) | private static class Pearl {
method Pearl (line 133) | public Pearl(final EnderPearl pearl) {
FILE: duels-plugin/src/main/java/me/realized/duels/listeners/KitItemListener.java
class KitItemListener (line 27) | public class KitItemListener implements Listener {
method KitItemListener (line 37) | public KitItemListener(final DuelsPlugin plugin) {
method isExcluded (line 46) | private boolean isExcluded(final Player player) {
method isKitItem (line 50) | private boolean isKitItem(final ItemStack item) {
method on (line 54) | @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
method on (line 79) | @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
method on (line 99) | @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
FILE: duels-plugin/src/main/java/me/realized/duels/listeners/KitOptionsListener.java
class KitOptionsListener (line 34) | public class KitOptionsListener implements Listener {
method KitOptionsListener (line 42) | public KitOptionsListener(final DuelsPlugin plugin) {
method isEnabled (line 51) | private boolean isEnabled(final ArenaImpl arena, final Characteristic ...
method on (line 56) | @EventHandler
method on (line 72) | @EventHandler
method on (line 90) | @EventHandler
method on (line 133) | @EventHandler(ignoreCancelled = true)
class ComboPre1_14Listener (line 149) | private class ComboPre1_14Listener implements Listener {
method on (line 151) | @EventHandler
method on (line 165) | @EventHandler
class ComboPost1_14Listener (line 191) | private class ComboPost1_14Listener implements Listener {
method on (line 193) | @EventHandler
FILE: duels-plugin/src/main/java/me/realized/duels/listeners/LingerPotionListener.java
class LingerPotionListener (line 16) | public class LingerPotionListener {
method LingerPotionListener (line 21) | public LingerPotionListener(final DuelsPlugin plugin) {
class Post1_9Listener (line 33) | public class Post1_9Listener implements Listener {
method on (line 35) | @EventHandler
FILE: duels-plugin/src/main/java/me/realized/duels/listeners/PotionListener.java
class PotionListener (line 17) | public class PotionListener implements Listener {
method PotionListener (line 22) | public PotionListener(final DuelsPlugin plugin) {
method on (line 31) | @EventHandler
FILE: duels-plugin/src/main/java/me/realized/duels/listeners/ProjectileHitListener.java
class ProjectileHitListener (line 21) | public class ProjectileHitListener implements Listener {
method ProjectileHitListener (line 27) | public ProjectileHitListener(final DuelsPlugin plugin) {
method on (line 37) | @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
FILE: duels-plugin/src/main/java/me/realized/duels/listeners/TeleportListener.java
class TeleportListener (line 21) | public class TeleportListener implements Listener {
method TeleportListener (line 27) | public TeleportListener(final DuelsPlugin plugin) {
method isSimilar (line 37) | private boolean isSimilar(final Location first, final Location second) {
method on (line 41) | @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
FILE: duels-plugin/src/main/java/me/realized/duels/logging/LogManager.java
class LogManager (line 18) | public class LogManager implements LogSource {
method LogManager (line 24) | public LogManager(final DuelsPlugin plugin) throws IOException {
method handleDisable (line 67) | public void handleDisable() {
method debug (line 72) | public void debug(final String s) {
method log (line 76) | @Override
method log (line 81) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/player/PlayerInfo.java
class PlayerInfo (line 17) | public class PlayerInfo {
method PlayerInfo (line 33) | public PlayerInfo(final List<PotionEffect> effects, final double healt...
method PlayerInfo (line 40) | public PlayerInfo(final Player player, final boolean excludeInventory) {
method restore (line 50) | public void restore(final Player player) {
FILE: duels-plugin/src/main/java/me/realized/duels/player/PlayerInfoManager.java
class PlayerInfoManager (line 43) | public class PlayerInfoManager implements Loadable {
method PlayerInfoManager (line 65) | public PlayerInfoManager(final DuelsPlugin plugin) {
method handleLoad (line 73) | @Override
method handleUnload (line 108) | @Override
method setLobby (line 145) | public boolean setLobby(final Player player) {
method get (line 165) | public PlayerInfo get(final Player player) {
method create (line 175) | public void create(final Player player, final boolean excludeInventory) {
method create (line 190) | public void create(final Player player) {
method remove (line 200) | public PlayerInfo remove(final Player player) {
class PlayerInfoListener (line 204) | private class PlayerInfoListener implements Listener {
method on (line 207) | @EventHandler(priority = EventPriority.HIGHEST)
method on (line 225) | @EventHandler(priority = EventPriority.HIGHEST)
FILE: duels-plugin/src/main/java/me/realized/duels/queue/Queue.java
class Queue (line 21) | public class Queue extends BaseButton implements DQueue {
method Queue (line 33) | public Queue(final DuelsPlugin plugin, final Kit kit, final int bet) {
method isInQueue (line 45) | @Override
method getQueuedPlayers (line 50) | @NotNull
method addPlayer (line 56) | void addPlayer(final QueueEntry entry) {
method removePlayer (line 62) | boolean removePlayer(final Player player) {
method removeAll (line 72) | boolean removeAll(final Set<QueueEntry> players) {
method getPlayersInMatch (line 81) | public long getPlayersInMatch() {
method update (line 85) | public void update() {
method onClick (line 94) | @Override
method toString (line 99) | @Override
method equals (line 104) | @Override
method hashCode (line 118) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/queue/QueueEntry.java
class QueueEntry (line 9) | public class QueueEntry {
method QueueEntry (line 16) | QueueEntry(final Player player, final Location location, final String ...
method equals (line 21) | @Override
method hashCode (line 29) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/queue/QueueManager.java
class QueueManager (line 64) | public class QueueManager implements Loadable, DQueueManager, Listener {
method QueueManager (line 91) | public QueueManager(final DuelsPlugin plugin) {
method canFight (line 105) | private boolean canFight(final Kit kit, final UserData first, final Us...
method handleLoad (line 120) | @Override
method handleUnload (line 208) | @Override
method saveQueues (line 219) | private void saveQueues() {
method get (line 234) | @Nullable
method get (line 240) | @Nullable
method randomQueue (line 247) | @Nullable
method create (line 252) | @Nullable
method create (line 270) | @Nullable
method remove (line 276) | @Nullable
method remove (line 282) | @Nullable
method getQueues (line 288) | @NotNull
method isInQueue (line 294) | @Override
method addToQueue (line 300) | @Override
method removeFromQueue (line 307) | @Nullable
method remove (line 314) | public Queue remove(final CommandSender source, final Queue queue) {
method queue (line 330) | public boolean queue(final Player player, final Queue queue) {
method remove (line 395) | public Queue remove(final Player player) {
method on (line 408) | @EventHandler
method on (line 413) | @EventHandler(ignoreCancelled = true)
FILE: duels-plugin/src/main/java/me/realized/duels/queue/sign/QueueSignImpl.java
class QueueSignImpl (line 15) | public class QueueSignImpl implements QueueSign {
method QueueSignImpl (line 30) | public QueueSignImpl(final Location location, final String format, fin...
method replace (line 58) | private String replace(final String line, final int inQueue, final lon...
method update (line 62) | public void update() {
method equals (line 94) | @Override
method hashCode (line 102) | @Override
method toString (line 107) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/queue/sign/QueueSignManagerImpl.java
class QueueSignManagerImpl (line 47) | public class QueueSignManagerImpl implements Loadable, QueueSignManager,...
method QueueSignManagerImpl (line 62) | public QueueSignManagerImpl(final DuelsPlugin plugin) {
method handleLoad (line 71) | @Override
method handleUnload (line 97) | @Override
method saveQueueSigns (line 103) | private void saveQueueSigns() {
method get (line 122) | @Nullable
method get (line 129) | public QueueSignImpl get(final Location location) {
method create (line 133) | public boolean create(final Player creator, final Location location, f...
method remove (line 149) | public QueueSignImpl remove(final Player source, final Location locati...
method getSigns (line 164) | public Collection<QueueSignImpl> getSigns() {
method getQueueSigns (line 168) | @NotNull
method on (line 174) | @EventHandler
method on (line 192) | @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
FILE: duels-plugin/src/main/java/me/realized/duels/request/RequestImpl.java
class RequestImpl (line 12) | public class RequestImpl implements Request {
method RequestImpl (line 23) | RequestImpl(final Player sender, final Player target, final Settings s...
method getKit (line 30) | @Nullable
method getArena (line 36) | @Nullable
method canBetItems (line 42) | @Override
method getBet (line 47) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/request/RequestManager.java
class RequestManager (line 21) | public class RequestManager implements Loadable, Listener {
method RequestManager (line 27) | public RequestManager(final DuelsPlugin plugin) {
method handleLoad (line 33) | @Override
method handleUnload (line 36) | @Override
method get (line 41) | private Map<UUID, RequestImpl> get(final Player player, final boolean ...
method send (line 52) | public void send(final Player sender, final Player target, final Setti...
method get (line 87) | public RequestImpl get(final Player sender, final Player target) {
method has (line 108) | public boolean has(final Player sender, final Player target) {
method remove (line 112) | public RequestImpl remove(final Player sender, final Player target) {
method on (line 133) | @EventHandler
FILE: duels-plugin/src/main/java/me/realized/duels/setting/CachedInfo.java
class CachedInfo (line 7) | public class CachedInfo {
method CachedInfo (line 16) | public CachedInfo(final Location location, final String duelzone) {
method CachedInfo (line 21) | CachedInfo() {
FILE: duels-plugin/src/main/java/me/realized/duels/setting/Settings.java
class Settings (line 15) | public class Settings {
method Settings (line 38) | public Settings(final DuelsPlugin plugin, final Player player) {
method Settings (line 45) | public Settings(final DuelsPlugin plugin) {
method reset (line 49) | public void reset() {
method setTarget (line 58) | public void setTarget(final Player target) {
method updateGui (line 66) | public void updateGui(final Player player) {
method openGui (line 72) | public void openGui(final Player player) {
method setBaseLoc (line 76) | public void setBaseLoc(final Player player) {
method getBaseLoc (line 80) | public Location getBaseLoc(final Player player) {
method setDuelzone (line 90) | public void setDuelzone(final Player player, final String duelzone) {
method getDuelzone (line 94) | public String getDuelzone(final Player player) {
method setKit (line 104) | public void setKit(final KitImpl kit) {
method setOwnInventory (line 109) | public void setOwnInventory(final boolean ownInventory) {
method lightCopy (line 118) | public Settings lightCopy() {
FILE: duels-plugin/src/main/java/me/realized/duels/setting/SettingsManager.java
class SettingsManager (line 14) | public class SettingsManager implements Loadable, Listener {
method SettingsManager (line 19) | public SettingsManager(final DuelsPlugin plugin) {
method handleLoad (line 24) | @Override
method handleUnload (line 27) | @Override
method getSafely (line 33) | public Settings getSafely(final Player player) {
method on (line 37) | @EventHandler
FILE: duels-plugin/src/main/java/me/realized/duels/shaded/bstats/Metrics.java
class Metrics (line 40) | @SuppressWarnings({"WeakerAccess", "unused"})
method Metrics (line 94) | public Metrics(Plugin plugin, int pluginId) {
method isEnabled (line 163) | public boolean isEnabled() {
method addCustomChart (line 172) | public void addCustomChart(CustomChart chart) {
method startSubmitting (line 182) | private void startSubmitting() {
method getPluginData (line 207) | public JsonObject getPluginData() {
method getServerData (line 236) | private JsonObject getServerData() {
method submitData (line 281) | private void submitData() {
method sendData (line 340) | private static void sendData(Plugin plugin, JsonObject data) throws Ex...
method compress (line 390) | private static byte[] compress(final String str) throws IOException {
class CustomChart (line 404) | public static abstract class CustomChart {
method CustomChart (line 414) | CustomChart(String chartId) {
method getRequestJsonObject (line 421) | private JsonObject getRequestJsonObject() {
method getChartData (line 440) | protected abstract JsonObject getChartData() throws Exception;
class SimplePie (line 447) | public static class SimplePie extends CustomChart {
method SimplePie (line 457) | public SimplePie(String chartId, Callable<String> callable) {
method getChartData (line 462) | @Override
class AdvancedPie (line 478) | public static class AdvancedPie extends CustomChart {
method AdvancedPie (line 488) | public AdvancedPie(String chartId, Callable<Map<String, Integer>> ca...
method getChartData (line 493) | @Override
class DrilldownPie (line 522) | public static class DrilldownPie extends CustomChart {
method DrilldownPie (line 532) | public DrilldownPie(String chartId, Callable<Map<String, Map<String,...
method getChartData (line 537) | @Override
class SingleLineChart (line 571) | public static class SingleLineChart extends CustomChart {
method SingleLineChart (line 581) | public SingleLineChart(String chartId, Callable<Integer> callable) {
method getChartData (line 586) | @Override
class MultiLineChart (line 603) | public static class MultiLineChart extends CustomChart {
method MultiLineChart (line 613) | public MultiLineChart(String chartId, Callable<Map<String, Integer>>...
method getChartData (line 618) | @Override
class SimpleBarChart (line 648) | public static class SimpleBarChart extends CustomChart {
method SimpleBarChart (line 658) | public SimpleBarChart(String chartId, Callable<Map<String, Integer>>...
method getChartData (line 663) | @Override
class AdvancedBarChart (line 686) | public static class AdvancedBarChart extends CustomChart {
method AdvancedBarChart (line 696) | public AdvancedBarChart(String chartId, Callable<Map<String, int[]>>...
method getChartData (line 701) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/spectate/SpectateManagerImpl.java
class SpectateManagerImpl (line 54) | public class SpectateManagerImpl implements Loadable, SpectateManager {
method SpectateManagerImpl (line 71) | public SpectateManagerImpl(final DuelsPlugin plugin) {
method handleLoad (line 81) | @Override
method handleUnload (line 89) | @Override
method get (line 94) | @Nullable
method isSpectating (line 101) | @Override
method startSpectating (line 107) | @NotNull
method stopSpectating (line 201) | public void stopSpectating(final Player player, final SpectatorImpl sp...
method stopSpectating (line 249) | @Override
method stopSpectating (line 260) | public void stopSpectating(final ArenaImpl arena) {
method getSpectators (line 279) | @NotNull
method getSpectatorsImpl (line 286) | public Collection<SpectatorImpl> getSpectatorsImpl(final Arena arena) {
method getAllSpectators (line 290) | public Collection<Player> getAllSpectators() {
class SpectateListener (line 297) | private class SpectateListener implements Listener {
method on (line 299) | @EventHandler
method on (line 311) | @EventHandler(ignoreCancelled = true)
method on (line 329) | @EventHandler(ignoreCancelled = true)
method on (line 343) | @EventHandler(ignoreCancelled = true)
method on (line 352) | @EventHandler(ignoreCancelled = true)
method on (line 361) | @EventHandler(ignoreCancelled = true)
method on (line 380) | @EventHandler(ignoreCancelled = true)
method on (line 390) | @EventHandler
FILE: duels-plugin/src/main/java/me/realized/duels/spectate/SpectatorImpl.java
class SpectatorImpl (line 12) | public class SpectatorImpl implements Spectator {
method SpectatorImpl (line 23) | SpectatorImpl(final Player owner, final Player target, final ArenaImpl...
method getPlayer (line 30) | @Nullable
method getTarget (line 36) | @Nullable
method equals (line 42) | @Override
method hashCode (line 56) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/teleport/Teleport.java
class Teleport (line 18) | public final class Teleport implements Loadable, Listener {
method Teleport (line 26) | public Teleport(final DuelsPlugin plugin) {
method handleLoad (line 30) | @Override
method handleUnload (line 38) | @Override
method tryTeleport (line 48) | public void tryTeleport(final Player player, final Location location) {
method on (line 65) | @EventHandler(priority = EventPriority.MONITOR)
FILE: duels-plugin/src/main/java/me/realized/duels/util/BlockUtil.java
class BlockUtil (line 8) | public final class BlockUtil {
method BlockUtil (line 10) | private BlockUtil() {}
method getTargetBlock (line 12) | public static <T extends BlockState> T getTargetBlock(final Player pla...
method near (line 26) | public static boolean near(final Player player, final Block block, fin...
FILE: duels-plugin/src/main/java/me/realized/duels/util/DateUtil.java
class DateUtil (line 6) | public final class DateUtil {
method DateUtil (line 11) | private DateUtil() {}
method formatDate (line 13) | public static String formatDate(final Date date) {
method formatDatetime (line 17) | public static String formatDatetime(final long millis) {
method format (line 21) | public static String format(long seconds) {
method formatMilliseconds (line 72) | public static String formatMilliseconds(long ms) {
FILE: duels-plugin/src/main/java/me/realized/duels/util/EnumUtil.java
class EnumUtil (line 5) | public final class EnumUtil {
method EnumUtil (line 7) | private EnumUtil() {}
method getByName (line 9) | public static <E extends Enum<E>> E getByName(final String name, Class...
FILE: duels-plugin/src/main/java/me/realized/duels/util/EventUtil.java
class EventUtil (line 7) | public final class EventUtil {
method getDamager (line 9) | public static Player getDamager(final EntityDamageByEntityEvent event) {
method EventUtil (line 19) | private EventUtil() {}
FILE: duels-plugin/src/main/java/me/realized/duels/util/Loadable.java
type Loadable (line 3) | public interface Loadable {
method handleLoad (line 5) | void handleLoad() throws Exception;
method handleUnload (line 7) | void handleUnload() throws Exception;
FILE: duels-plugin/src/main/java/me/realized/duels/util/Log.java
class Log (line 9) | public final class Log {
method Log (line 16) | private Log() {}
method addSource (line 18) | public static void addSource(final LogSource source) {
method clearSources (line 22) | public static void clearSources() {
method info (line 26) | public static void info(final String s) {
method info (line 32) | public static void info(final Loadable loadable, final String s) {
method warn (line 38) | public static void warn(final String s) {
method warn (line 48) | public static void warn(final Loadable loadable, final String s) {
method error (line 52) | public static void error(final String s, final Throwable thrown) {
method error (line 64) | public static void error(final String s) {
method error (line 68) | public static void error(final Loadable loadable, final String s, fina...
method error (line 72) | public static void error(final Loadable loadable, final String s) {
type LogSource (line 76) | public interface LogSource {
method log (line 78) | void log(final Level level, final String s);
method log (line 80) | void log(final Level level, final String s, final Throwable thrown);
FILE: duels-plugin/src/main/java/me/realized/duels/util/NumberUtil.java
class NumberUtil (line 5) | public final class NumberUtil {
method parseInt (line 13) | public static OptionalInt parseInt(final String s) {
method getChange (line 71) | public static int getChange(final int k, final int winnerRating, final...
method r (line 77) | private static double r(final int rating) {
method isLower (line 81) | public static boolean isLower(String version, String otherVersion) {
method NumberUtil (line 87) | private NumberUtil() {}
FILE: duels-plugin/src/main/java/me/realized/duels/util/PlayerUtil.java
class PlayerUtil (line 11) | public final class PlayerUtil {
method getMaxHealth (line 18) | public static double getMaxHealth(final Player player) {
method setMaxHealth (line 32) | private static void setMaxHealth(final Player player) {
method reset (line 36) | public static void reset(final Player player) {
method PlayerUtil (line 56) | private PlayerUtil() {}
FILE: duels-plugin/src/main/java/me/realized/duels/util/Reloadable.java
type Reloadable (line 3) | public interface Reloadable {}
FILE: duels-plugin/src/main/java/me/realized/duels/util/StringUtil.java
class StringUtil (line 11) | public final class StringUtil {
method StringUtil (line 34) | private StringUtil() {}
method toRoman (line 37) | public static String toRoman(final int number) {
method fromList (line 51) | public static String fromList(final List<?> list) {
method parse (line 63) | public static String parse(final Location location) {
method color (line 67) | public static String color(final String input) {
method color (line 71) | public static List<String> color(final List<String> input) {
method isAlphanumeric (line 76) | public static boolean isAlphanumeric(final String input) {
method join (line 81) | public static String join(final Object[] array, final String separator...
method join (line 89) | public static String join(final Collection<?> collection, final String...
method capitalize (line 97) | public static String capitalize(final String s) {
method containsIgnoreCase (line 105) | public static boolean containsIgnoreCase(final String str, final Strin...
FILE: duels-plugin/src/main/java/me/realized/duels/util/TextBuilder.java
class TextBuilder (line 13) | public final class TextBuilder {
method TextBuilder (line 17) | private TextBuilder(final String base,
method of (line 38) | public static TextBuilder of(final String base,
method of (line 45) | public static TextBuilder of(final String base) {
method add (line 49) | public TextBuilder add(final String text) {
method add (line 58) | public TextBuilder add(final String text, final ClickEvent.Action acti...
method add (line 70) | public TextBuilder add(final String text, final HoverEvent.Action acti...
method add (line 82) | public TextBuilder add(final String text,
method setClickEvent (line 104) | public TextBuilder setClickEvent(final ClickEvent.Action action, final...
method setHoverEvent (line 113) | public TextBuilder setHoverEvent(final HoverEvent.Action action, final...
method send (line 122) | public void send(final Collection<Player> players) {
method send (line 131) | public void send(final Player... players) {
FILE: duels-plugin/src/main/java/me/realized/duels/util/UUIDUtil.java
class UUIDUtil (line 6) | public final class UUIDUtil {
method UUIDUtil (line 9) | private UUIDUtil() {}
method parseUUID (line 11) | public static UUID parseUUID(final String s) {
FILE: duels-plugin/src/main/java/me/realized/duels/util/UpdateChecker.java
class UpdateChecker (line 10) | public final class UpdateChecker {
method UpdateChecker (line 17) | public UpdateChecker(final Plugin plugin, final int id) {
method check (line 22) | public void check(final BiConsumer<Boolean, String> callback) {
FILE: duels-plugin/src/main/java/me/realized/duels/util/collection/StreamUtil.java
class StreamUtil (line 9) | public class StreamUtil {
method asStream (line 11) | public static <T> Stream<T> asStream(final Iterable<T> iterable) {
method asStream (line 15) | public static <T> Stream<T> asStream(final Iterator<T> iterator) {
method asStream (line 19) | public static <T> Stream<T> asStream(final Spliterator<T> spliterator) {
FILE: duels-plugin/src/main/java/me/realized/duels/util/command/AbstractCommand.java
class AbstractCommand (line 20) | public abstract class AbstractCommand<P extends JavaPlugin> implements T...
method AbstractCommand (line 41) | protected AbstractCommand(final P plugin, final String name, final Str...
method AbstractCommand (line 57) | protected AbstractCommand(final P plugin, final SubCommand sub) {
method child (line 61) | @SafeVarargs
method isChild (line 84) | public boolean isChild(final String name) {
method getCommand (line 88) | private PluginCommand getCommand() {
method register (line 98) | public final void register() {
method onTabComplete (line 163) | @Override
method executeFirst (line 181) | protected boolean executeFirst(final CommandSender sender, final Strin...
method execute (line 185) | protected abstract void execute(final CommandSender sender, final Stri...
method handleMessage (line 187) | protected void handleMessage(final CommandSender sender, final Message...
type MessageType (line 191) | protected enum MessageType {
method MessageType (line 200) | MessageType(final String defaultMessage) {
FILE: duels-plugin/src/main/java/me/realized/duels/util/compat/CompatUtil.java
class CompatUtil (line 10) | public final class CompatUtil {
method is1_13 (line 23) | public static boolean is1_13() {
method isPre1_14 (line 27) | public static boolean isPre1_14() {
method isPre1_13 (line 31) | public static boolean isPre1_13() {
method isPre1_12 (line 35) | public static boolean isPre1_12() {
method isPre1_10 (line 39) | public static boolean isPre1_10() {
method isPre1_9 (line 43) | public static boolean isPre1_9() {
method hasAttributes (line 47) | public static boolean hasAttributes() {
method hasItemFlag (line 51) | public static boolean hasItemFlag() {
method hasSendTitle (line 55) | public static boolean hasSendTitle() {
method hasHidePlayer (line 59) | public static boolean hasHidePlayer() {
method hasSetCollidable (line 63) | public static boolean hasSetCollidable() {
method hasGetPlayer (line 67) | public static boolean hasGetPlayer() {
method CompatUtil (line 71) | private CompatUtil() {}
FILE: duels-plugin/src/main/java/me/realized/duels/util/compat/Identifiers.java
class Identifiers (line 10) | public final class Identifiers {
method addIdentifier (line 14) | public static ItemStack addIdentifier(final ItemStack item) {
method hasIdentifier (line 28) | public static boolean hasIdentifier(final ItemStack item) {
method removeIdentifier (line 38) | public static ItemStack removeIdentifier(final ItemStack item) {
method Identifiers (line 50) | private Identifiers() {}
FILE: duels-plugin/src/main/java/me/realized/duels/util/compat/Inventories.java
class Inventories (line 9) | public final class Inventories {
method setTitle (line 21) | public static void setTitle(final Inventory inventory, final String ti...
method Inventories (line 36) | private Inventories() {}
FILE: duels-plugin/src/main/java/me/realized/duels/util/compat/Items.java
class Items (line 11) | public final class Items {
method equals (line 54) | public static boolean equals(final ItemStack item, final ItemStack oth...
method from (line 58) | public static ItemStack from(final String type, final short data) {
method getDurability (line 66) | public static short getDurability(final ItemStack item) {
method setDurability (line 75) | public static void setDurability(final ItemStack item, final short dur...
method isHealSplash (line 89) | public static boolean isHealSplash(final ItemStack item) {
method Items (line 102) | private Items() {}
FILE: duels-plugin/src/main/java/me/realized/duels/util/compat/Panes.java
class Panes (line 7) | public final class Panes {
method from (line 30) | public static Material from(final short data) {
method Panes (line 34) | private Panes() {}
FILE: duels-plugin/src/main/java/me/realized/duels/util/compat/Skulls.java
class Skulls (line 19) | public final class Skulls {
method load (line 31) | @Override
method getProfile (line 47) | private static GameProfile getProfile(final Player player) throws Invo...
method setProfile (line 57) | public static void setProfile(final SkullMeta meta, final Player playe...
method Skulls (line 73) | private Skulls() {}
FILE: duels-plugin/src/main/java/me/realized/duels/util/compat/Titles.java
class Titles (line 11) | public final class Titles {
method Titles (line 49) | private Titles() {}
method send (line 51) | public static void send(final Player player, final String title, final...
FILE: duels-plugin/src/main/java/me/realized/duels/util/compat/nbt/NBT.java
class NBT (line 11) | public final class NBT {
method setItemString (line 38) | public static ItemStack setItemString(final ItemStack item, final Stri...
method removeItemTag (line 56) | public static ItemStack removeItemTag(final ItemStack item, final Stri...
method hasItemKey (line 74) | public static boolean hasItemKey(final ItemStack item, final String ke...
method NBT (line 90) | private NBT() {}
FILE: duels-plugin/src/main/java/me/realized/duels/util/config/AbstractConfiguration.java
class AbstractConfiguration (line 37) | public abstract class AbstractConfiguration<P extends JavaPlugin> implem...
method AbstractConfiguration (line 53) | public AbstractConfiguration(final P plugin, final String name) {
method handleLoad (line 59) | @Override
method handleUnload (line 68) | @Override
method loadValues (line 71) | protected abstract void loadValues(final FileConfiguration configurati...
method getLatestVersion (line 73) | protected int getLatestVersion() throws Exception {
method convert (line 85) | protected FileConfiguration convert(final Converter converter) throws ...
method transferredSections (line 211) | protected Set<String> transferredSections() {
FILE: duels-plugin/src/main/java/me/realized/duels/util/config/convert/Converter.java
type Converter (line 5) | public interface Converter {
method renamedKeys (line 7) | Map<String, String> renamedKeys();
FILE: duels-plugin/src/main/java/me/realized/duels/util/function/Pair.java
class Pair (line 6) | public class Pair<K, V> {
method Pair (line 15) | public Pair(final K key, final V value) {
FILE: duels-plugin/src/main/java/me/realized/duels/util/function/TriFunction.java
type TriFunction (line 6) | @FunctionalInterface
method apply (line 9) | R apply(S s, T t, U u);
method andThen (line 11) | default <V> TriFunction<S, T, U, V> andThen(Function<? super R, ? exte...
FILE: duels-plugin/src/main/java/me/realized/duels/util/gui/AbstractGui.java
class AbstractGui (line 15) | public abstract class AbstractGui<P extends JavaPlugin> {
method AbstractGui (line 24) | public AbstractGui(final P plugin) {
method open (line 29) | public abstract void open(final Player... players);
method isPart (line 31) | public abstract boolean isPart(final Inventory inventory);
method on (line 33) | public abstract void on(final Player player, final Inventory top, fina...
method on (line 35) | public void on(final Player player, final Inventory inventory, final I...
method on (line 37) | public void on(final Player player, final Set<Integer> rawSlots, final...
method get (line 41) | public Button<P> get(final Inventory inventory, final int slot) {
method set (line 46) | public void set(final Inventory inventory, final int slot, final Butto...
method set (line 51) | public void set(final Inventory inventory, final int from, final int t...
method set (line 55) | public void set(final Inventory inventory, final int from, final int t...
method remove (line 59) | public void remove(final Inventory inventory) {
method remove (line 63) | public Button<P> remove(final Inventory inventory, final int slot) {
method update (line 68) | public void update(final Player player, final Inventory inventory, fin...
method update (line 79) | public void update(final Player player) {
method clear (line 86) | public void clear() {
FILE: duels-plugin/src/main/java/me/realized/duels/util/gui/Button.java
class Button (line 22) | public class Button<P extends JavaPlugin> {
method Button (line 29) | public Button(final P plugin, final ItemStack displayed) {
method editMeta (line 34) | protected void editMeta(final Consumer<ItemMeta> consumer) {
method setDisplayName (line 40) | protected void setDisplayName(final String name) {
method setLore (line 44) | protected void setLore(final List<String> lore) {
method setLore (line 48) | protected void setLore(final String... lore) {
method setOwner (line 52) | protected void setOwner(final Player player) {
method setGlow (line 58) | protected void setGlow(final boolean glow) {
method update (line 85) | public void update(final Player player) {}
method onClick (line 87) | public void onClick(final Player player) {}
FILE: duels-plugin/src/main/java/me/realized/duels/util/gui/GuiListener.java
class GuiListener (line 22) | public class GuiListener<P extends JavaPlugin> implements Loadable, List...
method GuiListener (line 27) | public GuiListener(final P plugin) {
method handleLoad (line 31) | @Override
method handleUnload (line 34) | @Override
method addGui (line 42) | public void addGui(final AbstractGui<P> gui) {
method addGui (line 49) | public <T extends AbstractGui<P>> T addGui(final Player player, final ...
method addGui (line 62) | public <T extends AbstractGui<P>> T addGui(final Player player, final ...
method removeGui (line 66) | public void removeGui(final AbstractGui<P> gui) {
method removeGui (line 71) | public void removeGui(final Player player, final AbstractGui<P> gui) {
method get (line 81) | private List<AbstractGui<P>> get(final Player player) {
method on (line 91) | @EventHandler
method on (line 104) | @EventHandler
method on (line 117) | @EventHandler
method on (line 130) | @EventHandler
FILE: duels-plugin/src/main/java/me/realized/duels/util/gui/MultiPageGui.java
class MultiPageGui (line 19) | public class MultiPageGui<P extends JavaPlugin> extends AbstractGui<P> {
method MultiPageGui (line 39) | public MultiPageGui(final P plugin, final String title, final int rows...
method calculatePages (line 65) | public void calculatePages() {
method createPage (line 125) | private PageNode createPage(final int page, final int total) {
method getSpaceFiller (line 132) | private ItemStack getSpaceFiller() {
method open (line 136) | @Override
method isPart (line 143) | @Override
method on (line 148) | @Override
class PageNode (line 185) | private class PageNode {
method PageNode (line 190) | PageNode(final Inventory inventory) {
method setEmpty (line 194) | void setEmpty() {
method resetNext (line 210) | void resetNext() {
method setTitle (line 227) | void setTitle(final String title) {
method clear (line 231) | void clear() {
method resetBottom (line 239) | void resetBottom() {
method forEach (line 243) | void forEach(final Consumer<PageNode> consumer) {
method find (line 251) | PageNode find(final Inventory inventory) {
method isPart (line 263) | boolean isPart(final Inventory inventory) {
FILE: duels-plugin/src/main/java/me/realized/duels/util/gui/SinglePageGui.java
class SinglePageGui (line 10) | public class SinglePageGui<P extends JavaPlugin> extends AbstractGui<P> {
method SinglePageGui (line 14) | public SinglePageGui(final P plugin, final String title, final int row...
method set (line 19) | protected void set(final int slot, final Button<P> button) {
method set (line 23) | protected void set(final int from, final int to, final int height, fin...
method update (line 27) | public void update(final Player player, final Button<P> button) {
method open (line 31) | @Override
method isPart (line 39) | @Override
method on (line 44) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/util/hook/AbstractHookManager.java
class AbstractHookManager (line 9) | public abstract class AbstractHookManager<P extends JavaPlugin> {
method AbstractHookManager (line 14) | public AbstractHookManager(final P plugin) {
method register (line 18) | protected void register(final String name, final Class<? extends Plugi...
method getHook (line 41) | public <T extends PluginHook<P>> T getHook(Class<T> clazz) {
FILE: duels-plugin/src/main/java/me/realized/duels/util/hook/PluginHook.java
class PluginHook (line 7) | public class PluginHook<P extends JavaPlugin> {
method PluginHook (line 13) | public PluginHook(final P plugin, final String name) {
method getName (line 18) | public String getName() {
method getPlugin (line 22) | public Plugin getPlugin() {
FILE: duels-plugin/src/main/java/me/realized/duels/util/inventory/InventoryBuilder.java
class InventoryBuilder (line 7) | public final class InventoryBuilder {
method InventoryBuilder (line 11) | private InventoryBuilder(final String title, final int size) {
method of (line 15) | public static InventoryBuilder of(final String title, final int size) {
method set (line 19) | public InventoryBuilder set(final int slot, final ItemStack item) {
method fillRange (line 24) | public InventoryBuilder fillRange(final int from, final int to, final ...
method build (line 29) | public Inventory build() {
FILE: duels-plugin/src/main/java/me/realized/duels/util/inventory/InventoryUtil.java
class InventoryUtil (line 13) | public final class InventoryUtil {
method addToMap (line 18) | public static void addToMap(final PlayerInventory inventory, final Map...
method fillFromMap (line 48) | public static void fillFromMap(final PlayerInventory inventory, final ...
method hasItem (line 66) | public static boolean hasItem(final Player player) {
method addOrDrop (line 78) | public static boolean addOrDrop(final Player player, final Collection<...
method getItemInHand (line 92) | public static ItemStack getItemInHand(final Player player) {
method InventoryUtil (line 96) | private InventoryUtil() {}
FILE: duels-plugin/src/main/java/me/realized/duels/util/inventory/ItemBuilder.java
class ItemBuilder (line 26) | public final class ItemBuilder {
method ItemBuilder (line 30) | private ItemBuilder(final Material type, final int amount, final short...
method ItemBuilder (line 35) | private ItemBuilder(final String type, final int amount, final short d...
method ItemBuilder (line 39) | private ItemBuilder(final ItemStack item) {
method of (line 43) | public static ItemBuilder of(final Material type) {
method of (line 47) | public static ItemBuilder of(final Material type, final int amount) {
method of (line 51) | public static ItemBuilder of(final Material type, final int amount, fi...
method of (line 55) | public static ItemBuilder of(final String type, final int amount, fina...
method of (line 59) | public static ItemBuilder of(final ItemStack item) {
method editMeta (line 63) | public ItemBuilder editMeta(final Consumer<ItemMeta> consumer) {
method name (line 70) | public ItemBuilder name(final String name) {
method lore (line 74) | public ItemBuilder lore(final List<String> lore) {
method lore (line 78) | public ItemBuilder lore(final String... lore) {
method enchant (line 82) | public ItemBuilder enchant(final Enchantment enchantment, final int le...
method unbreakable (line 87) | public ItemBuilder unbreakable() {
method head (line 97) | public ItemBuilder head(final String owner) {
method leatherArmorColor (line 106) | public ItemBuilder leatherArmorColor(final String color) {
method potion (line 116) | public ItemBuilder potion(final PotionType type, final boolean extende...
method attribute (line 123) | public ItemBuilder attribute(final String name, final int operation, f...
method attributeNameToEnum (line 149) | private String attributeNameToEnum(String name) {
method build (line 167) | public ItemStack build() {
FILE: duels-plugin/src/main/java/me/realized/duels/util/inventory/ItemUtil.java
class ItemUtil (line 9) | public final class ItemUtil {
method itemFrom64 (line 11) | public static ItemStack itemFrom64(final String data) {
method ItemUtil (line 23) | private ItemUtil() {}
FILE: duels-plugin/src/main/java/me/realized/duels/util/inventory/Slots.java
class Slots (line 5) | public final class Slots {
method Slots (line 7) | private Slots() {}
method run (line 9) | public static void run(final int from, final int to, final int height,...
method run (line 17) | public static void run(final int from, final int to, final Consumer<In...
FILE: duels-plugin/src/main/java/me/realized/duels/util/io/FileUtil.java
class FileUtil (line 6) | public final class FileUtil {
method checkNonEmpty (line 8) | public static boolean checkNonEmpty(final File file, final boolean cre...
method FileUtil (line 19) | private FileUtil() {}
FILE: duels-plugin/src/main/java/me/realized/duels/util/json/DefaultBasedDeserializer.java
class DefaultBasedDeserializer (line 9) | public abstract class DefaultBasedDeserializer<T> extends StdDeserialize...
method DefaultBasedDeserializer (line 14) | public DefaultBasedDeserializer(final Class<T> target, final JsonDeser...
method getTarget (line 20) | public Class<T> getTarget() {
method resolve (line 24) | @Override
FILE: duels-plugin/src/main/java/me/realized/duels/util/json/JsonUtil.java
class JsonUtil (line 23) | public final class JsonUtil {
method getObjectMapper (line 41) | public static ObjectMapper getObjectMapper() {
method getObjectWriter (line 45) | public static ObjectWriter getObjectWriter() {
method registerDeserializer (line 49) | public static <T> void registerDeserializer(final Class<T> type, final...
method buildDefaultPrettyPrinter (line 70) | private static PrettyPrinter buildDefaultPrettyPrinter() {
method JsonUtil (line 92) | private JsonUtil() {}
FILE: duels-plugin/src/main/java/me/realized/duels/util/metadata/MetadataUtil.java
class MetadataUtil (line 8) | public final class MetadataUtil {
method MetadataUtil (line 10) | private MetadataUtil() {}
method get (line 12) | public static Object get(final Plugin plugin, final Entity entity, fin...
method put (line 16) | public static void put(final Plugin plugin, final Entity entity, final...
method remove (line 20) | public static void remove(final Plugin plugin, final Entity entity, fi...
method removeAndGet (line 24) | public static Object removeAndGet(final Plugin plugin, final Entity en...
FILE: duels-plugin/src/main/java/me/realized/duels/util/reflect/ReflectionUtil.java
class ReflectionUtil (line 10) | public final class ReflectionUtil {
method getMajorVersion (line 21) | public static int getMajorVersion() {
method getClassUnsafe (line 25) | public static Class<?> getClassUnsafe(final String name) {
method getMethodUnsafe (line 33) | public static Method getMethodUnsafe(final Class<?> clazz, final Strin...
method getNMSClass (line 41) | public static Class<?> getNMSClass(final String name, final boolean lo...
method getNMSClass (line 53) | public static Class<?> getNMSClass(final String name) {
method getCBClass (line 57) | public static Class<?> getCBClass(final String path, final boolean log...
method getCBClass (line 69) | public static Class<?> getCBClass(final String path) {
method getMethod (line 73) | public static Method getMethod(final Class<?> clazz, final String name...
method findDeclaredMethod (line 82) | private static Method findDeclaredMethod(final Class<?> clazz, final S...
method getDeclaredMethod (line 88) | public static Method getDeclaredMethod(final Class<?> clazz, final Str...
method getDeclaredMethodUnsafe (line 97) | public static Method getDeclaredMethodUnsafe(final Class<?> clazz, fin...
method getField (line 105) | public static Field getField(final Class<?> clazz, final String name) {
method getDeclaredField (line 114) | public static Field getDeclaredField(final Class<?> clazz, final Strin...
method getConstructor (line 125) | public static Constructor<?> getConstructor(final Class<?> clazz, fina...
method ReflectionUtil (line 134) | private ReflectionUtil() {}
FILE: duels-plugin/src/main/java/me/realized/duels/util/yaml/YamlUtil.java
class YamlUtil (line 10) | public final class YamlUtil {
method yamlDump (line 25) | public static String yamlDump(final Object object) {
method bukkitYamlDump (line 29) | public static String bukkitYamlDump(final Object object) {
method yamlLoad (line 33) | public static <T> T yamlLoad(final String yaml) {
method bukkitYamlLoad (line 37) | public static <T> T bukkitYamlLoad(final String yaml) {
method yamlLoadAs (line 41) | public static <T> T yamlLoadAs(final String yaml, final Class<T> type) {
method bukkitYamlLoadAs (line 45) | public static <T> T bukkitYamlLoadAs(final String yaml, final Class<T>...
class YamlBukkitConstructor (line 49) | private static class YamlBukkitConstructor extends YamlConstructor {
method YamlBukkitConstructor (line 51) | public YamlBukkitConstructor() {
method YamlUtil (line 56) | private YamlUtil() {}
FILE: duels-worldguard-v6/src/main/java/me/realized/duels/hook/hooks/worldguard/WorldGuard6Handler.java
class WorldGuard6Handler (line 8) | public class WorldGuard6Handler implements WorldGuardHandler {
method findRegion (line 10) | @Override
FILE: duels-worldguard-v7/src/main/java/me/realized/duels/hook/hooks/worldguard/WorldGuard7Handler.java
class WorldGuard7Handler (line 11) | public class WorldGuard7Handler implements WorldGuardHandler {
method findRegion (line 13) | @Override
FILE: duels-worldguard/src/main/java/me/realized/duels/hook/hooks/worldguard/WorldGuardHandler.java
type WorldGuardHandler (line 6) | public interface WorldGuardHandler {
method findRegion (line 8) | String findRegion(final Player player, final Collection<String> regions);
Condensed preview — 256 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (771K chars).
[
{
"path": ".gitignore",
"chars": 38,
"preview": ".DS_Store\n.gradle/\n.idea/\nbuild/\nout/\n"
},
{
"path": "LICENSE.md",
"chars": 35146,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
},
{
"path": "README.md",
"chars": 1659,
"preview": "<h1>Duels</h1> \n\n[](https://jitpack.io/#Realizedd/Duels)\n\nA duel plugin for"
},
{
"path": "build.gradle",
"chars": 1465,
"preview": "buildscript {\n repositories {\n mavenCentral()\n gradlePluginPortal()\n }\n\n dependencies {\n c"
},
{
"path": "duels-api/build.gradle",
"chars": 394,
"preview": "dependencies {\n compileOnly 'org.jetbrains:annotations-java5:22.0.0'\n implementation 'org.spigotmc:spigot-api:1.14"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/Duels.java",
"chars": 5609,
"preview": "package me.realized.duels.api;\n\nimport me.realized.duels.api.arena.ArenaManager;\nimport me.realized.duels.api.command.Su"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/arena/Arena.java",
"chars": 4177,
"preview": "package me.realized.duels.api.arena;\n\nimport me.realized.duels.api.event.arena.ArenaRemoveEvent;\nimport me.realized.duel"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/arena/ArenaManager.java",
"chars": 1560,
"preview": "package me.realized.duels.api.arena;\n\nimport java.util.List;\nimport org.bukkit.entity.Player;\nimport org.jetbrains.annot"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/command/SubCommand.java",
"chars": 3246,
"preview": "package me.realized.duels.api.command;\n\nimport java.util.Objects;\nimport me.realized.duels.api.Duels;\nimport org.bukkit."
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/SourcedEvent.java",
"chars": 861,
"preview": "package me.realized.duels.api.event;\n\nimport org.bukkit.command.CommandSender;\nimport org.bukkit.event.Event;\nimport org"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/arena/ArenaCreateEvent.java",
"chars": 725,
"preview": "package me.realized.duels.api.event.arena;\n\nimport me.realized.duels.api.arena.Arena;\nimport org.bukkit.command.CommandS"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/arena/ArenaEvent.java",
"chars": 855,
"preview": "package me.realized.duels.api.event.arena;\n\nimport java.util.Objects;\nimport me.realized.duels.api.arena.Arena;\nimport m"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/arena/ArenaRemoveEvent.java",
"chars": 751,
"preview": "package me.realized.duels.api.event.arena;\n\nimport me.realized.duels.api.arena.Arena;\nimport org.bukkit.command.CommandS"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/arena/ArenaSetPositionEvent.java",
"chars": 2185,
"preview": "package me.realized.duels.api.event.arena;\n\nimport java.util.Objects;\nimport me.realized.duels.api.arena.Arena;\nimport o"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/arena/ArenaStateChangeEvent.java",
"chars": 1631,
"preview": "package me.realized.duels.api.event.arena;\n\nimport me.realized.duels.api.arena.Arena;\nimport org.bukkit.command.CommandS"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/kit/KitCreateEvent.java",
"chars": 961,
"preview": "package me.realized.duels.api.event.kit;\n\nimport java.util.Objects;\nimport me.realized.duels.api.kit.Kit;\nimport me.real"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/kit/KitEquipEvent.java",
"chars": 1351,
"preview": "package me.realized.duels.api.event.kit;\n\nimport java.util.Objects;\nimport me.realized.duels.api.kit.Kit;\nimport org.buk"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/kit/KitEvent.java",
"chars": 817,
"preview": "package me.realized.duels.api.event.kit;\n\nimport java.util.Objects;\nimport me.realized.duels.api.event.SourcedEvent;\nimp"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/kit/KitRemoveEvent.java",
"chars": 822,
"preview": "package me.realized.duels.api.event.kit;\n\nimport me.realized.duels.api.kit.Kit;\nimport me.realized.duels.api.kit.KitMana"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/match/MatchEndEvent.java",
"chars": 2074,
"preview": "package me.realized.duels.api.event.match;\n\nimport java.util.Objects;\nimport java.util.UUID;\nimport me.realized.duels.ap"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/match/MatchEvent.java",
"chars": 672,
"preview": "package me.realized.duels.api.event.match;\n\nimport java.util.Objects;\nimport me.realized.duels.api.match.Match;\nimport o"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/match/MatchStartEvent.java",
"chars": 1043,
"preview": "package me.realized.duels.api.event.match;\n\nimport java.util.Objects;\nimport me.realized.duels.api.match.Match;\nimport o"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/queue/QueueCreateEvent.java",
"chars": 869,
"preview": "package me.realized.duels.api.event.queue;\n\nimport me.realized.duels.api.kit.Kit;\nimport me.realized.duels.api.queue.DQu"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/queue/QueueEvent.java",
"chars": 881,
"preview": "package me.realized.duels.api.event.queue;\n\nimport java.util.Objects;\nimport me.realized.duels.api.event.SourcedEvent;\ni"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/queue/QueueJoinEvent.java",
"chars": 1459,
"preview": "package me.realized.duels.api.event.queue;\n\nimport java.util.Objects;\nimport me.realized.duels.api.queue.DQueue;\nimport "
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/queue/QueueLeaveEvent.java",
"chars": 1172,
"preview": "package me.realized.duels.api.event.queue;\n\nimport java.util.Objects;\nimport me.realized.duels.api.queue.DQueue;\nimport "
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/queue/QueueRemoveEvent.java",
"chars": 912,
"preview": "package me.realized.duels.api.event.queue;\n\nimport me.realized.duels.api.kit.Kit;\nimport me.realized.duels.api.queue.DQu"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/queue/sign/QueueSignCreateEvent.java",
"chars": 723,
"preview": "package me.realized.duels.api.event.queue.sign;\n\nimport me.realized.duels.api.queue.sign.QueueSign;\nimport org.bukkit.en"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/queue/sign/QueueSignEvent.java",
"chars": 1247,
"preview": "package me.realized.duels.api.event.queue.sign;\n\nimport java.util.Objects;\nimport me.realized.duels.api.event.SourcedEve"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/queue/sign/QueueSignRemoveEvent.java",
"chars": 753,
"preview": "package me.realized.duels.api.event.queue.sign;\n\nimport me.realized.duels.api.queue.sign.QueueSign;\nimport org.bukkit.en"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/request/RequestAcceptEvent.java",
"chars": 1626,
"preview": "package me.realized.duels.api.event.request;\n\nimport me.realized.duels.api.request.Request;\nimport org.bukkit.entity.Pla"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/request/RequestDenyEvent.java",
"chars": 987,
"preview": "package me.realized.duels.api.event.request;\n\nimport me.realized.duels.api.request.Request;\nimport org.bukkit.entity.Pla"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/request/RequestEvent.java",
"chars": 1552,
"preview": "package me.realized.duels.api.event.request;\n\nimport java.util.Objects;\nimport me.realized.duels.api.event.SourcedEvent;"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/request/RequestSendEvent.java",
"chars": 1300,
"preview": "package me.realized.duels.api.event.request;\n\nimport me.realized.duels.api.request.Request;\nimport org.bukkit.entity.Pla"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/spectate/SpectateEndEvent.java",
"chars": 688,
"preview": "package me.realized.duels.api.event.spectate;\n\nimport me.realized.duels.api.spectate.Spectator;\nimport org.bukkit.entity"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/spectate/SpectateEvent.java",
"chars": 1064,
"preview": "package me.realized.duels.api.event.spectate;\n\nimport java.util.Objects;\nimport me.realized.duels.api.event.SourcedEvent"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/spectate/SpectateStartEvent.java",
"chars": 974,
"preview": "package me.realized.duels.api.event.spectate;\n\nimport me.realized.duels.api.spectate.Spectator;\nimport org.bukkit.entity"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/event/user/UserCreateEvent.java",
"chars": 910,
"preview": "package me.realized.duels.api.event.user;\n\nimport java.util.Objects;\nimport me.realized.duels.api.user.User;\nimport org."
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/extension/DuelsExtension.java",
"chars": 4501,
"preview": "package me.realized.duels.api.extension;\n\nimport java.io.File;\nimport java.io.FileOutputStream;\nimport java.io.IOExcepti"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/kit/Kit.java",
"chars": 2373,
"preview": "package me.realized.duels.api.kit;\n\nimport me.realized.duels.api.event.kit.KitEquipEvent;\nimport org.bukkit.command.Comm"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/kit/KitManager.java",
"chars": 2173,
"preview": "package me.realized.duels.api.kit;\n\nimport java.util.List;\nimport me.realized.duels.api.event.kit.KitCreateEvent;\nimport"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/match/Match.java",
"chars": 2500,
"preview": "package me.realized.duels.api.match;\n\nimport java.util.List;\nimport java.util.Set;\nimport me.realized.duels.api.arena.Ar"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/queue/DQueue.java",
"chars": 1410,
"preview": "package me.realized.duels.api.queue;\n\nimport java.util.List;\nimport me.realized.duels.api.kit.Kit;\nimport org.bukkit.ent"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/queue/DQueueManager.java",
"chars": 3821,
"preview": "package me.realized.duels.api.queue;\n\nimport java.util.List;\nimport me.realized.duels.api.event.queue.QueueCreateEvent;\n"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/queue/sign/QueueSign.java",
"chars": 945,
"preview": "package me.realized.duels.api.queue.sign;\n\nimport me.realized.duels.api.event.queue.sign.QueueSignRemoveEvent;\nimport me"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/queue/sign/QueueSignManager.java",
"chars": 869,
"preview": "package me.realized.duels.api.queue.sign;\n\nimport java.util.List;\nimport org.bukkit.block.Sign;\nimport org.jetbrains.ann"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/request/Request.java",
"chars": 1556,
"preview": "package me.realized.duels.api.request;\n\nimport java.util.UUID;\nimport me.realized.duels.api.arena.Arena;\nimport me.reali"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/spectate/SpectateManager.java",
"chars": 2701,
"preview": "package me.realized.duels.api.spectate;\n\nimport java.util.List;\nimport me.realized.duels.api.arena.Arena;\nimport me.real"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/spectate/Spectator.java",
"chars": 1378,
"preview": "package me.realized.duels.api.spectate;\n\nimport java.util.UUID;\nimport me.realized.duels.api.arena.Arena;\nimport org.buk"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/user/MatchInfo.java",
"chars": 1334,
"preview": "package me.realized.duels.api.user;\n\nimport java.util.GregorianCalendar;\nimport org.jetbrains.annotations.NotNull;\nimpor"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/user/User.java",
"chars": 2494,
"preview": "package me.realized.duels.api.user;\n\nimport java.util.List;\nimport java.util.UUID;\nimport me.realized.duels.api.kit.Kit;"
},
{
"path": "duels-api/src/main/java/me/realized/duels/api/user/UserManager.java",
"chars": 5466,
"preview": "package me.realized.duels.api.user;\n\nimport java.util.List;\nimport java.util.Objects;\nimport java.util.UUID;\nimport me.r"
},
{
"path": "duels-plugin/build.gradle",
"chars": 2593,
"preview": "import org.apache.tools.ant.filters.ReplaceTokens\n\nclean.doFirst {\n delete \"$rootDir/out/\"\n}\n\nprocessResources {\n "
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/DuelsPlugin.java",
"chars": 16839,
"preview": "package me.realized.duels;\n\nimport com.google.common.collect.Lists;\nimport java.io.IOException;\nimport java.util.ArrayLi"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/Permissions.java",
"chars": 1214,
"preview": "package me.realized.duels;\n\npublic final class Permissions {\n\n public static final String DUEL = \"duels.duel\";\n pu"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/api/DuelsAPI.java",
"chars": 1457,
"preview": "package me.realized.duels.api;\n\nimport java.util.UUID;\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.ap"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/arena/ArenaImpl.java",
"chars": 8328,
"preview": "package me.realized.duels.arena;\n\nimport com.google.common.collect.Lists;\nimport java.util.Collections;\nimport java.util"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/arena/ArenaManagerImpl.java",
"chars": 10328,
"preview": "package me.realized.duels.arena;\n\nimport com.fasterxml.jackson.core.type.TypeReference;\nimport com.google.common.base.Ch"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/arena/Countdown.java",
"chars": 2293,
"preview": "package me.realized.duels.arena;\n\nimport com.google.common.collect.Lists;\nimport java.util.List;\nimport java.util.Map;\ni"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/arena/MatchImpl.java",
"chars": 2976,
"preview": "package me.realized.duels.arena;\n\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.HashMap;\ni"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/betting/BettingManager.java",
"chars": 1507,
"preview": "package me.realized.duels.betting;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.gui.betting.BettingGu"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/BaseCommand.java",
"chars": 4778,
"preview": "package me.realized.duels.command;\n\nimport java.util.Collection;\nimport java.util.List;\nimport java.util.stream.Collecto"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/SpectateCommand.java",
"chars": 3372,
"preview": "package me.realized.duels.command.commands;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.Permissions;"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duel/DuelCommand.java",
"chars": 10721,
"preview": "package me.realized.duels.command.commands.duel;\n\nimport java.util.List;\nimport me.realized.duels.DuelsPlugin;\nimport me"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duel/subcommands/AcceptCommand.java",
"chars": 5074,
"preview": "package me.realized.duels.command.commands.duel.subcommands;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.d"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duel/subcommands/DenyCommand.java",
"chars": 1505,
"preview": "package me.realized.duels.command.commands.duel.subcommands;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.d"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duel/subcommands/InventoryCommand.java",
"chars": 1141,
"preview": "package me.realized.duels.command.commands.duel.subcommands;\n\nimport java.util.UUID;\nimport me.realized.duels.DuelsPlugi"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duel/subcommands/StatsCommand.java",
"chars": 4015,
"preview": "package me.realized.duels.command.commands.duel.subcommands;\n\nimport java.util.Calendar;\nimport java.util.GregorianCalen"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duel/subcommands/ToggleCommand.java",
"chars": 943,
"preview": "package me.realized.duels.command.commands.duel.subcommands;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.d"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duel/subcommands/TopCommand.java",
"chars": 2431,
"preview": "package me.realized.duels.command.commands.duel.subcommands;\n\nimport java.util.List;\nimport me.realized.duels.DuelsPlugi"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duel/subcommands/VersionCommand.java",
"chars": 1052,
"preview": "package me.realized.duels.command.commands.duel.subcommands;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.d"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/DuelsCommand.java",
"chars": 3609,
"preview": "package me.realized.duels.command.commands.duels;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.Permis"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/AddsignCommand.java",
"chars": 2653,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport java.util.Arrays;\nimport java.util.List;\nimport me"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/BindCommand.java",
"chars": 1428,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport java.util.List;\nimport me.realized.duels.DuelsPlug"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/CreateCommand.java",
"chars": 1035,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized."
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/CreatequeueCommand.java",
"chars": 1979,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport java.util.Arrays;\nimport java.util.List;\nimport me"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/DeleteCommand.java",
"chars": 1476,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport java.util.List;\nimport me.realized.duels.DuelsPlug"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/DeletekitCommand.java",
"chars": 1231,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport java.util.List;\nimport me.realized.duels.DuelsPlug"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/DeletequeueCommand.java",
"chars": 1960,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport java.util.Arrays;\nimport java.util.List;\nimport me"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/DeletesignCommand.java",
"chars": 1738,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized."
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/EditCommand.java",
"chars": 3521,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport java.util.Arrays;\nimport java.util.HashMap;\nimport"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/HelpCommand.java",
"chars": 1417,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport com.google.common.collect.Lists;\nimport java.util."
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/InfoCommand.java",
"chars": 2344,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport java.util.List;\nimport java.util.stream.Collectors"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/ListCommand.java",
"chars": 2008,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/LoadkitCommand.java",
"chars": 1453,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport java.util.List;\nimport me.realized.duels.DuelsPlug"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/LobbyCommand.java",
"chars": 622,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized."
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/OptionsCommand.java",
"chars": 1467,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport java.util.List;\nimport me.realized.duels.DuelsPlug"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/PlaysoundCommand.java",
"chars": 1458,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport java.util.List;\nimport java.util.stream.Collectors"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/ReloadCommand.java",
"chars": 2275,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport java.util.List;\nimport java.util.stream.Collectors"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/ResetCommand.java",
"chars": 839,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized."
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/ResetratingCommand.java",
"chars": 2145,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport java.util.List;\nimport me.realized.duels.DuelsPlug"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/SavekitCommand.java",
"chars": 1275,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport java.util.Arrays;\nimport me.realized.duels.DuelsPl"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/SetCommand.java",
"chars": 1982,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport java.util.Arrays;\nimport java.util.List;\nimport me"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/SetitemCommand.java",
"chars": 1819,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport java.util.List;\nimport me.realized.duels.DuelsPlug"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/SetlobbyCommand.java",
"chars": 746,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized."
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/SetratingCommand.java",
"chars": 2121,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport java.util.Arrays;\nimport java.util.List;\nimport me"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/TeleportCommand.java",
"chars": 1924,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport java.util.List;\nimport me.realized.duels.DuelsPlug"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/duels/subcommands/ToggleCommand.java",
"chars": 1461,
"preview": "package me.realized.duels.command.commands.duels.subcommands;\n\nimport java.util.List;\nimport me.realized.duels.DuelsPlug"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/queue/QueueCommand.java",
"chars": 1015,
"preview": "package me.realized.duels.command.commands.queue;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.Permis"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/queue/subcommands/JoinCommand.java",
"chars": 2177,
"preview": "package me.realized.duels.command.commands.queue.subcommands;\n\nimport java.util.Arrays;\nimport java.util.List;\nimport me"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/command/commands/queue/subcommands/LeaveCommand.java",
"chars": 701,
"preview": "package me.realized.duels.command.commands.queue.subcommands;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized."
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/config/Config.java",
"chars": 18820,
"preview": "package me.realized.duels.config;\n\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.ut"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/config/Lang.java",
"chars": 4758,
"preview": "package me.realized.duels.config;\n\nimport com.google.common.collect.Sets;\nimport java.util.Collection;\nimport java.util."
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/config/converters/ConfigConverter9_10.java",
"chars": 445,
"preview": "package me.realized.duels.config.converters;\n\nimport java.util.HashMap;\nimport java.util.Map;\nimport me.realized.duels.u"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/data/ArenaData.java",
"chars": 1427,
"preview": "package me.realized.duels.data;\n\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Map;\nimport java.u"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/data/ItemData.java",
"chars": 8431,
"preview": "package me.realized.duels.data;\n\nimport com.fasterxml.jackson.core.JsonParser;\nimport com.fasterxml.jackson.databind.Des"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/data/KitData.java",
"chars": 3054,
"preview": "package me.realized.duels.data;\n\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Map;\nimport java.u"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/data/LocationData.java",
"chars": 1088,
"preview": "package me.realized.duels.data;\n\nimport org.bukkit.Bukkit;\nimport org.bukkit.Location;\nimport org.bukkit.World;\n\npublic "
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/data/MatchData.java",
"chars": 1084,
"preview": "package me.realized.duels.data;\n\nimport lombok.Getter;\nimport me.realized.duels.api.user.MatchInfo;\n\npublic class MatchD"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/data/PlayerData.java",
"chars": 2668,
"preview": "package me.realized.duels.data;\n\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.util.HashMap;\nimpo"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/data/PotionEffectData.java",
"chars": 869,
"preview": "package me.realized.duels.data;\n\nimport org.bukkit.potion.PotionEffect;\nimport org.bukkit.potion.PotionEffectType;\n\npubl"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/data/QueueData.java",
"chars": 524,
"preview": "package me.realized.duels.data;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.queue.Queue;\n\npublic cla"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/data/QueueSignData.java",
"chars": 1577,
"preview": "package me.realized.duels.data;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.kit.KitImpl;\nimport me.r"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/data/UserData.java",
"chars": 5126,
"preview": "package me.realized.duels.data;\n\nimport com.google.common.base.Charsets;\nimport com.google.common.collect.Lists;\nimport "
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/data/UserManagerImpl.java",
"chars": 11394,
"preview": "package me.realized.duels.data;\n\nimport com.google.common.collect.Lists;\nimport java.io.File;\nimport java.io.FileInputSt"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/duel/DuelManager.java",
"chars": 28315,
"preview": "package me.realized.duels.duel;\n\nimport java.util.Arrays;\nimport java.util.Calendar;\nimport java.util.Collections;\nimpor"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/extension/ExtensionClassLoader.java",
"chars": 3806,
"preview": "package me.realized.duels.extension;\n\nimport com.google.common.io.ByteStreams;\nimport java.io.File;\nimport java.io.IOExc"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/extension/ExtensionInfo.java",
"chars": 1838,
"preview": "package me.realized.duels.extension;\n\nimport java.io.File;\nimport java.io.InputStreamReader;\nimport java.util.List;\nimpo"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/extension/ExtensionManager.java",
"chars": 4813,
"preview": "package me.realized.duels.extension;\n\nimport java.io.File;\nimport java.lang.reflect.Method;\nimport java.util.HashMap;\nim"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/BaseButton.java",
"chars": 1681,
"preview": "package me.realized.duels.gui;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.arena.ArenaManagerImpl;\ni"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/betting/BettingGui.java",
"chars": 9641,
"preview": "package me.realized.duels.gui.betting;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimp"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/betting/buttons/CancelButton.java",
"chars": 759,
"preview": "package me.realized.duels.gui.betting.buttons;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.gui.BaseB"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/betting/buttons/DetailsButton.java",
"chars": 1168,
"preview": "package me.realized.duels.gui.betting.buttons;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.gui.BaseB"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/betting/buttons/HeadButton.java",
"chars": 619,
"preview": "package me.realized.duels.gui.betting.buttons;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.gui.BaseB"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/betting/buttons/StateButton.java",
"chars": 1164,
"preview": "package me.realized.duels.gui.betting.buttons;\n\nimport java.util.UUID;\nimport me.realized.duels.DuelsPlugin;\nimport me.r"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/bind/BindGui.java",
"chars": 1637,
"preview": "package me.realized.duels.gui.bind;\n\nimport java.util.stream.Collectors;\nimport me.realized.duels.DuelsPlugin;\nimport me"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/bind/buttons/BindButton.java",
"chars": 1543,
"preview": "package me.realized.duels.gui.bind.buttons;\n\nimport java.util.stream.Collectors;\nimport lombok.Setter;\nimport me.realize"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/inventory/InventoryGui.java",
"chars": 1996,
"preview": "package me.realized.duels.gui.inventory;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.gui.inventory.b"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/inventory/buttons/EffectsButton.java",
"chars": 1370,
"preview": "package me.realized.duels.gui.inventory.buttons;\n\nimport java.util.stream.Collectors;\nimport me.realized.duels.DuelsPlug"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/inventory/buttons/HeadButton.java",
"chars": 623,
"preview": "package me.realized.duels.gui.inventory.buttons;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.gui.Bas"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/inventory/buttons/HealthButton.java",
"chars": 709,
"preview": "package me.realized.duels.gui.inventory.buttons;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.gui.Bas"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/inventory/buttons/HungerButton.java",
"chars": 599,
"preview": "package me.realized.duels.gui.inventory.buttons;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.gui.Bas"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/inventory/buttons/PotionCounterButton.java",
"chars": 846,
"preview": "package me.realized.duels.gui.inventory.buttons;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.gui.Bas"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/options/OptionsGui.java",
"chars": 3583,
"preview": "package me.realized.duels.gui.options;\n\nimport java.util.function.Consumer;\nimport java.util.function.Function;\nimport l"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/options/buttons/OptionButton.java",
"chars": 1666,
"preview": "package me.realized.duels.gui.options.buttons;\n\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.ut"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/settings/SettingsGui.java",
"chars": 2440,
"preview": "package me.realized.duels.gui.settings;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport me.realized.duels.Due"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/settings/buttons/ArenaSelectButton.java",
"chars": 1703,
"preview": "package me.realized.duels.gui.settings.buttons;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.Permissi"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/settings/buttons/CancelButton.java",
"chars": 609,
"preview": "package me.realized.duels.gui.settings.buttons;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.gui.Base"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/settings/buttons/ItemBettingButton.java",
"chars": 1822,
"preview": "package me.realized.duels.gui.settings.buttons;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.Permissi"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/settings/buttons/KitSelectButton.java",
"chars": 1668,
"preview": "package me.realized.duels.gui.settings.buttons;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.Permissi"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/settings/buttons/OwnInventoryButton.java",
"chars": 1988,
"preview": "package me.realized.duels.gui.settings.buttons;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.Permissi"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/settings/buttons/RequestDetailsButton.java",
"chars": 1696,
"preview": "package me.realized.duels.gui.settings.buttons;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.gui.Base"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/gui/settings/buttons/RequestSendButton.java",
"chars": 1431,
"preview": "package me.realized.duels.gui.settings.buttons;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.gui.Base"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/hook/HookManager.java",
"chars": 1863,
"preview": "package me.realized.duels.hook;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.hook.hooks.BountyHunters"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/hook/hooks/BountyHuntersHook.java",
"chars": 1927,
"preview": "package me.realized.duels.hook.hooks;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.arena.ArenaManager"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/hook/hooks/CombatLogXHook.java",
"chars": 1842,
"preview": "package me.realized.duels.hook.hooks;\n\nimport com.SirBlobman.combatlogx.api.ICombatLogX;\nimport com.SirBlobman.combatlog"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/hook/hooks/CombatTagPlusHook.java",
"chars": 1561,
"preview": "package me.realized.duels.hook.hooks;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.arena.ArenaManager"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/hook/hooks/EssentialsHook.java",
"chars": 1447,
"preview": "package me.realized.duels.hook.hooks;\n\nimport com.earth2me.essentials.Essentials;\nimport com.earth2me.essentials.User;\ni"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/hook/hooks/FactionsHook.java",
"chars": 2574,
"preview": "package me.realized.duels.hook.hooks;\n\nimport com.massivecraft.factions.entity.MPlayer;\nimport com.massivecraft.factions"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/hook/hooks/LeaderHeadsHook.java",
"chars": 2018,
"preview": "package me.realized.duels.hook.hooks;\n\nimport java.util.Arrays;\nimport me.realized.duels.DuelsPlugin;\nimport me.realized"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/hook/hooks/MVdWPlaceholderHook.java",
"chars": 1905,
"preview": "package me.realized.duels.hook.hooks;\n\nimport be.maximvdw.placeholderapi.PlaceholderAPI;\nimport be.maximvdw.placeholdera"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/hook/hooks/McMMOHook.java",
"chars": 1364,
"preview": "package me.realized.duels.hook.hooks;\n\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.UUID;\nimport me."
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/hook/hooks/MyPetHook.java",
"chars": 1362,
"preview": "package me.realized.duels.hook.hooks;\n\nimport de.Keyle.MyPet.MyPetApi;\nimport de.Keyle.MyPet.api.entity.MyPet;\nimport me"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/hook/hooks/PlaceholderHook.java",
"chars": 1815,
"preview": "package me.realized.duels.hook.hooks;\n\nimport me.clip.placeholderapi.expansion.PlaceholderExpansion;\nimport me.realized."
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/hook/hooks/PvPManagerHook.java",
"chars": 2157,
"preview": "package me.realized.duels.hook.hooks;\n\nimport me.NoChance.PvPManager.Events.PlayerTagEvent;\nimport me.NoChance.PvPManage"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/hook/hooks/SimpleClansHook.java",
"chars": 1664,
"preview": "package me.realized.duels.hook.hooks;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.arena.ArenaManager"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/hook/hooks/VaultHook.java",
"chars": 1745,
"preview": "package me.realized.duels.hook.hooks;\n\nimport java.util.Arrays;\nimport lombok.Getter;\nimport me.realized.duels.DuelsPlug"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/hook/hooks/worldguard/WorldGuardHook.java",
"chars": 1127,
"preview": "package me.realized.duels.hook.hooks.worldguard;\n\nimport java.util.Collection;\nimport me.realized.duels.DuelsPlugin;\nimp"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/inventories/InventoryManager.java",
"chars": 1829,
"preview": "package me.realized.duels.inventories;\n\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.UUID;\nimport me"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/kit/KitImpl.java",
"chars": 4872,
"preview": "package me.realized.duels.kit;\n\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Map;\nimport java.ut"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/kit/KitManagerImpl.java",
"chars": 6723,
"preview": "package me.realized.duels.kit;\n\nimport com.fasterxml.jackson.core.type.TypeReference;\nimport com.google.common.base.Char"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/listeners/DamageListener.java",
"chars": 1577,
"preview": "package me.realized.duels.listeners;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.arena.ArenaImpl;\nim"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/listeners/EnderpearlListener.java",
"chars": 4232,
"preview": "package me.realized.duels.listeners;\n\nimport com.google.common.collect.HashMultimap;\nimport com.google.common.collect.Mu"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/listeners/KitItemListener.java",
"chars": 3792,
"preview": "package me.realized.duels.listeners;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.Permissions;\nimport"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/listeners/KitOptionsListener.java",
"chars": 7077,
"preview": "package me.realized.duels.listeners;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.api.event.match.Mat"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/listeners/LingerPotionListener.java",
"chars": 1587,
"preview": "package me.realized.duels.listeners;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.arena.ArenaManagerI"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/listeners/PotionListener.java",
"chars": 2013,
"preview": "package me.realized.duels.listeners;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.arena.ArenaManagerI"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/listeners/ProjectileHitListener.java",
"chars": 2209,
"preview": "package me.realized.duels.listeners;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.arena.ArenaManagerI"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/listeners/TeleportListener.java",
"chars": 2437,
"preview": "package me.realized.duels.listeners;\n\nimport java.util.Set;\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.due"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/logging/LogManager.java",
"chars": 2727,
"preview": "package me.realized.duels.logging;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.io.PrintWriter;\nimport "
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/player/PlayerInfo.java",
"chars": 1875,
"preview": "package me.realized.duels.player;\n\nimport com.google.common.collect.Lists;\nimport java.util.ArrayList;\nimport java.util."
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/player/PlayerInfoManager.java",
"chars": 8753,
"preview": "package me.realized.duels.player;\n\nimport com.fasterxml.jackson.core.type.TypeReference;\nimport com.google.common.base.C"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/queue/Queue.java",
"chars": 4002,
"preview": "package me.realized.duels.queue;\n\nimport java.util.Collections;\nimport java.util.LinkedList;\nimport java.util.List;\nimpo"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/queue/QueueEntry.java",
"chars": 871,
"preview": "package me.realized.duels.queue;\n\nimport java.util.Objects;\nimport lombok.Getter;\nimport me.realized.duels.setting.Cache"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/queue/QueueManager.java",
"chars": 15728,
"preview": "package me.realized.duels.queue;\n\nimport com.fasterxml.jackson.core.type.TypeReference;\nimport com.google.common.base.Ch"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/queue/sign/QueueSignImpl.java",
"chars": 3125,
"preview": "package me.realized.duels.queue.sign;\n\nimport java.util.Objects;\nimport lombok.AccessLevel;\nimport lombok.Getter;\nimport"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/queue/sign/QueueSignManagerImpl.java",
"chars": 7106,
"preview": "package me.realized.duels.queue.sign;\n\nimport com.fasterxml.jackson.core.type.TypeReference;\nimport com.google.common.ba"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/request/RequestImpl.java",
"chars": 1206,
"preview": "package me.realized.duels.request;\n\nimport java.util.UUID;\nimport lombok.Getter;\nimport me.realized.duels.api.arena.Aren"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/request/RequestManager.java",
"chars": 5235,
"preview": "package me.realized.duels.request;\n\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.UUID;\nimport me.rea"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/setting/CachedInfo.java",
"chars": 445,
"preview": "package me.realized.duels.setting;\n\nimport lombok.Getter;\nimport lombok.Setter;\nimport org.bukkit.Location;\n\npublic clas"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/setting/Settings.java",
"chars": 3435,
"preview": "package me.realized.duels.setting;\n\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.UUID;\nimport lombok"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/setting/SettingsManager.java",
"chars": 1225,
"preview": "package me.realized.duels.setting;\n\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.UUID;\nimport me.rea"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/shaded/bstats/Metrics.java",
"chars": 27238,
"preview": "package me.realized.duels.shaded.bstats;\n\nimport com.google.gson.JsonArray;\nimport com.google.gson.JsonObject;\nimport co"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/spectate/SpectateManagerImpl.java",
"chars": 14284,
"preview": "package me.realized.duels.spectate;\n\nimport com.google.common.collect.HashMultimap;\nimport com.google.common.collect.Lis"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/spectate/SpectatorImpl.java",
"chars": 1443,
"preview": "package me.realized.duels.spectate;\n\nimport java.util.Objects;\nimport java.util.UUID;\nimport lombok.Getter;\nimport me.re"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/teleport/Teleport.java",
"chars": 2634,
"preview": "package me.realized.duels.teleport;\n\nimport me.realized.duels.DuelsPlugin;\nimport me.realized.duels.hook.hooks.Essential"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/util/BlockUtil.java",
"chars": 1191,
"preview": "package me.realized.duels.util;\n\nimport org.bukkit.block.Block;\nimport org.bukkit.block.BlockState;\nimport org.bukkit.en"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/util/DateUtil.java",
"chars": 3890,
"preview": "package me.realized.duels.util;\n\nimport java.text.SimpleDateFormat;\nimport java.util.Date;\n\npublic final class DateUtil "
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/util/EnumUtil.java",
"chars": 356,
"preview": "package me.realized.duels.util;\n\nimport java.util.Arrays;\n\npublic final class EnumUtil {\n\n private EnumUtil() {}\n\n "
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/util/EventUtil.java",
"chars": 646,
"preview": "package me.realized.duels.util;\n\nimport org.bukkit.entity.Player;\nimport org.bukkit.entity.Projectile;\nimport org.bukkit"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/util/Loadable.java",
"chars": 147,
"preview": "package me.realized.duels.util;\n\npublic interface Loadable {\n\n void handleLoad() throws Exception;\n\n void handleUn"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/util/Log.java",
"chars": 2493,
"preview": "package me.realized.duels.util;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.logging.Level;\nimpo"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/util/NumberUtil.java",
"chars": 2691,
"preview": "package me.realized.duels.util;\n\nimport java.util.OptionalInt;\n\npublic final class NumberUtil {\n\n /**\n * Copy of "
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/util/PlayerUtil.java",
"chars": 1875,
"preview": "package me.realized.duels.util;\n\nimport me.realized.duels.util.compat.CompatUtil;\nimport org.bukkit.attribute.Attribute;"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/util/Reloadable.java",
"chars": 64,
"preview": "package me.realized.duels.util;\n\npublic interface Reloadable {}\n"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/util/StringUtil.java",
"chars": 3914,
"preview": "package me.realized.duels.util;\n\nimport java.util.Collection;\nimport java.util.List;\nimport java.util.TreeMap;\nimport ja"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/util/TextBuilder.java",
"chars": 4265,
"preview": "package me.realized.duels.util;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collection;\nimpor"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/util/UUIDUtil.java",
"chars": 484,
"preview": "package me.realized.duels.util;\n\nimport java.util.UUID;\nimport java.util.regex.Pattern;\n\npublic final class UUIDUtil {\n\n"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/util/UpdateChecker.java",
"chars": 1319,
"preview": "package me.realized.duels.util;\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamRe"
},
{
"path": "duels-plugin/src/main/java/me/realized/duels/util/collection/StreamUtil.java",
"chars": 653,
"preview": "package me.realized.duels.util.collection;\n\nimport java.util.Iterator;\nimport java.util.Spliterator;\nimport java.util.Sp"
}
]
// ... and 56 more files (download for full content)
About this extraction
This page contains the full source code of the Realizedd/Duels GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 256 files (704.3 KB), approximately 169.2k tokens, and a symbol index with 1478 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.