Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c48e978e5e
|
||
|
|
c8548155ab
|
||
|
|
7c240b4d4c | ||
|
|
12c69696ab | ||
|
|
4edf99f8ef | ||
|
|
b0d340eb76 |
No files matched your search
@@ -0,0 +1 @@
|
||||
.gitea/CODEOWNERS linguist-detectable=false
|
||||
@@ -0,0 +1,3 @@
|
||||
# Pull requests request review from the eligible staff team(s).
|
||||
# One approval from either an Admin or Developer satisfies branch protection.
|
||||
* @trueog/Admins @trueog/Developers
|
||||
@@ -3,3 +3,4 @@
|
||||
target
|
||||
server
|
||||
build.sh
|
||||
.idea/
|
||||
@@ -6,11 +6,11 @@
|
||||
|
||||
<groupId>com.rooxchicken.dupepatch</groupId>
|
||||
<artifactId>dupepatch</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<version>1.1-SNAPSHOT</version>
|
||||
|
||||
<name>dupepatch</name>
|
||||
<!-- FIXME change it to the project's website -->
|
||||
<url>http://www.example.com</url>
|
||||
<url>https://github.com/RooXChicken/papermc-dupe-patch/</url>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -13,13 +13,16 @@ public class DupePatch extends JavaPlugin implements Listener
|
||||
@Override
|
||||
public void onEnable()
|
||||
{
|
||||
Bukkit.getPluginManager().registerEvents(this, this);
|
||||
getLogger().info("Patching the PaperMC Book and Quill Duplication glitch since 1987 [made by roo]");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@SuppressWarnings("unused")
|
||||
public void preventDupe(PlayerEditBookEvent event)
|
||||
{
|
||||
if(event.getNewBookMeta().getTitle().length() > 15)
|
||||
final String title = event.getNewBookMeta().getTitle();
|
||||
if(title != null && title.length() > 15)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
Bukkit.getLogger().log(Level.WARNING, "Player " + event.getPlayer().getName() + " is attempting to dupe!");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
main: com.rooxchicken.dupepatch.DupePatch
|
||||
name: BookAndQuillDupePatch
|
||||
version: 1.0
|
||||
version: 1.1
|
||||
api-version: '1.21'
|
||||
Reference in new issue
Block a user