Compare commits

...

1724 Commits

Author SHA1 Message Date
e6f3b74523 Merge branch 'development' into dependabot/maven/development/org.apache.maven.plugins-maven-checkstyle-plugin-3.3.0 2023-07-05 16:16:07 +01:00
7faf719555 Remove UUID from vanished list on removal (#298)
Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
Co-authored-by: Paldiu <pawereus@gmail.com>
2023-07-05 16:10:07 +01:00
181371e0c7 Merge branch 'development' into dependabot/maven/development/org.apache.maven.plugins-maven-checkstyle-plugin-3.3.0 2023-07-04 18:51:23 -05:00
3bcf0f5082 Merge pull request #325 from AtlasMediaGroup/dependabot/maven/development/com.sk89q.worldedit-worldedit-bukkit-7.2.15
Bump worldedit-bukkit from 7.2.12 to 7.2.15
2023-07-04 18:49:01 -05:00
40d22fa2e3 Bump worldedit-bukkit from 7.2.12 to 7.2.15
Bumps worldedit-bukkit from 7.2.12 to 7.2.15.

---
updated-dependencies:
- dependency-name: com.sk89q.worldedit:worldedit-bukkit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-01 22:28:55 +00:00
41923b29d7 Merge pull request #301 from AtlasMediaGroup/ver/1.19.3
Update to 1.19.4
2023-07-01 16:28:08 -06:00
16c00e3ed6 Update Scissors API artifact version to 1.19.4 2023-06-11 21:27:27 +01:00
60efca28c3 Bump maven-checkstyle-plugin from 3.1.2 to 3.3.0
Bumps [maven-checkstyle-plugin](https://github.com/apache/maven-checkstyle-plugin) from 3.1.2 to 3.3.0.
- [Commits](https://github.com/apache/maven-checkstyle-plugin/compare/maven-checkstyle-plugin-3.1.2...maven-checkstyle-plugin-3.3.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-checkstyle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-24 02:00:43 +00:00
79e7f6904b Merge branch 'development' into ver/1.19.3 2023-04-02 10:21:14 +01:00
1c096b97e3 Merge pull request #314 from AtlasMediaGroup/merge-main-to-dev
Merge main to dev
2023-03-31 21:29:35 -05:00
cc48f93556 Merge branch 'main' into development 2023-03-31 21:15:34 -05:00
dd373fc9aa Merge pull request #307 from AtlasMediaGroup/RELEASE-2022.06.1
Release 2022.06.1
2023-03-31 18:25:42 -05:00
41331e719d Updates version to 2022.06.1 2023-03-08 19:58:14 -07:00
72c83ba84a Merge pull request #306 from AtlasMediaGroup/critical-exploit-fix
Patches critical exploit in the command blocker
2023-03-08 19:53:51 -07:00
3deaaafb88 Patches critical exploit 2023-03-08 19:52:30 -07:00
520bd97176 Merge branch 'development' into ver/1.19.3 2023-03-04 05:14:30 +00:00
71127c3152 Add configuration option for disabling books (#275)
FS-458

Co-authored-by: Video <videogamesm12@gmail.com>
Co-authored-by: Paldiu <pawereus@gmail.com>
2023-02-20 23:39:40 +00:00
654f5900ba Update to 1.19.3 2023-02-20 17:44:57 +00:00
3bd177ea6f Bump actions/setup-java from 3.6.0 to 3.9.0 (#291)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.6.0 to 3.9.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3.6.0...v3.9.0)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
2023-01-07 20:21:19 +00:00
1c0b768e4f Add logging to ro command - FS-233 (#282)
* Add logging to ro command - FS-233

* Create a variable for API instead of calling method every time

Co-authored-by: Paldiu <pawereus@gmail.com>
Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
2023-01-07 18:31:11 +00:00
67b0656e61 Merge pull request #285 from AtlasMediaGroup/fs24
Resolves many issues in FS-24 and cleans up code
2023-01-06 20:37:26 -06:00
b3e1a8b528 Aggressive debloat
- Removes unused Logviewer functionality
- Removes several unused bits of code from FPlayer
- Changes the build configuration to not shade in org.apache.commons:commons-lang3, commons-io.commons-io,
  jetbrains.annotation, and org.javassist:javassist, opting instead to load them in on runtime using a
  little-known Spigot trick
2022-11-21 07:09:59 -07:00
99a5897d44 Go fuck yourself Codacy
Codacy complained about me forgetting a "default" case in my rewrite of /moblimiter, so I have to do this shit.
2022-11-20 23:02:00 -07:00
9064f4b1f2 A few more changes
- Cleans up /potion a tiny bit
- Rewrites part of /moblimiter
- Resolves FS-346 by cleaning up /setlever
- Modernizes /opall a bit
- Changes more components to use Adventure
2022-11-20 22:57:31 -07:00
2698cbf46d Too much shit to list in the commit name
- Removes ancient unused code
- General code cleanup in some places
- Rewrites a few components to use Adventure (testing needed)
- Rewrites a few commands to use more modern Java features like Streams
- Fixes oversight where vanishing still worked by names and not UUIDs
- Removes unused Pterodactyl integration
- Removes AutoEject's IP range banning functionality
- Does some minor cleanup to HTTPD's list & players modules
- Fixes ages-old bug in the AntiSpam that caused it to falsely mute players
2022-11-17 01:34:45 -07:00
d3b4feaec9 Merge branch 'development' into fs24 2022-11-16 03:04:35 -07:00
c9adb0c5a8 Codacy is incredibly picky and I hope it burns in hell 2022-11-16 03:01:51 -07:00
cb642eba08 Completely rewrites the Block Inspector, fixes bug in BukkitTelnetBridge caused when Essentials is not installed 2022-11-15 21:32:21 -07:00
fa85b8e160 Merge pull request #284 from AtlasMediaGroup/FS-454
FS-454 - Add expiry to indefinite bans
2022-11-14 17:12:17 -06:00
69a06167a1 Resolves FS-464
Banners had a cap in them to mitigate the effects of chunk bans back in like 2019. This removes that ancient broken cap.
2022-11-14 11:41:38 -07:00
550ff492ee Resolves FS-339 by aggressively rewriting /list and removing ancient unused code 2022-11-14 10:54:59 -07:00
88914632f5 Resolves FS-321 by aggressively rewriting /plugincontrol 2022-11-14 00:38:42 -07:00
47445933f3 Resolves FS-320 and fixes FS-471 2022-11-13 23:20:46 -07:00
94d6f0a872 Attempts to resolve FS-311 and mitigates FS-396 2022-11-13 20:53:50 -07:00
3d67c83ea4 Resolves FS-322 2022-11-13 07:01:30 -07:00
22161b2e90 Resolves FS-331 2022-11-13 06:55:17 -07:00
b1f08c3b7f God fucking dammit 2022-11-13 06:49:32 -07:00
466745d51f Resolves FS-348 2022-11-13 06:46:48 -07:00
98921b975f Resolves FS-340 and improves some surrounding code a bit 2022-11-13 06:44:56 -07:00
35d53ece4e Resolves FS-338 2022-11-13 06:40:36 -07:00
33146fa161 Resolves FS-337 2022-11-13 06:35:44 -07:00
d7fddc3765 Resolves FS-333 2022-11-13 06:31:45 -07:00
0db765af43 Merge branch 'development' into FS-454 2022-11-13 13:31:33 +00:00
f4cb736c17 Resolves FS-325 2022-11-13 06:28:53 -07:00
3763e0728d Resolves FS-341 2022-11-13 06:25:56 -07:00
af18299613 Resolves FS-318 by rewriting the /mute command
This has the fortunate side-effect of also fixing several bugs present in the original command.
2022-11-13 06:19:10 -07:00
f0d6549eec Resolves FS-316 by aggressively rewriting /blockedit
Disclaimer: I did this whilst sleep deprvied.
I didn't know how the fuck NPath is calculated so to play it safe I aggressively rewrote the command. I also took the opportunity to make some of the command's messages more consistent with eachother (using restrict/restore instead of block/unblock).
2022-11-13 04:49:58 -07:00
3b61ba408f Fixes FS-314 2022-11-04 22:58:36 -06:00
af710edc88 Fixes FS-323 by rewriting ride modes to make sense 2022-11-04 22:26:19 -06:00
459a11e638 Fixes FS-349 2022-11-04 21:32:23 -06:00
2e41414358 Fixes FS-343 2022-11-04 21:30:28 -06:00
a3d7fe19a0 Bump codacy/codacy-analysis-cli-action from 4.1.0 to 4.2.0 (#269)
Bumps [codacy/codacy-analysis-cli-action](https://github.com/codacy/codacy-analysis-cli-action) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/codacy/codacy-analysis-cli-action/releases)
- [Commits](https://github.com/codacy/codacy-analysis-cli-action/compare/v4.1.0...v4.2.0)

---
updated-dependencies:
- dependency-name: codacy/codacy-analysis-cli-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
2022-11-03 12:20:56 +00:00
7f4000aff9 Remove indefinite wording for bans with expiry 2022-10-29 22:09:58 +11:00
d2884f007b Remove ParseException from IConfig 2022-10-29 21:36:05 +11:00
58b1890183 Add expiry to indefinite bans 2022-10-29 21:33:00 +11:00
8317b1f881 Remove unused imports, variables and other minor oversights in the Discord bridge (#280)
* Fix player names not being deformatted

* Remove unused imports and variables

* Rectify usage of deprecated methods

* Clarify comment

* Update JDA plugin warning repository URL

* Fix possible NPEs

Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
2022-10-28 13:46:16 +01:00
706e9540ce Remove Broken Downstream Merge Action (#281)
This never worked, let's just remove it.
2022-10-28 13:25:59 +01:00
ac00d36dc6 Bump actions/setup-java from 3.5.1 to 3.6.0 (#279)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.5.1 to 3.6.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3.5.1...v3.6.0)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-25 00:32:07 +01:00
a2133369d2 Merge pull request #276 from AtlasMediaGroup/FS-460-remove-sit-command-from-tfm
[FS-460] Remove /sit command
2022-10-17 11:32:36 -06:00
48728c9524 Merge branch 'development' into FS-460-remove-sit-command-from-tfm 2022-10-17 09:51:09 -06:00
d343bbc3d7 Merge pull request #268 from AtlasMediaGroup/FS-452-not-fucked
Removes /nh and code associated with it
2022-10-16 20:14:26 -06:00
2c357d1d49 Remove /sit command
FS-460
2022-10-13 19:53:04 +01:00
5246639608 Merge branch 'development' into FS-452-not-fucked 2022-10-12 21:37:18 +01:00
7fb4a477dc Removes TFGuilds integration (#264)
TFGuilds was shitcanned the other day (good riddence), so there's no point in bridging it anymore.

Co-authored-by: Allink <44676012+allinkdev@users.noreply.github.com>
Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
2022-10-12 21:36:49 +01:00
612499ff0a Merge pull request #274 from AtlasMediaGroup/main
Merge Main --> Development for 2022.06 Release.
2022-10-12 17:41:40 +01:00
edb3dbfdbe Merge pull request #273 from AtlasMediaGroup/RELEASE-2022.06
Release 2022.06
2022-10-12 17:37:09 +01:00
a332ecfbea Merge pull request #272 from AtlasMediaGroup/fix-interact-blocking
Remove guard clause causing unintended side effects in interact blocker
2022-10-12 11:29:00 -05:00
7f78549f9d Merge branch 'development' into fix-interact-blocking 2022-10-09 15:15:57 -05:00
fd6f8a2d17 Merge branch 'main' into RELEASE-2022.06 2022-10-08 15:08:52 +01:00
21c84d76d3 Bump actions/setup-java from 3.3.0 to 3.5.1 (#271)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.3.0 to 3.5.1.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3.3.0...v3.5.1)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-08 15:06:56 +01:00
88f53c05b9 Remove guard clause causing unintended side effects 2022-10-05 12:31:05 +01:00
51cc527697 Removes /nh and code associated with it (except this time its based on the right branch) 2022-09-14 19:24:58 -06:00
ae5038ef0f Uplifts pom version to release 2022-09-13 21:54:42 -06:00
ec5aa0304e Uplifts version 2022-09-12 21:42:04 -06:00
ebafc1c669 Hopefully fixing it this time (#119)
This is proving to be more of a PITA than I had expected.
2022-09-12 22:54:44 +01:00
9f8dafb075 Merge pull request #257 from AtlasMediaGroup/update-squash
Update squash
2022-09-12 22:53:58 +01:00
1eaaf5fcdb Fixes bug where the whitelist wasn't working 2022-09-11 22:10:57 -06:00
42458084d7 Untitled bugfix 2022-09-11 16:47:12 -06:00
0cd2886e40 Fixes oversight where not having Essentials installed causes Discord reporting to fail 2022-09-11 16:14:31 -06:00
575568cb05 Fixes severe bug where changes to player data wouldn't save 2022-09-11 15:33:05 -06:00
26be5d0f44 Fixes bug where adminchat messages were duplicated when sent from in-game
Yet another bug discovered during testing before the release was to be cut
2022-09-11 12:47:58 -06:00
7a724c2f13 Fixes bug that prevented /saconfig add from working properly
This popped up during testing right before RC2 was intended to be cut.
2022-09-11 12:12:36 -06:00
9e1aa5d34e Uplifts version to 2022.06-RC2 2022-09-11 11:36:21 -06:00
4564ad0449 Fix SAConfig NPE (originally by Allink) 2022-09-11 11:34:16 -06:00
1ddeb4b621 Merge pull request #263 from AtlasMediaGroup/FS-450
Fixes several bugs caused by potential issues in TFM's admin loading system (FS-450)
2022-09-11 11:30:37 -06:00
a8665a15d4 Merge pull request #262 from AtlasMediaGroup/FS-449
Stabilization Part 4 - The Lost Episode (Remastered) [FS-449]
2022-09-11 11:30:21 -06:00
c0f3712c8d Fixes several bugs caused by any potential issues in TFM's admin loading system 2022-09-11 06:35:32 -06:00
0dd7bc06eb FS-449 2022-09-11 06:04:01 -06:00
4d98108a46 Remove uptime command (#250)
Codacy is struggling for no reason, merging anyway.
2022-09-11 12:31:52 +01:00
02b2810488 Merge remote-tracking branch 'origin/dependabot/maven/development/org.junit.jupiter-junit-jupiter-5.9.0' into megabranch 2022-08-18 23:47:37 +01:00
7e110e8ac6 Merge remote-tracking branch 'origin/dependabot/maven/development/org.javassist-javassist-3.29.1-GA' into megabranch 2022-08-18 23:47:34 +01:00
6d3f365878 Merge remote-tracking branch 'origin/dependabot/maven/development/net.essentialsx-EssentialsX-2.19.6' into megabranch 2022-08-18 23:47:25 +01:00
05bb64ce85 Bump EssentialsX from 2.19.4 to 2.19.6
Bumps [EssentialsX](https://github.com/EssentialsX/Essentials) from 2.19.4 to 2.19.6.
- [Release notes](https://github.com/EssentialsX/Essentials/releases)
- [Commits](https://github.com/EssentialsX/Essentials/compare/2.19.4...2.19.6)

---
updated-dependencies:
- dependency-name: net.essentialsx:EssentialsX
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 01:45:49 +00:00
b05238c51f Bump javassist from 3.29.0-GA to 3.29.1-GA
Bumps [javassist](https://github.com/jboss-javassist/javassist) from 3.29.0-GA to 3.29.1-GA.
- [Release notes](https://github.com/jboss-javassist/javassist/releases)
- [Changelog](https://github.com/jboss-javassist/javassist/blob/master/Changes.md)
- [Commits](https://github.com/jboss-javassist/javassist/commits)

---
updated-dependencies:
- dependency-name: org.javassist:javassist
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-12 01:27:24 +00:00
7bda4beab0 Bump worldedit-bukkit from 7.2.10 to 7.2.12
Bumps worldedit-bukkit from 7.2.10 to 7.2.12.

---
updated-dependencies:
- dependency-name: com.sk89q.worldedit:worldedit-bukkit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 01:42:07 +00:00
97544977b0 Bump junit-jupiter from 5.8.2 to 5.9.0
Bumps [junit-jupiter](https://github.com/junit-team/junit5) from 5.8.2 to 5.9.0.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.8.2...r5.9.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-27 01:34:57 +00:00
073356be49 Properly patch Game Master Blocks (#245)
* Break cancelled blocks on interact

* Cancel master blocks

* Add Scissors maven repository

* Remove Scissors repo (it is already included in the AMG repo)

* Remove unused import & add TODO for the 1.19 port
2022-07-16 23:03:23 +01:00
c472c5d5ce Merge pull request #243 from AtlasMediaGroup/beds
Fix beds exploding in the Nether & End dimensions with explosions off
2022-06-20 07:25:27 -05:00
cb401577a4 Fix beds exploding in the Nether & End dimensions with explosions off 2022-06-20 02:46:09 +01:00
9d3165694a Update version 2022-06-17 16:04:55 -05:00
cffb5d9326 Bump codacy/codacy-analysis-cli-action from 4.0.2 to 4.1.0 (#242)
Bumps [codacy/codacy-analysis-cli-action](https://github.com/codacy/codacy-analysis-cli-action) from 4.0.2 to 4.1.0.
- [Release notes](https://github.com/codacy/codacy-analysis-cli-action/releases)
- [Commits](https://github.com/codacy/codacy-analysis-cli-action/compare/4.0.2...v4.1.0)

---
updated-dependencies:
- dependency-name: codacy/codacy-analysis-cli-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-16 12:33:31 +01:00
4e8df0938f Merge pull request #240 from AtlasMediaGroup/add-devs
Add developers and improve code readability
2022-06-08 18:11:49 -05:00
511f172d84 Add developers and improve code readability 2022-06-08 17:57:22 -05:00
bfa8b2a752 Merge pull request #239 from AtlasMediaGroup/FS-222
Unvanish, remove commandspy & set fuckoff radius to 0 for removed admins
2022-06-05 18:47:21 -05:00
594b1f5605 Merge branch 'development' into FS-222 2022-06-05 18:42:51 -05:00
b9ca4f52a2 Merge pull request #238 from AtlasMediaGroup/properly-update
Update rest of dependencies
2022-06-05 18:41:34 -05:00
d298e923b8 Merge pull request #227 from allinkdev/FS-222
Merge allinkdev:FS-222 into AtlasMediaGroup:FS-222
2022-06-06 00:37:29 +01:00
d0d97c0681 Merge branch 'development' into properly-update 2022-06-05 18:36:50 -05:00
2540c7c589 Merge pull request #237 from AtlasMediaGroup/discord
Re-implement most-used commands from the old python bot & other improvements
2022-06-05 18:35:35 -05:00
6bc91fc779 Merge pull request #236 from allinkdev/properly-update
Merge allinkdev:properly-update into AtlasMediaGroup:properly-update
2022-06-06 00:35:22 +01:00
9a54ef66d1 Merge pull request #231 from allinkdev/discord
Merge allinkdev:discord into AtlasMediaGroup:discord branch
2022-06-06 00:31:13 +01:00
722ef5f99a Merge branch 'development' into discord 2022-06-05 23:11:39 +01:00
6bf6eeec91 Merge branch 'development' into properly-update 2022-06-05 22:53:56 +01:00
9df30a9556 Merge branch 'development' into FS-222 2022-06-05 22:52:30 +01:00
83bb892056 Merge pull request #233 from AtlasMediaGroup/fix-readme
Update README to fix badge
2022-06-05 16:51:23 -05:00
62ff195ec5 Merge branch 'development' into fix-readme 2022-06-05 22:48:25 +01:00
495fe79d94 Properly update 2022-06-05 22:44:38 +01:00
422b41dc8d Merge branch 'development' into FS-222 2022-06-05 22:41:02 +01:00
f44a1c7e69 Merge branch 'development' into discord 2022-06-05 22:40:48 +01:00
9f8dd91457 Merge pull request #235 from AtlasMediaGroup/update-deps
Update all dependencies, confirmed working
2022-06-05 16:30:08 -05:00
ee45256764 Update all dependencies, confirmed working 2022-06-05 16:09:23 -05:00
f6faf3b8bc Merge pull request #166 from AtlasMediaGroup/dependabot/maven/development/org.jetbrains-annotations-23.0.0
Bump annotations from 22.0.0 to 23.0.0
2022-06-05 15:38:43 -05:00
8210dafcd3 Bump annotations from 22.0.0 to 23.0.0
Bumps [annotations](https://github.com/JetBrains/java-annotations) from 22.0.0 to 23.0.0.
- [Release notes](https://github.com/JetBrains/java-annotations/releases)
- [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md)
- [Commits](https://github.com/JetBrains/java-annotations/compare/22.0.0...23.0.0)

---
updated-dependencies:
- dependency-name: org.jetbrains:annotations
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-05 20:04:42 +00:00
4eb8174aa9 Merge pull request #164 from AtlasMediaGroup/dependabot/maven/development/org.reflections-reflections-0.10.2
Bump reflections from 0.9.12 to 0.10.2
2022-06-05 15:02:37 -05:00
ab309032e5 Update README to fix badge 2022-06-05 14:22:46 -05:00
0db661600f Merge remote-tracking branch 'origin/development' into discord 2022-06-05 20:21:58 +01:00
d94b184703 Bump reflections from 0.9.12 to 0.10.2
Bumps [reflections](https://github.com/ronmamo/reflections) from 0.9.12 to 0.10.2.
- [Release notes](https://github.com/ronmamo/reflections/releases)
- [Commits](https://github.com/ronmamo/reflections/compare/0.9.12...0.10.2)

---
updated-dependencies:
- dependency-name: org.reflections:reflections
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-05 19:18:11 +00:00
c07473ef6d Merge pull request #216 from AtlasMediaGroup/dependabot/maven/development/com.sk89q.worldedit-worldedit-bukkit-7.2.10
Bump worldedit-bukkit from 7.2.8 to 7.2.10
2022-06-05 14:15:46 -05:00
d7261627ff Bump worldedit-bukkit from 7.2.8 to 7.2.10
Bumps worldedit-bukkit from 7.2.8 to 7.2.10.

---
updated-dependencies:
- dependency-name: com.sk89q.worldedit:worldedit-bukkit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-05 18:39:30 +00:00
6ac7090fef Merge pull request #213 from AtlasMediaGroup/dependabot/maven/development/org.apache.maven.plugins-maven-compiler-plugin-3.10.1
Bump maven-compiler-plugin from 3.8.1 to 3.10.1
2022-06-05 13:37:09 -05:00
611ee619a0 Merge branch 'development' into FS-222 2022-06-05 18:18:55 +01:00
9d2555cd03 Bump maven-compiler-plugin from 3.8.1 to 3.10.1
Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.8.1 to 3.10.1.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.8.1...maven-compiler-plugin-3.10.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-05 15:31:57 +00:00
3c4b4140ce Bump actions/checkout from 2 to 3 (#202)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-05 16:29:29 +01:00
0f2d596b7a Bump actions/setup-java from 2.3.0 to 3.3.0 (#228)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 2.3.0 to 3.3.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v2.3.0...v3.3.0)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-05 13:43:26 +01:00
dcdaecf9b0 Bump aormsby/Fork-Sync-With-Upstream-action from 2.1 to 3.3 (#230)
Bumps [aormsby/Fork-Sync-With-Upstream-action](https://github.com/aormsby/Fork-Sync-With-Upstream-action) from 2.1 to 3.3.
- [Release notes](https://github.com/aormsby/Fork-Sync-With-Upstream-action/releases)
- [Commits](https://github.com/aormsby/Fork-Sync-With-Upstream-action/compare/v2.1...v3.3)

---
updated-dependencies:
- dependency-name: aormsby/Fork-Sync-With-Upstream-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-05 13:15:26 +01:00
b4b10a3020 A single space 2022-06-05 12:14:49 +01:00
fb259ca9b7 Merge branch 'development' into FS-222 2022-06-05 00:18:55 +01:00
52a39aa992 Bump github/codeql-action from 1 to 2 (#225)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-05 00:15:42 +01:00
b4e7251e3b Merge pull request #232 from AtlasMediaGroup/main
Merge from main into development
2022-06-04 15:06:28 +01:00
0f1fbf9481 Merge pull request #198 from AtlasMediaGroup/RELEASE-2022.02
Release 2022.02
2022-06-04 15:04:16 +01:00
73eb3226ee allow spawn eggs to do SOMETHING (#219)
* allow spawn eggs to do SOMETHING

they now spawn a mob despite the mob having zero nbt from the spawn egg. "it's better than nothing" as one might say.

* mushroom cow moment

* formatting/style + remove extra change

* 💀

💀

* 💀 💀 💀

💀 💀 💀 💀 💀

Co-authored-by: Paldiu <pawereus@gmail.com>
Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
2022-06-04 14:59:35 +01:00
8edc87034f Merge branch 'development' into FS-222 2022-06-03 19:21:07 +01:00
68bcabe5c2 fix httpd log spam (#223)
fix httpd log spam with invalid url encoded strings (lol)

Co-authored-by: Paldiu <pawereus@gmail.com>
Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
2022-06-03 18:27:37 +01:00
ecc92589e9 Bump codacy/codacy-analysis-cli-action from 4.0.0 to 4.0.2 (#209)
Bumps [codacy/codacy-analysis-cli-action](https://github.com/codacy/codacy-analysis-cli-action) from 4.0.0 to 4.0.2.
- [Release notes](https://github.com/codacy/codacy-analysis-cli-action/releases)
- [Commits](https://github.com/codacy/codacy-analysis-cli-action/compare/4.0.0...4.0.2)

---
updated-dependencies:
- dependency-name: codacy/codacy-analysis-cli-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-03 15:04:13 +01:00
bf41d08580 Mention the user who completes the report so we can have their current Discord name (includes their current name & tag in-case they delete their account) 2022-05-26 22:13:57 +01:00
0fc20b6c56 Merge branch 'development' into FS-222 2022-05-26 10:11:01 -05:00
9c91166319 Allow players to report offline players & allow admins to mark reports as completed, deleting them and sending them to an archive channel 2022-05-26 16:10:00 +01:00
09a220e0a2 VPS -> Host 2022-05-25 20:18:01 +01:00
ad9dd42edb Remove unused import 2022-05-25 19:55:25 +01:00
c9f5db0141 Add Discord commands like the old bot 2022-05-25 19:44:45 +01:00
47c30c3283 Add plural to Displayables 2022-05-25 19:41:58 +01:00
6c426644f6 Add uptime & memory related functions to FUtil 2022-05-25 18:49:53 +01:00
72bab1e2ed Add mean averaging to FUtil 2022-05-25 18:41:35 +01:00
1726050d65 Clean up DiscordToMinecraftListener 2022-05-25 17:18:49 +01:00
0fc5b01b29 Clean up message sanitization and properly strip section signs from nicks/messages 2022-05-25 17:15:04 +01:00
dfd90af017 Merge pull request #224 from AtlasMediaGroup/dependabot/maven/development/org.apache.maven.plugins-maven-antrun-plugin-3.1.0
Bump maven-antrun-plugin from 3.0.0 to 3.1.0
2022-05-24 20:47:32 -05:00
5af45a2154 Do the disabling in the admin class, so it works with commands like doom & also disable potion spy 2022-05-03 09:44:36 +01:00
54df28022f Remove offline vanished players & check if the player is online before attempting to get the FPlayer 2022-05-03 09:23:37 +01:00
0326171e85 Unvanish, remove commandspy & set fuckoff radius to 0 for removed admins 2022-05-03 08:58:42 +01:00
d13ecea947 Merge branch 'RELEASE-2022.02' of https://github.com/AtlasMediaGroup/TotalFreedomMod into RELEASE-2022.02 2022-05-01 09:55:58 -05:00
7ec053c867 Adjusted version
Removed "-RELEASE"
2022-05-01 09:55:47 -05:00
1dcc05e7f5 Merge pull request #195 from AtlasMediaGroup/Wild1145-patch-3
Update SECURITY.md
2022-05-01 15:45:16 +01:00
c913b7ae74 Set Maven Shade version to 3.3.0 2022-05-01 09:41:53 -05:00
951f3c91d9 2022.02-RELEASE Versioning
- Changed the version to 2022.02-RELEASE
- Changed the API version to 1.17
2022-05-01 09:31:20 -05:00
b573871c14 Bump maven-antrun-plugin from 3.0.0 to 3.1.0
Bumps [maven-antrun-plugin](https://github.com/apache/maven-antrun-plugin) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/apache/maven-antrun-plugin/releases)
- [Commits](https://github.com/apache/maven-antrun-plugin/compare/maven-antrun-plugin-3.0.0...maven-antrun-plugin-3.1.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-antrun-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-01 11:42:11 +00:00
78654eb5e8 Merge pull request #222 from AtlasMediaGroup/stabilization
Stabilization
2022-05-01 05:39:48 -06:00
adbe125283 increments version 2022-04-20 17:03:13 -06:00
e6a20e1757 fix httpd log spam
fix httpd log spam with invalid url encoded strings (lol)
2022-04-17 14:58:58 -07:00
d71d8edf53 Merge branch 'development' into stabilization 2022-04-15 08:09:05 -06:00
6af9f240f4 Stage 3 of IP -> UUID migration: completely removing the verification system 2022-04-15 07:52:06 -06:00
05745c4210 Stage 2 of IP -> UUID migration: changing the admin list to use UUIDs 2022-04-15 07:09:23 -06:00
98388d0d23 Stage 1 of IP -> UUID migration: changing player data to use UUIDs instead 2022-04-15 06:27:32 -06:00
1da87eeb37 Merge pull request #217 from AtlasMediaGroup/dependabot/maven/development/net.coreprotect-coreprotect-21.2
Bump coreprotect from 20.4 to 21.2
2022-04-15 05:44:33 -06:00
b656925e4f Fixes two bugs related to commands
- Fixes commands not showing up in their own dedicated section in /help
- Fixes duplicate/disorganized commands in the HTTPD help page by overhauling it
2022-04-15 05:28:32 -06:00
d4f44e988c Additional future-proofing 2022-04-15 05:08:11 -06:00
c39c632a67 Removes useless code 2022-04-15 05:03:41 -06:00
733f002a87 Bump to RC02 and fix Netbeans compile issue. 2022-03-27 19:49:16 +01:00
adcccb10e5 Removes dependency on NMS 2022-03-25 14:45:32 -06:00
3fdc0c05bb Bump coreprotect from 20.4 to 21.2
Bumps coreprotect from 20.4 to 21.2.

---
updated-dependencies:
- dependency-name: net.coreprotect:coreprotect
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-22 01:56:59 +00:00
2551d184ca Merge pull request #211 from AtlasMediaGroup/RELEASE-2022.02
Release 2022.02
2022-03-11 18:09:21 -06:00
f9eabf27d5 Merge pull request #205 from AtlasMediaGroup/fs-442
FS-442
2022-03-06 16:15:53 -07:00
76ce98621a Corrected now that we're targeting the 2022.02 relase. 2022-03-06 14:42:45 +00:00
bc0495a68f Update SECURITY.md
Fixes to update the documentation based on actively supported versions.
2022-03-06 14:39:41 +00:00
846154a723 will this work 2022-03-06 14:37:45 +00:00
804614d011 Bump to 2022.02-RC01 Release
Primarily adds 1.17 support, other fixes may be present, please see full release notes for info.
2022-02-23 23:23:14 +00:00
2c22c6c52d Merge pull request #194 from AtlasMediaGroup/Wild1145-patch-1
Update various dependencies based on Freedom-01 State
2022-02-23 17:10:09 -06:00
5ef0f29ffe Merge branch 'development' into Wild1145-patch-1 2022-02-23 22:48:53 +00:00
11134f4109 Merge pull request #197 from AtlasMediaGroup/FS-292
Uplifts the plugin to 1.17.1
2022-02-23 22:48:32 +00:00
e7992c7eb4 Merge branch 'development' into Wild1145-patch-1 2022-02-22 21:17:02 +00:00
82e966dfb0 Delete java11-maven.yml 2022-02-22 20:50:41 +00:00
f457c4cde2 Merge branch 'development' into FS-292 2022-02-21 18:08:29 -06:00
004a0f3d7c Update Groups.java
This should resolve the issues with spawn eggs and mobs.
2022-02-21 17:04:53 -07:00
cf5199f28e Squashed commit of the following:
commit 43c68579e5
Merge: 2618d97a b711ed51
Author: elmon <elmon11bussiness@gmail.com>
Date:   Mon Feb 21 10:01:39 2022 +0100

    Merge pull request #190 from AtlasMediaGroup/Elmon11-patch-2

    order of messages fix

commit b711ed517f
Merge: 1c464729 2618d97a
Author: elmon <elmon11bussiness@gmail.com>
Date:   Mon Jan 24 22:16:24 2022 +0100

    Merge branch 'development' into Elmon11-patch-2

commit 2618d97a3e
Author: Nathan Curran <30569566+Focusvity@users.noreply.github.com>
Date:   Mon Jan 24 12:42:47 2022 +1100

    Remove requireNonNull method from getIp, which causes NPE - resolves FS-429 (#187)

    Co-authored-by: Paldiu <pawereus@gmail.com>

commit 1c4647290a
Merge: f00f67a8 850f1210
Author: Nathan Curran <30569566+Focusvity@users.noreply.github.com>
Date:   Mon Jan 24 12:41:47 2022 +1100

    Merge branch 'development' into Elmon11-patch-2

commit f00f67a844
Author: elmon <elmon11bussiness@gmail.com>
Date:   Sun Jan 23 13:26:22 2022 +0100

    order of messages fix

    https://media.discordapp.net/attachments/874713176082636882/934559012991680532/unknown.png

commit 850f12103c
Merge: 2eb0ab4c 7fd77f3c
Author: Paldiu <pawereus@gmail.com>
Date:   Mon Jan 17 11:35:09 2022 -0600

    Merge pull request #188 from AtlasMediaGroup/Wild1145-patch-1

    Correct CoreProtect Version

commit 7fd77f3cbb
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Jan 16 18:22:16 2022 +0000

    Correct CoreProtect Version

    To align with the version running on Freedom-01 at the moment.

commit 2eb0ab4cb1
Merge: 8cff0124 2612aaec
Author: Video <videogamesm12@gmail.com>
Date:   Wed Dec 22 20:56:46 2021 -0700

    Merge pull request #179 from AtlasMediaGroup/FS-212

    Makes spawnmob configurable, increases the default limit to 25 (FS-212)

commit 2612aaec31
Author: Video <videogamesm12@gmail.com>
Date:   Wed Dec 15 21:46:56 2021 -0700

    Makes spawnmob configurable and increases the default limit to 25

commit 8cff0124ea
Merge: 35965b0b 1162f10e
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 06:36:20 2021 -0700

    Merge pull request #93 from AtlasMediaGroup/FS-37

    Fixes FS-37

commit 1162f10ebb
Merge: 7ce173e0 35965b0b
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 06:31:18 2021 -0700

    Merge branch 'development' into FS-37

commit 35965b0b10
Merge: aa20a6e5 1253732f
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 06:31:11 2021 -0700

    Merge pull request #174 from AtlasMediaGroup/FS-256

    Forces the server to recalculate the permissions server-wide in /opall (FS-256)

commit 1253732f77
Merge: e1bee321 aa20a6e5
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 06:25:25 2021 -0700

    Merge branch 'development' into FS-256

commit 7ce173e02b
Merge: 4d006ed1 aa20a6e5
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 06:24:34 2021 -0700

    Merge branch 'development' into FS-37

commit aa20a6e579
Merge: 70622900 1ecfb0b0
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 06:23:57 2021 -0700

    Merge pull request #129 from AtlasMediaGroup/FS-7

    Allow players to pay other players coins [FS-7]

commit e1bee32163
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 03:27:07 2021 -0700

    Forces the server to recalculate the permissions server-wide in /opall

commit 4d006ed172
Merge: 8cbfde8b 70622900
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 03:04:42 2021 -0700

    Merge branch 'development' into FS-37

commit 1ecfb0b066
Merge: 225ade87 70622900
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 03:01:22 2021 -0700

    Merge branch 'development' into FS-7

commit 706229004c
Merge: a42cb6af a4adfa9b
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 03:00:15 2021 -0700

    Merge pull request #131 from AtlasMediaGroup/FS-273

    Moves /rainbowtrail to the shop (FS-273)

commit a4adfa9bee
Merge: 1b5bbd1c a42cb6af
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 02:46:41 2021 -0700

    Merge branch 'development' into FS-273

commit 225ade8753
Merge: afe755f5 a42cb6af
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 02:46:02 2021 -0700

    Merge branch 'development' into FS-7

commit 8cbfde8bbc
Merge: bba5ec92 a42cb6af
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 02:41:49 2021 -0700

    Merge branch 'development' into FS-37

commit a42cb6aff9
Merge: 2ecfb886 01fdf766
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 02:41:34 2021 -0700

    Merge pull request #125 from AtlasMediaGroup/shitcan-savedflags

    Shitcans SavedFlags

commit 01fdf766ee
Merge: 58c21bb1 2ecfb886
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:28:48 2021 -0700

    Merge branch 'development' into shitcan-savedflags

commit afe755f5c1
Merge: 5f97e68e 2ecfb886
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:26:59 2021 -0700

    Merge branch 'development' into FS-7

commit 5f97e68e0e
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:26:49 2021 -0700

    fuck it, it works

commit 1b5bbd1c05
Merge: 8356e831 2ecfb886
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:16:21 2021 -0700

    Merge branch 'development' into FS-273

commit 2ecfb88604
Merge: 42143c11 bb2ddf11
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:15:16 2021 -0700

    Merge pull request #130 from AtlasMediaGroup/FS-215

    Makes [Discord] a hyperlink (FS-215)

commit 8356e831a5
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:11:16 2021 -0700

    Redundancy fix and better protection system

commit ab00cb840f
Merge: ecce62f6 42143c11
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 03:31:45 2021 -0700

    Merge branch 'development' into FS-273

commit bb2ddf1129
Merge: cf9fdc6f 42143c11
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 03:31:19 2021 -0700

    Merge branch 'development' into FS-215

commit bba5ec922b
Merge: 68adaed9 42143c11
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 03:31:13 2021 -0700

    Merge branch 'development' into FS-37

commit 58c21bb1aa
Merge: fdba119d 42143c11
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 03:30:48 2021 -0700

    Merge branch 'development' into shitcan-savedflags

commit 68adaed997
Merge: 087b8dd7 a598c933
Author: Video <videogamesm12@gmail.com>
Date:   Sat Oct 9 00:09:24 2021 -0600

    Merge branch 'development' into FS-37

commit ecce62f6b4
Merge: d8148530 a598c933
Author: Video <videogamesm12@gmail.com>
Date:   Sat Oct 9 00:01:22 2021 -0600

    Merge branch 'development' into FS-273

commit cf9fdc6fe4
Merge: 387ea6f7 a598c933
Author: Video <videogamesm12@gmail.com>
Date:   Fri Oct 8 01:43:33 2021 -0600

    Merge branch 'development' into FS-215

commit 387ea6f71e
Merge: a1ecf881 180cd811
Author: Video <videogamesm12@gmail.com>
Date:   Fri Oct 1 00:35:12 2021 -0600

    Merge branch 'development' into FS-215

commit d814853036
Merge: 47e63869 213a4338
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Sep 12 13:49:05 2021 +0100

    Merge branch 'development' into FS-273

commit a1ecf88109
Merge: bd647afe 213a4338
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Sep 12 13:48:59 2021 +0100

    Merge branch 'development' into FS-215

commit 5a6a5ff75d
Merge: 6ca61d9c 213a4338
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Sep 12 13:48:50 2021 +0100

    Merge branch 'development' into FS-7

commit fdba119d5d
Merge: 61857dd0 213a4338
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Sep 12 13:48:44 2021 +0100

    Merge branch 'development' into shitcan-savedflags

commit 087b8dd7ea
Merge: 3818aab4 213a4338
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Sep 12 13:48:21 2021 +0100

    Merge branch 'development' into FS-37

commit 3818aab454
Merge: caeda219 0e12f5e7
Author: Video <videogamesm12@gmail.com>
Date:   Sun Sep 12 03:04:08 2021 -0600

    Merge branch 'development' into FS-37

commit 61857dd06f
Merge: 2d18d461 0e12f5e7
Author: Video <videogamesm12@gmail.com>
Date:   Sun Sep 12 03:01:37 2021 -0600

    Merge branch 'development' into shitcan-savedflags

commit bd647afe92
Merge: 69f17ef2 0e12f5e7
Author: Video <videogamesm12@gmail.com>
Date:   Sun Sep 12 02:50:39 2021 -0600

    Merge branch 'development' into FS-215

commit 69f17ef2d7
Merge: ee1b27fa aebe1ace
Author: Video <videogamesm12@gmail.com>
Date:   Sun Sep 12 02:01:56 2021 -0600

    Merge branch 'development' into FS-215

commit caeda219fa
Merge: 3ca98352 0a9b95bf
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 11 15:26:37 2021 +0100

    Merge branch 'development' into FS-37

commit ee1b27fa0d
Merge: 2bdf14f3 0a9b95bf
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 11 01:24:00 2021 +0100

    Merge branch 'development' into FS-215

commit 6ca61d9c6c
Merge: fedf80b8 0a9b95bf
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 11 01:23:52 2021 +0100

    Merge branch 'development' into FS-7

commit 2d18d461fe
Merge: a4c81f20 0a9b95bf
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 11 01:23:44 2021 +0100

    Merge branch 'development' into shitcan-savedflags

commit 47e6386907
Merge: b1062fbb 0a9b95bf
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 11 01:23:13 2021 +0100

    Merge branch 'development' into FS-273

commit fedf80b834
Merge: a2d11d4b 44ff621d
Author: Video <videogamesm12@gmail.com>
Date:   Fri Sep 10 01:39:16 2021 -0600

    Merge branch 'development' into FS-7

commit 2bdf14f38c
Merge: f6d46b61 44ff621d
Author: Video <videogamesm12@gmail.com>
Date:   Mon Sep 6 15:26:13 2021 -0600

    Merge branch 'development' into FS-215

commit b1062fbb6c
Merge: f69feed4 44ff621d
Author: Video <videogamesm12@gmail.com>
Date:   Mon Sep 6 14:39:32 2021 -0600

    Merge branch 'development' into FS-273

commit 3ca9835257
Merge: da82b270 54cb0cfa
Author: Video <videogamesm12@gmail.com>
Date:   Mon Sep 6 01:16:04 2021 -0600

    Merge branch 'development' into FS-37

commit f69feed469
Author: Video <videogamesm12@gmail.com>
Date:   Mon Sep 6 01:14:21 2021 -0600

    fixed

commit 8253f94ac4
Merge: daf0126f 54cb0cfa
Author: Video <videogamesm12@gmail.com>
Date:   Mon Sep 6 01:12:00 2021 -0600

    Merge branch 'development' into FS-273

commit a4c81f202c
Merge: 0d09c3a5 23caa4e8
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 4 01:23:06 2021 +0100

    Merge branch 'development' into shitcan-savedflags

commit da82b27016
Merge: af1df228 23caa4e8
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 4 01:07:55 2021 +0100

    Merge branch 'development' into FS-37

commit daf0126f45
Merge: a51f5c9b 23caa4e8
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 4 01:07:39 2021 +0100

    Merge branch 'development' into FS-273

commit f6d46b6178
Merge: ee804d52 23caa4e8
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 4 01:07:33 2021 +0100

    Merge branch 'development' into FS-215

commit a2d11d4b93
Merge: dc490659 23caa4e8
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 4 01:07:28 2021 +0100

    Merge branch 'development' into FS-7

commit a51f5c9bbf
Author: Video <videogamesm12@gmail.com>
Date:   Fri Sep 3 13:53:33 2021 -0600

    FS-273

commit ee804d52ff
Author: Video <videogamesm12@gmail.com>
Date:   Fri Sep 3 12:52:15 2021 -0600

    Makes [Discord] a hyperlink (FS-215)

    I've decided to overhaul the implementation of DiscordToMinecraftListener to make it more easily workable. This overhaul allows me to implement FS-215 more easily.

commit dc490659c1
Author: Video <videogamesm12@gmail.com>
Date:   Fri Sep 3 00:07:20 2021 -0600

    Begins implementing FS-7

    should be good enough, but feedback would be lovely

commit 0d09c3a550
Merge: e2ccd14e 4c3f188b
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Aug 29 20:09:03 2021 +0100

    Merge branch 'development' into shitcan-savedflags

commit e2ccd14eb3
Author: Video <videogamesm12@gmail.com>
Date:   Fri Aug 27 16:54:55 2021 -0600

    Unsaves SavedFlags

commit af1df22812
Merge: 1474a808 f380898b
Author: Video <videogamesm12@gmail.com>
Date:   Thu Aug 26 23:05:58 2021 -0600

    Merge branch 'development' into FS-37

commit 1474a80875
Merge: 77fd4ff6 f45466ee
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Thu Aug 26 13:26:44 2021 +0100

    Merge branch 'development' into FS-37

commit 77fd4ff66a
Merge: 33aca2a4 d901cbaa
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Aug 21 21:34:04 2021 +0100

    Merge branch 'development' into FS-37

commit 33aca2a482
Merge: 159eda73 0582c2e5
Author: Video <videogamesm12@gmail.com>
Date:   Tue Aug 10 22:38:51 2021 -0600

    Merge branch 'development' into FS-37

commit 159eda73a1
Merge: da2d2525 6874b2ce
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Tue Aug 10 17:34:12 2021 +0100

    Merge branch 'development' into FS-37

commit da2d25252b
Merge: e99aaa2e c8a4382a
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Tue Aug 10 17:31:13 2021 +0100

    Merge branch 'development' into FS-37

commit e99aaa2eb4
Author: Video <videogamesm12@gmail.com>
Date:   Thu Aug 5 00:32:23 2021 -0600

    Fixes FS-37

    Fixes an oversight introduced in 76bb2d08ac in which the configuration is loaded twice.
2022-02-21 16:45:03 -07:00
43c68579e5 Merge pull request #190 from AtlasMediaGroup/Elmon11-patch-2
order of messages fix
2022-02-21 10:01:39 +01:00
127ee7d9f9 Move CodeQL to Java 17 2022-02-18 16:50:45 +00:00
c873fd4abc Update pom.xml 2022-02-16 21:02:00 +00:00
fa90e1d239 Update various dependencies based on Freedom-01 State
Various plugins have been updated but not reflected back here. This PR Corrects that.
2022-02-05 23:25:57 +00:00
b711ed517f Merge branch 'development' into Elmon11-patch-2 2022-01-24 22:16:24 +01:00
2618d97a3e Remove requireNonNull method from getIp, which causes NPE - resolves FS-429 (#187)
Co-authored-by: Paldiu <pawereus@gmail.com>
2022-01-24 12:42:47 +11:00
1c4647290a Merge branch 'development' into Elmon11-patch-2 2022-01-24 12:41:47 +11:00
f00f67a844 order of messages fix
https://media.discordapp.net/attachments/874713176082636882/934559012991680532/unknown.png
2022-01-23 13:26:22 +01:00
850f12103c Merge pull request #188 from AtlasMediaGroup/Wild1145-patch-1
Correct CoreProtect Version
2022-01-17 11:35:09 -06:00
7fd77f3cbb Correct CoreProtect Version
To align with the version running on Freedom-01 at the moment.
2022-01-16 18:22:16 +00:00
2eb0ab4cb1 Merge pull request #179 from AtlasMediaGroup/FS-212
Makes spawnmob configurable, increases the default limit to 25 (FS-212)
2021-12-22 20:56:46 -07:00
2612aaec31 Makes spawnmob configurable and increases the default limit to 25 2021-12-15 21:46:56 -07:00
6e7ad73152 Nevermind that didn't work 2021-11-29 07:03:29 -07:00
af6411b82c Wait a second
This *should* work...
2021-11-29 06:54:04 -07:00
e9ba958a4e Squashed commit of the following:
commit 35965b0b10
Merge: aa20a6e5 1253732f
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 06:31:11 2021 -0700

    Merge pull request #174 from AtlasMediaGroup/FS-256

    Forces the server to recalculate the permissions server-wide in /opall (FS-256)

commit 1253732f77
Merge: e1bee321 aa20a6e5
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 06:25:25 2021 -0700

    Merge branch 'development' into FS-256

commit aa20a6e579
Merge: 70622900 1ecfb0b0
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 06:23:57 2021 -0700

    Merge pull request #129 from AtlasMediaGroup/FS-7

    Allow players to pay other players coins [FS-7]

commit e1bee32163
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 03:27:07 2021 -0700

    Forces the server to recalculate the permissions server-wide in /opall

commit 1ecfb0b066
Merge: 225ade87 70622900
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 03:01:22 2021 -0700

    Merge branch 'development' into FS-7

commit 706229004c
Merge: a42cb6af a4adfa9b
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 03:00:15 2021 -0700

    Merge pull request #131 from AtlasMediaGroup/FS-273

    Moves /rainbowtrail to the shop (FS-273)

commit a4adfa9bee
Merge: 1b5bbd1c a42cb6af
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 02:46:41 2021 -0700

    Merge branch 'development' into FS-273

commit 225ade8753
Merge: afe755f5 a42cb6af
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 02:46:02 2021 -0700

    Merge branch 'development' into FS-7

commit a42cb6aff9
Merge: 2ecfb886 01fdf766
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 02:41:34 2021 -0700

    Merge pull request #125 from AtlasMediaGroup/shitcan-savedflags

    Shitcans SavedFlags

commit 01fdf766ee
Merge: 58c21bb1 2ecfb886
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:28:48 2021 -0700

    Merge branch 'development' into shitcan-savedflags

commit afe755f5c1
Merge: 5f97e68e 2ecfb886
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:26:59 2021 -0700

    Merge branch 'development' into FS-7

commit 5f97e68e0e
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:26:49 2021 -0700

    fuck it, it works

commit 1b5bbd1c05
Merge: 8356e831 2ecfb886
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:16:21 2021 -0700

    Merge branch 'development' into FS-273

commit 2ecfb88604
Merge: 42143c11 bb2ddf11
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:15:16 2021 -0700

    Merge pull request #130 from AtlasMediaGroup/FS-215

    Makes [Discord] a hyperlink (FS-215)

commit 8356e831a5
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:11:16 2021 -0700

    Redundancy fix and better protection system

commit ab00cb840f
Merge: ecce62f6 42143c11
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 03:31:45 2021 -0700

    Merge branch 'development' into FS-273

commit bb2ddf1129
Merge: cf9fdc6f 42143c11
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 03:31:19 2021 -0700

    Merge branch 'development' into FS-215

commit 58c21bb1aa
Merge: fdba119d 42143c11
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 03:30:48 2021 -0700

    Merge branch 'development' into shitcan-savedflags

commit ecce62f6b4
Merge: d8148530 a598c933
Author: Video <videogamesm12@gmail.com>
Date:   Sat Oct 9 00:01:22 2021 -0600

    Merge branch 'development' into FS-273

commit cf9fdc6fe4
Merge: 387ea6f7 a598c933
Author: Video <videogamesm12@gmail.com>
Date:   Fri Oct 8 01:43:33 2021 -0600

    Merge branch 'development' into FS-215

commit 387ea6f71e
Merge: a1ecf881 180cd811
Author: Video <videogamesm12@gmail.com>
Date:   Fri Oct 1 00:35:12 2021 -0600

    Merge branch 'development' into FS-215

commit d814853036
Merge: 47e63869 213a4338
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Sep 12 13:49:05 2021 +0100

    Merge branch 'development' into FS-273

commit a1ecf88109
Merge: bd647afe 213a4338
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Sep 12 13:48:59 2021 +0100

    Merge branch 'development' into FS-215

commit 5a6a5ff75d
Merge: 6ca61d9c 213a4338
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Sep 12 13:48:50 2021 +0100

    Merge branch 'development' into FS-7

commit fdba119d5d
Merge: 61857dd0 213a4338
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Sep 12 13:48:44 2021 +0100

    Merge branch 'development' into shitcan-savedflags

commit 61857dd06f
Merge: 2d18d461 0e12f5e7
Author: Video <videogamesm12@gmail.com>
Date:   Sun Sep 12 03:01:37 2021 -0600

    Merge branch 'development' into shitcan-savedflags

commit bd647afe92
Merge: 69f17ef2 0e12f5e7
Author: Video <videogamesm12@gmail.com>
Date:   Sun Sep 12 02:50:39 2021 -0600

    Merge branch 'development' into FS-215

commit 69f17ef2d7
Merge: ee1b27fa aebe1ace
Author: Video <videogamesm12@gmail.com>
Date:   Sun Sep 12 02:01:56 2021 -0600

    Merge branch 'development' into FS-215

commit ee1b27fa0d
Merge: 2bdf14f3 0a9b95bf
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 11 01:24:00 2021 +0100

    Merge branch 'development' into FS-215

commit 6ca61d9c6c
Merge: fedf80b8 0a9b95bf
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 11 01:23:52 2021 +0100

    Merge branch 'development' into FS-7

commit 2d18d461fe
Merge: a4c81f20 0a9b95bf
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 11 01:23:44 2021 +0100

    Merge branch 'development' into shitcan-savedflags

commit 47e6386907
Merge: b1062fbb 0a9b95bf
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 11 01:23:13 2021 +0100

    Merge branch 'development' into FS-273

commit fedf80b834
Merge: a2d11d4b 44ff621d
Author: Video <videogamesm12@gmail.com>
Date:   Fri Sep 10 01:39:16 2021 -0600

    Merge branch 'development' into FS-7

commit 2bdf14f38c
Merge: f6d46b61 44ff621d
Author: Video <videogamesm12@gmail.com>
Date:   Mon Sep 6 15:26:13 2021 -0600

    Merge branch 'development' into FS-215

commit b1062fbb6c
Merge: f69feed4 44ff621d
Author: Video <videogamesm12@gmail.com>
Date:   Mon Sep 6 14:39:32 2021 -0600

    Merge branch 'development' into FS-273

commit f69feed469
Author: Video <videogamesm12@gmail.com>
Date:   Mon Sep 6 01:14:21 2021 -0600

    fixed

commit 8253f94ac4
Merge: daf0126f 54cb0cfa
Author: Video <videogamesm12@gmail.com>
Date:   Mon Sep 6 01:12:00 2021 -0600

    Merge branch 'development' into FS-273

commit a4c81f202c
Merge: 0d09c3a5 23caa4e8
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 4 01:23:06 2021 +0100

    Merge branch 'development' into shitcan-savedflags

commit daf0126f45
Merge: a51f5c9b 23caa4e8
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 4 01:07:39 2021 +0100

    Merge branch 'development' into FS-273

commit f6d46b6178
Merge: ee804d52 23caa4e8
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 4 01:07:33 2021 +0100

    Merge branch 'development' into FS-215

commit a2d11d4b93
Merge: dc490659 23caa4e8
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 4 01:07:28 2021 +0100

    Merge branch 'development' into FS-7

commit a51f5c9bbf
Author: Video <videogamesm12@gmail.com>
Date:   Fri Sep 3 13:53:33 2021 -0600

    FS-273

commit ee804d52ff
Author: Video <videogamesm12@gmail.com>
Date:   Fri Sep 3 12:52:15 2021 -0600

    Makes [Discord] a hyperlink (FS-215)

    I've decided to overhaul the implementation of DiscordToMinecraftListener to make it more easily workable. This overhaul allows me to implement FS-215 more easily.

commit dc490659c1
Author: Video <videogamesm12@gmail.com>
Date:   Fri Sep 3 00:07:20 2021 -0600

    Begins implementing FS-7

    should be good enough, but feedback would be lovely

commit 0d09c3a550
Merge: e2ccd14e 4c3f188b
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Aug 29 20:09:03 2021 +0100

    Merge branch 'development' into shitcan-savedflags

commit e2ccd14eb3
Author: Video <videogamesm12@gmail.com>
Date:   Fri Aug 27 16:54:55 2021 -0600

    Unsaves SavedFlags
2021-11-29 06:40:26 -07:00
8cff0124ea Merge pull request #93 from AtlasMediaGroup/FS-37
Fixes FS-37
2021-11-29 06:36:20 -07:00
1162f10ebb Merge branch 'development' into FS-37 2021-11-29 06:31:18 -07:00
35965b0b10 Merge pull request #174 from AtlasMediaGroup/FS-256
Forces the server to recalculate the permissions server-wide in /opall (FS-256)
2021-11-29 06:31:11 -07:00
1253732f77 Merge branch 'development' into FS-256 2021-11-29 06:25:25 -07:00
7ce173e02b Merge branch 'development' into FS-37 2021-11-29 06:24:34 -07:00
aa20a6e579 Merge pull request #129 from AtlasMediaGroup/FS-7
Allow players to pay other players coins [FS-7]
2021-11-29 06:23:57 -07:00
e1bee32163 Forces the server to recalculate the permissions server-wide in /opall 2021-11-29 03:27:07 -07:00
4d006ed172 Merge branch 'development' into FS-37 2021-11-29 03:04:42 -07:00
a29392cab2 Squashed commit of the following:
commit 706229004c
Merge: a42cb6af a4adfa9b
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 03:00:15 2021 -0700

    Merge pull request #131 from AtlasMediaGroup/FS-273

    Moves /rainbowtrail to the shop (FS-273)

commit a4adfa9bee
Merge: 1b5bbd1c a42cb6af
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 02:46:41 2021 -0700

    Merge branch 'development' into FS-273

commit a42cb6aff9
Merge: 2ecfb886 01fdf766
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 02:41:34 2021 -0700

    Merge pull request #125 from AtlasMediaGroup/shitcan-savedflags

    Shitcans SavedFlags

commit 01fdf766ee
Merge: 58c21bb1 2ecfb886
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:28:48 2021 -0700

    Merge branch 'development' into shitcan-savedflags

commit 1b5bbd1c05
Merge: 8356e831 2ecfb886
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:16:21 2021 -0700

    Merge branch 'development' into FS-273

commit 2ecfb88604
Merge: 42143c11 bb2ddf11
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:15:16 2021 -0700

    Merge pull request #130 from AtlasMediaGroup/FS-215

    Makes [Discord] a hyperlink (FS-215)

commit 8356e831a5
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:11:16 2021 -0700

    Redundancy fix and better protection system

commit ab00cb840f
Merge: ecce62f6 42143c11
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 03:31:45 2021 -0700

    Merge branch 'development' into FS-273

commit bb2ddf1129
Merge: cf9fdc6f 42143c11
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 03:31:19 2021 -0700

    Merge branch 'development' into FS-215

commit 58c21bb1aa
Merge: fdba119d 42143c11
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 03:30:48 2021 -0700

    Merge branch 'development' into shitcan-savedflags

commit ecce62f6b4
Merge: d8148530 a598c933
Author: Video <videogamesm12@gmail.com>
Date:   Sat Oct 9 00:01:22 2021 -0600

    Merge branch 'development' into FS-273

commit cf9fdc6fe4
Merge: 387ea6f7 a598c933
Author: Video <videogamesm12@gmail.com>
Date:   Fri Oct 8 01:43:33 2021 -0600

    Merge branch 'development' into FS-215

commit 387ea6f71e
Merge: a1ecf881 180cd811
Author: Video <videogamesm12@gmail.com>
Date:   Fri Oct 1 00:35:12 2021 -0600

    Merge branch 'development' into FS-215

commit d814853036
Merge: 47e63869 213a4338
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Sep 12 13:49:05 2021 +0100

    Merge branch 'development' into FS-273

commit a1ecf88109
Merge: bd647afe 213a4338
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Sep 12 13:48:59 2021 +0100

    Merge branch 'development' into FS-215

commit fdba119d5d
Merge: 61857dd0 213a4338
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Sep 12 13:48:44 2021 +0100

    Merge branch 'development' into shitcan-savedflags

commit 61857dd06f
Merge: 2d18d461 0e12f5e7
Author: Video <videogamesm12@gmail.com>
Date:   Sun Sep 12 03:01:37 2021 -0600

    Merge branch 'development' into shitcan-savedflags

commit bd647afe92
Merge: 69f17ef2 0e12f5e7
Author: Video <videogamesm12@gmail.com>
Date:   Sun Sep 12 02:50:39 2021 -0600

    Merge branch 'development' into FS-215

commit 69f17ef2d7
Merge: ee1b27fa aebe1ace
Author: Video <videogamesm12@gmail.com>
Date:   Sun Sep 12 02:01:56 2021 -0600

    Merge branch 'development' into FS-215

commit ee1b27fa0d
Merge: 2bdf14f3 0a9b95bf
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 11 01:24:00 2021 +0100

    Merge branch 'development' into FS-215

commit 2d18d461fe
Merge: a4c81f20 0a9b95bf
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 11 01:23:44 2021 +0100

    Merge branch 'development' into shitcan-savedflags

commit 47e6386907
Merge: b1062fbb 0a9b95bf
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 11 01:23:13 2021 +0100

    Merge branch 'development' into FS-273

commit 2bdf14f38c
Merge: f6d46b61 44ff621d
Author: Video <videogamesm12@gmail.com>
Date:   Mon Sep 6 15:26:13 2021 -0600

    Merge branch 'development' into FS-215

commit b1062fbb6c
Merge: f69feed4 44ff621d
Author: Video <videogamesm12@gmail.com>
Date:   Mon Sep 6 14:39:32 2021 -0600

    Merge branch 'development' into FS-273

commit f69feed469
Author: Video <videogamesm12@gmail.com>
Date:   Mon Sep 6 01:14:21 2021 -0600

    fixed

commit 8253f94ac4
Merge: daf0126f 54cb0cfa
Author: Video <videogamesm12@gmail.com>
Date:   Mon Sep 6 01:12:00 2021 -0600

    Merge branch 'development' into FS-273

commit a4c81f202c
Merge: 0d09c3a5 23caa4e8
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 4 01:23:06 2021 +0100

    Merge branch 'development' into shitcan-savedflags

commit daf0126f45
Merge: a51f5c9b 23caa4e8
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 4 01:07:39 2021 +0100

    Merge branch 'development' into FS-273

commit f6d46b6178
Merge: ee804d52 23caa4e8
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 4 01:07:33 2021 +0100

    Merge branch 'development' into FS-215

commit a51f5c9bbf
Author: Video <videogamesm12@gmail.com>
Date:   Fri Sep 3 13:53:33 2021 -0600

    FS-273

commit ee804d52ff
Author: Video <videogamesm12@gmail.com>
Date:   Fri Sep 3 12:52:15 2021 -0600

    Makes [Discord] a hyperlink (FS-215)

    I've decided to overhaul the implementation of DiscordToMinecraftListener to make it more easily workable. This overhaul allows me to implement FS-215 more easily.

commit 0d09c3a550
Merge: e2ccd14e 4c3f188b
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Aug 29 20:09:03 2021 +0100

    Merge branch 'development' into shitcan-savedflags

commit e2ccd14eb3
Author: Video <videogamesm12@gmail.com>
Date:   Fri Aug 27 16:54:55 2021 -0600

    Unsaves SavedFlags
2021-11-29 03:03:00 -07:00
1ecfb0b066 Merge branch 'development' into FS-7 2021-11-29 03:01:22 -07:00
706229004c Merge pull request #131 from AtlasMediaGroup/FS-273
Moves /rainbowtrail to the shop (FS-273)
2021-11-29 03:00:15 -07:00
a4adfa9bee Merge branch 'development' into FS-273 2021-11-29 02:46:41 -07:00
225ade8753 Merge branch 'development' into FS-7 2021-11-29 02:46:02 -07:00
bf2323bed2 Squashed commit of the following:
commit a42cb6aff9
Merge: 2ecfb886 01fdf766
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 02:41:34 2021 -0700

    Merge pull request #125 from AtlasMediaGroup/shitcan-savedflags

    Shitcans SavedFlags

commit 01fdf766ee
Merge: 58c21bb1 2ecfb886
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:28:48 2021 -0700

    Merge branch 'development' into shitcan-savedflags

commit 2ecfb88604
Merge: 42143c11 bb2ddf11
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:15:16 2021 -0700

    Merge pull request #130 from AtlasMediaGroup/FS-215

    Makes [Discord] a hyperlink (FS-215)

commit bb2ddf1129
Merge: cf9fdc6f 42143c11
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 03:31:19 2021 -0700

    Merge branch 'development' into FS-215

commit 58c21bb1aa
Merge: fdba119d 42143c11
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 03:30:48 2021 -0700

    Merge branch 'development' into shitcan-savedflags

commit cf9fdc6fe4
Merge: 387ea6f7 a598c933
Author: Video <videogamesm12@gmail.com>
Date:   Fri Oct 8 01:43:33 2021 -0600

    Merge branch 'development' into FS-215

commit 387ea6f71e
Merge: a1ecf881 180cd811
Author: Video <videogamesm12@gmail.com>
Date:   Fri Oct 1 00:35:12 2021 -0600

    Merge branch 'development' into FS-215

commit a1ecf88109
Merge: bd647afe 213a4338
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Sep 12 13:48:59 2021 +0100

    Merge branch 'development' into FS-215

commit fdba119d5d
Merge: 61857dd0 213a4338
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Sep 12 13:48:44 2021 +0100

    Merge branch 'development' into shitcan-savedflags

commit 61857dd06f
Merge: 2d18d461 0e12f5e7
Author: Video <videogamesm12@gmail.com>
Date:   Sun Sep 12 03:01:37 2021 -0600

    Merge branch 'development' into shitcan-savedflags

commit bd647afe92
Merge: 69f17ef2 0e12f5e7
Author: Video <videogamesm12@gmail.com>
Date:   Sun Sep 12 02:50:39 2021 -0600

    Merge branch 'development' into FS-215

commit 69f17ef2d7
Merge: ee1b27fa aebe1ace
Author: Video <videogamesm12@gmail.com>
Date:   Sun Sep 12 02:01:56 2021 -0600

    Merge branch 'development' into FS-215

commit ee1b27fa0d
Merge: 2bdf14f3 0a9b95bf
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 11 01:24:00 2021 +0100

    Merge branch 'development' into FS-215

commit 2d18d461fe
Merge: a4c81f20 0a9b95bf
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 11 01:23:44 2021 +0100

    Merge branch 'development' into shitcan-savedflags

commit 2bdf14f38c
Merge: f6d46b61 44ff621d
Author: Video <videogamesm12@gmail.com>
Date:   Mon Sep 6 15:26:13 2021 -0600

    Merge branch 'development' into FS-215

commit a4c81f202c
Merge: 0d09c3a5 23caa4e8
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 4 01:23:06 2021 +0100

    Merge branch 'development' into shitcan-savedflags

commit f6d46b6178
Merge: ee804d52 23caa4e8
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 4 01:07:33 2021 +0100

    Merge branch 'development' into FS-215

commit ee804d52ff
Author: Video <videogamesm12@gmail.com>
Date:   Fri Sep 3 12:52:15 2021 -0600

    Makes [Discord] a hyperlink (FS-215)

    I've decided to overhaul the implementation of DiscordToMinecraftListener to make it more easily workable. This overhaul allows me to implement FS-215 more easily.

commit 0d09c3a550
Merge: e2ccd14e 4c3f188b
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Aug 29 20:09:03 2021 +0100

    Merge branch 'development' into shitcan-savedflags

commit e2ccd14eb3
Author: Video <videogamesm12@gmail.com>
Date:   Fri Aug 27 16:54:55 2021 -0600

    Unsaves SavedFlags
2021-11-29 02:44:23 -07:00
8cbfde8bbc Merge branch 'development' into FS-37 2021-11-29 02:41:49 -07:00
a42cb6aff9 Merge pull request #125 from AtlasMediaGroup/shitcan-savedflags
Shitcans SavedFlags
2021-11-29 02:41:34 -07:00
5849947c6b This should fix it 2021-11-29 02:35:36 -07:00
01fdf766ee Merge branch 'development' into shitcan-savedflags 2021-11-23 09:28:48 -07:00
afe755f5c1 Merge branch 'development' into FS-7 2021-11-23 09:26:59 -07:00
5f97e68e0e fuck it, it works 2021-11-23 09:26:49 -07:00
1b5bbd1c05 Merge branch 'development' into FS-273 2021-11-23 09:16:21 -07:00
2ecfb88604 Merge pull request #130 from AtlasMediaGroup/FS-215
Makes [Discord] a hyperlink (FS-215)
2021-11-23 09:15:16 -07:00
8356e831a5 Redundancy fix and better protection system 2021-11-23 09:11:16 -07:00
ab00cb840f Merge branch 'development' into FS-273 2021-11-23 03:31:45 -07:00
bb2ddf1129 Merge branch 'development' into FS-215 2021-11-23 03:31:19 -07:00
bba5ec922b Merge branch 'development' into FS-37 2021-11-23 03:31:13 -07:00
58c21bb1aa Merge branch 'development' into shitcan-savedflags 2021-11-23 03:30:48 -07:00
f190bbeac1 FS-292 2021-11-23 00:27:57 -07:00
42143c1163 Merge pull request #168 from AtlasMediaGroup/main
merge down into development
2021-11-22 12:35:18 -07:00
6453e4efca Merge pull request #145 from AtlasMediaGroup/RELEASE-2021.09
Release 2021.09
2021-11-22 18:43:06 +00:00
9155ac90b5 Official Release 2021-11-22 12:29:54 -06:00
1e1367d08f Bump to RC03 2021-11-13 02:58:36 -07:00
3f690e2ca1 Merge pull request #167 from AtlasMediaGroup/whoops
Fixes an oopsie I made whilst sleep deprived
2021-11-13 02:48:51 -07:00
abfa3b977c Whoops
This commit fixes 2 things:
1. A redundant check that was completely unnecessary
2. A loophole in my original bugfix commit I didn't initially discover until afterwards which enables players to do the same thing except with right clicking instead

The block inspector should be completely rewritten in the future, but for now it works.
2021-11-13 02:35:30 -07:00
68adaed997 Merge branch 'development' into FS-37 2021-10-09 00:09:24 -06:00
ecce62f6b4 Merge branch 'development' into FS-273 2021-10-09 00:01:22 -06:00
cf9fdc6fe4 Merge branch 'development' into FS-215 2021-10-08 01:43:33 -06:00
a728ec24d4 Merge pull request #156 from AtlasMediaGroup/critical-inspect-bugfix
Critical Bugfix
2021-10-04 17:59:10 -05:00
74a71b1843 Important bugfix
It appears someone had an extremely big brain moment.
2021-10-04 16:02:39 -06:00
4d469cdc0a Move from Java 16 to Java 17 (#149)
* Move from Java 16 to Java 17

* Update java17-maven.yml
2021-10-03 15:57:47 +01:00
4c287ca9b8 Bump to RC02 2021-10-03 15:50:33 +01:00
912bc1a1e4 Merge pull request #154 from AtlasMediaGroup/development
Development
2021-10-03 07:02:37 -06:00
a598c933ec Merge pull request #151 from AtlasMediaGroup/FS-421
Two fixes (FS-421)
2021-10-03 06:52:45 -06:00
936f0b621e Stupid simple fix
Fixes an oopsie I made and an oopsie someone else made which broke the entire plugin.
2021-10-03 06:45:02 -06:00
387ea6f71e Merge branch 'development' into FS-215 2021-10-01 00:35:12 -06:00
e122c4c5fa Bump to 2021.09-RC01 Release 2021-09-19 17:32:05 +01:00
180cd81132 Bump junit-jupiter from 5.7.2 to 5.8.0 (#139)
Bumps [junit-jupiter](https://github.com/junit-team/junit5) from 5.7.2 to 5.8.0.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.7.2...r5.8.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-13 09:58:54 +01:00
d814853036 Merge branch 'development' into FS-273 2021-09-12 13:49:05 +01:00
a1ecf88109 Merge branch 'development' into FS-215 2021-09-12 13:48:59 +01:00
5a6a5ff75d Merge branch 'development' into FS-7 2021-09-12 13:48:50 +01:00
fdba119d5d Merge branch 'development' into shitcan-savedflags 2021-09-12 13:48:44 +01:00
087b8dd7ea Merge branch 'development' into FS-37 2021-09-12 13:48:21 +01:00
213a43380e Bump git-commit-id-plugin from 4.0.2 to 4.9.10 (#113)
Bumps git-commit-id-plugin from 4.0.2 to 4.9.10.

---
updated-dependencies:
- dependency-name: pl.project13.maven:git-commit-id-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-12 12:13:56 +01:00
8a31b4c5c0 Bump javassist from 3.27.0-GA to 3.28.0-GA (#110)
Bumps [javassist](https://github.com/jboss-javassist/javassist) from 3.27.0-GA to 3.28.0-GA.
- [Release notes](https://github.com/jboss-javassist/javassist/releases)
- [Commits](https://github.com/jboss-javassist/javassist/commits)

---
updated-dependencies:
- dependency-name: org.javassist:javassist
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-12 11:33:52 +01:00
3818aab454 Merge branch 'development' into FS-37 2021-09-12 03:04:08 -06:00
61857dd06f Merge branch 'development' into shitcan-savedflags 2021-09-12 03:01:37 -06:00
bd647afe92 Merge branch 'development' into FS-215 2021-09-12 02:50:39 -06:00
0e12f5e792 Bump commons-lang3 from 3.11 to 3.12.0 (#111)
Bumps commons-lang3 from 3.11 to 3.12.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-lang3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-12 09:09:28 +01:00
69f17ef2d7 Merge branch 'development' into FS-215 2021-09-12 02:01:56 -06:00
aebe1acec2 Merge pull request #136 from AtlasMediaGroup/multiple-birds-one-stone
Multiple fixes, one commit
2021-09-12 01:57:32 -06:00
938b3aa630 Merge branch 'development' into multiple-birds-one-stone 2021-09-11 20:53:16 -06:00
6772333eb4 Bump junit-jupiter from 5.4.2 to 5.7.2 (#103)
Bumps [junit-jupiter](https://github.com/junit-team/junit5) from 5.4.2 to 5.7.2.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.4.2...r5.7.2)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-12 00:10:47 +01:00
0204961834 Bump commons-io from 2.8.0 to 2.11.0 (#117)
Bumps commons-io from 2.8.0 to 2.11.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-11 23:53:41 +01:00
2f332a8c42 Bump annotations from 20.1.0 to 22.0.0 (#104)
Bumps [annotations](https://github.com/JetBrains/java-annotations) from 20.1.0 to 22.0.0.
- [Release notes](https://github.com/JetBrains/java-annotations/releases)
- [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md)
- [Commits](https://github.com/JetBrains/java-annotations/compare/20.1.0...22.0.0)

---
updated-dependencies:
- dependency-name: org.jetbrains:annotations
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-11 18:48:33 +01:00
e288668c92 Bump maven-antrun-plugin from 1.8 to 3.0.0 (#102)
Bumps [maven-antrun-plugin](https://github.com/apache/maven-antrun-plugin) from 1.8 to 3.0.0.
- [Release notes](https://github.com/apache/maven-antrun-plugin/releases)
- [Commits](https://github.com/apache/maven-antrun-plugin/compare/maven-antrun-plugin-1.8...maven-antrun-plugin-3.0.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-antrun-plugin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-11 18:42:31 +01:00
caeda219fa Merge branch 'development' into FS-37 2021-09-11 15:26:37 +01:00
e50101df43 Merge branch 'development' into multiple-birds-one-stone 2021-09-11 15:24:52 +01:00
ee1b27fa0d Merge branch 'development' into FS-215 2021-09-11 01:24:00 +01:00
6ca61d9c6c Merge branch 'development' into FS-7 2021-09-11 01:23:52 +01:00
2d18d461fe Merge branch 'development' into shitcan-savedflags 2021-09-11 01:23:44 +01:00
47e6386907 Merge branch 'development' into FS-273 2021-09-11 01:23:13 +01:00
0a9b95bfce Move to new ATLAS Nexus (#138)
* Move to new ATLAS Nexus

Turns out jFrog is super expensive and 10GB of Bandwidth doesn't go far, this should make things a lot better :)

* Update pom.xml

* Update pom.xml
2021-09-11 01:19:08 +01:00
fedf80b834 Merge branch 'development' into FS-7 2021-09-10 01:39:16 -06:00
2bdf14f38c Merge branch 'development' into FS-215 2021-09-06 15:26:13 -06:00
b1062fbb6c Merge branch 'development' into FS-273 2021-09-06 14:39:32 -06:00
f00f075551 Merge branch 'development' into multiple-birds-one-stone 2021-09-06 14:38:42 -06:00
44ff621d73 Bump bstats-bukkit from 1.8 to 2.2.1 (#99)
Bumps [bstats-bukkit](https://github.com/Bastian/bStats-Metrics) from 1.8 to 2.2.1.
- [Release notes](https://github.com/Bastian/bStats-Metrics/releases)
- [Commits](https://github.com/Bastian/bStats-Metrics/commits/v2.2.1)

---
updated-dependencies:
- dependency-name: org.bstats:bstats-bukkit
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ryan <Wild1145@users.noreply.github.com>

Resolves FS-419
2021-09-06 20:21:49 +01:00
032e54e2d4 Multiple birds, one commit
Here's a list of things I've fixed/mitigated:
- Range bans in ban-related commands (FS-209)
- Bug in /tempban where the duration in the broadcast is always wrong
- Over-complicated handling of /tempban durations (instead of trying to process them and silently fail, it'll flat out say that an invalid duration is well, invalid)
- Inconsistent "player not found" messages in banning commands
- (Mitigates) weird issue with case-sensitive usernames in banning commands when the server has restarted since a player last joined
- (Mitigates) banned IPs being inaccurate when a player was banned offline whilst containing multiple IPs in their playerdata
- Redoing how MovementValidator handled positive and negative infinity exploit items, completely removing the need for Mojangson in the first place and allowing the plugin to run without Essentials once more in the process (related to FS-406)

Here is what I've done in addition:
- Merged /tban and /noob into /tempban, which now bans for 5 minutes by default (FS-205)
2021-09-06 04:44:39 -06:00
3ca9835257 Merge branch 'development' into FS-37 2021-09-06 01:16:04 -06:00
f69feed469 fixed 2021-09-06 01:14:21 -06:00
8253f94ac4 Merge branch 'development' into FS-273 2021-09-06 01:12:00 -06:00
54cb0cfac4 FS-409 (#124)
Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
2021-09-05 14:51:43 +01:00
a4c81f202c Merge branch 'development' into shitcan-savedflags 2021-09-04 01:23:06 +01:00
da82b27016 Merge branch 'development' into FS-37 2021-09-04 01:07:55 +01:00
daf0126f45 Merge branch 'development' into FS-273 2021-09-04 01:07:39 +01:00
f6d46b6178 Merge branch 'development' into FS-215 2021-09-04 01:07:33 +01:00
a2d11d4b93 Merge branch 'development' into FS-7 2021-09-04 01:07:28 +01:00
23caa4e853 Dependency Fix & Improvements (#132)
* Upgrade Test

Going to see if switching to the new repo that went live 3 days ago and updating TFM to pull the latest version of Essentials is going to help things here. TFM is building locally so I haven't a fucking scooby doo why Github can't run the build because I've even tried dropping the M2 folder...

* Let's try again

Utter bullshit so far.

* Apparently we don't even use essentials...

No idea where the imports for EssentialsBridge are coming from...

* Various tweaks

Hopefully this might give some more joy, but if not it's removed a command I didn't want anyway and reduced our dependency tree.

I have also switched it to using the ATLAS Artafactory which will serve as an ongoing cache for dependencies and should start to speed up our Github builds as Maven is rubbish with many repo's.
2021-09-04 01:07:04 +01:00
a51f5c9bbf FS-273 2021-09-03 13:53:33 -06:00
ee804d52ff Makes [Discord] a hyperlink (FS-215)
I've decided to overhaul the implementation of DiscordToMinecraftListener to make it more easily workable. This overhaul allows me to implement FS-215 more easily.
2021-09-03 12:52:15 -06:00
dc490659c1 Begins implementing FS-7
should be good enough, but feedback would be lovely
2021-09-03 00:07:20 -06:00
0d09c3a550 Merge branch 'development' into shitcan-savedflags 2021-08-29 20:09:03 +01:00
4c3f188bb8 Bump actions/setup-java from 2.2.0 to 2.3.0 (#122)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v2.2.0...v2.3.0)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
2021-08-29 20:08:43 +01:00
e2ccd14eb3 Unsaves SavedFlags 2021-08-27 16:54:55 -06:00
af1df22812 Merge branch 'development' into FS-37 2021-08-26 23:05:58 -06:00
f380898bb7 yo remove my name (#123)
Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
2021-08-26 16:22:08 +01:00
464ed85f1b Update java16-maven.yml 2021-08-26 16:18:58 +01:00
7dd235b166 Update java11-maven.yml 2021-08-26 16:18:49 +01:00
1474a80875 Merge branch 'development' into FS-37 2021-08-26 13:26:44 +01:00
f45466ee24 Create java16-maven.yml 2021-08-26 13:01:20 +01:00
d70b7bbec2 Split out Java 11 and Java 16 for faster runs 2021-08-26 13:00:19 +01:00
541c66c3de Bump codacy/codacy-analysis-cli-action from 1.1.0 to 4.0.0 (#101)
Bumps [codacy/codacy-analysis-cli-action](https://github.com/codacy/codacy-analysis-cli-action) from 1.1.0 to 4.0.0.
- [Release notes](https://github.com/codacy/codacy-analysis-cli-action/releases)
- [Commits](https://github.com/codacy/codacy-analysis-cli-action/compare/1.1.0...4.0.0)

---
updated-dependencies:
- dependency-name: codacy/codacy-analysis-cli-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-21 21:50:45 +01:00
77fd4ff66a Merge branch 'development' into FS-37 2021-08-21 21:34:04 +01:00
d901cbaa81 Update pom.xml (#121)
* Update pom.xml

* Fix version from re-upload
2021-08-21 21:25:56 +01:00
538ed7020d Merge branch 'development' of https://github.com/AtlasMediaGroup/TotalFreedomMod into development 2021-08-21 15:36:32 +01:00
18e6ef16be Merge branch 'main' of https://github.com/AtlasMediaGroup/TotalFreedomMod into development 2021-08-21 15:36:26 +01:00
a335a2acf7 Bump maven-checkstyle-plugin from 3.1.1 to 3.1.2 (#114)
Bumps [maven-checkstyle-plugin](https://github.com/apache/maven-checkstyle-plugin) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/apache/maven-checkstyle-plugin/releases)
- [Commits](https://github.com/apache/maven-checkstyle-plugin/compare/maven-checkstyle-plugin-3.1.1...maven-checkstyle-plugin-3.1.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-checkstyle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-21 15:21:18 +01:00
2eb6cc0036 Correct CoreProtect POM Version (#108)
Co-authored-by: Video <videogamesm12@gmail.com>
2021-08-18 23:45:56 +01:00
5322d8ab64 Fixing Github Actions (#107)
Hopefully this should now let us automatically down-sync from Main to Development
2021-08-18 23:45:34 +01:00
dccc315869 Bump actions/setup-java from 1.4.3 to 2.2.0 (#98)
* Bump actions/setup-java from 1.4.3 to 2.2.0

Bumps [actions/setup-java](https://github.com/actions/setup-java) from 1.4.3 to 2.2.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v1.4.3...v2.2.0)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix the breaking change the 2.x branch of the action added

There is a breaking change which Dependabot hasn't picked up on which causes this to not play ball. This should resolve said issue.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wild1145 <Wild1145@users.noreply.github.com>
2021-08-17 20:50:03 +01:00
7657ae1928 Fix Dependabot to target the right branch and open all PR (#106) 2021-08-17 19:28:14 +01:00
dcaf1ec11a Release 2021.06 (#97)
* Update Command_ride.java

* ok, done (FS-156)

* Fixes FS-137

* grammar fix

* Remove a number of wipe commands we don't want anyway

We shouldn't be wiping any of this data within the server now anyway so let's not tempt fate again.

* Why overcomplicating things is a horrifically bad idea (#55)

The longer I look into this plugin's code, the angrier I will become.

This fixes 2 bugs in the /potion command:
- Fixes non-admins being able to clear other players
- Fixes NPE caused when trying to add potion effects to players who are not on the server as a non-admin.

Both of these issues are caused by overcomplicating seemingly simple solutions, hence the name of this commit.

Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com>

* Bug fixes, improvements, and removals (FS-192) (#46)

* Three fixes

* Fixes /tempban throwing a NullPointerException when trying to get a player who isn't on the server but was in the past
* Fixes /tempban banning players for 24 hours regardless of the duration defined
* Fixes /list -t throwing a NullPointerException when performed from a non-player source (such as Telnet)

* Removes hubworld entriely

* Configurable blacklists for tag, muted commands, and wildcard

Changes:
* Moves globally blocked commands to the `global` subsection of the original `blocked_commands` section. You *will* need to update your configurations
* /wildcard's command blacklist is now configurable under the `wildcard` section in `blocked_commands`.
* The commands muted players can't use are now configurable under the `muted` section in `blocked_commands`.
* Removes some commented-out globally blocked command entries.

Co-authored-by: Ryan <Wild1145@users.noreply.github.com>

* Switched from -c to -ci (#63)

Resolves FS-219

* Added new dependency to allow TFM to compile (#65)

* Name change for Fleek (#64)

* Add //g to blocked commands (#62)

Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com>

* Small modification to new TFGuilds (FS-255) (#67)

* Calculate the player count without offline players (FS-247) (#68)

Co-authored-by: Ryan <Wild1145@users.noreply.github.com>

* Use long instead of int and use offset to check time (FS-181) (#69)

* Use long instead of int and use offset to check time (FS-181)

* Remove star import

* Addresses FS-224 (#70)

* Continuation on that notes thing (#74)

I forgot to remove the dependency after I removed the code that used JSONMessage. This fixes that by removing both the repository and the dependency from the pom file.

* Updated permissions to re-baseline with the dev server (#75)

Updating this to be based off of the dev server as it seems this has not been updated in some time. Primary purpose is to add the crackshot bypass removal for everyone (Though allow admins to bypass) and to add a start of network manager perms in the hopes it makes it more usable going forward.

* Two fixes, one commit

To kill two birds with one stone, I've done two fixes in this commit.
- Fixes issue that caused quiet warns to behave improperly (e.g. the warnings wouldn't increment if quiet)
- Added WARN to the PunishmentType list.

* Update EntityWiper.java

* FS-27

* FS-26

* FS-25

* Code quality and consistency improvements

Here's all the changes I've made in this commit:
- Resolves FS-44 (AutoEject.java)
- Resolves FS-45 (BlockBlocker.java)
- Resolves FS-47 and FS-48 (InteractBlocker.java)
- Resolves FS-49 (Command_cage.java)
- Resolves FS-50 (Command_manageshop.java)
- Resolves FS-51 (Command_notes.java)
- Resolves FS-52 (Command_potion.java)
- Resolves FS-53 (Command_tag.java)
- Resolves FS-55 (ItemFun.java)
- Resolves FS-56 (Module_list.java)
- Resolves FS-57 (Module_players.java)
- Removes redundant code from InteractBlocker.java
- Misc. code consistency corrections (global)

* FS-54

* Shut up Codacy

* FS-201

* Simple fix

* Even more punishment log types

Here's what I've changed in this commit:
- Adds /blockcmd to the punishment log (FS-239)
- Adds /blockedit and /blockpvp to the punishment log (FS-240)
- Adds /cage to the punishment log (FS-241)
- Adds /orbit to the punishment log (FS-242)
- Changes the order of operations in some commands to be a bit more consistent

* Order of operations fix

* ez (#77)

* Start building Java 16 (#84)

* Start building Java 16

* Re-apply Fleek's change

* Removed the shitty Github auto formatted white space.

* Update to the maven build in Github workflows

Given TravisCI has started to charge, I guess this might be what we move back to using as our main way to verify if something can actually build.

* Update maven.yml

* Delete .travis.yml

* Adds /seed command (FS-225) (#85)

* Create Command_seed.java

* Addresses requested changes

* My IDE decided to try to "fix" things with *s in imports

Co-authored-by: Ryan <Wild1145@users.noreply.github.com>

* Use 'getPlayer()' to prevent NPE (FS-159) (#87)

Co-authored-by: Ryan <Wild1145@users.noreply.github.com>

* 2 bugfixes

- Fixes FS-309 by checking if a material provided is actually a block before caging someone.
- Fixes a bug that causes the command to throw an ArrayOutOfBoundsException if one were to use a command like `/cage player1 block`.

* Temporarily re-naming /clearchat to /cleanchat (#91)

* Temporarily re-naming /clearchat to /cleanchat

Due to another plugin which currently doesn't quite have all the permissions working, this command is not currently able to be executed as it stands.

* Shhh I know I'm an idiot

* Let's actually do dependency uplifts (#89)

* Bump release to 2021.06-RC01

* Bump to release version

We're good to go!

Co-authored-by: Video <videogamesm12@gmail.com>
Co-authored-by: Elmon11 <elmon11bussiness@gmail.com>
Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com>
Co-authored-by: Paldiu <pawereus@gmail.com>
2021-08-15 01:06:21 +01:00
33aca2a482 Merge branch 'development' into FS-37 2021-08-10 22:38:51 -06:00
0582c2e5be Merge pull request #94 from AtlasMediaGroup/FS-381
Enables Lava Damage by default (FS-381)
2021-08-10 22:38:24 -06:00
159eda73a1 Merge branch 'development' into FS-37 2021-08-10 17:34:12 +01:00
101987cc17 Merge branch 'development' into FS-381 2021-08-10 17:34:03 +01:00
6874b2ce13 Fixes /setlevel by completely removing it (FS-82) (#95)
To quote Ryan:
> If /exp works (and we've said it has) then the scope of this ticket will be to just go remove the TFM command...

This does exactly that.
2021-08-10 17:33:48 +01:00
3be0ffba4e Merge branch 'development' into FS-381 2021-08-10 17:31:26 +01:00
da2d25252b Merge branch 'development' into FS-37 2021-08-10 17:31:13 +01:00
c8a4382a7b Merge pull request #96 from AtlasMediaGroup/FS-218
Adds functionality for a one-time message to be sent to new players (FS-218)
2021-08-10 07:41:42 -06:00
3f89f3f48e Shut the fuck up Codacy 2021-08-10 06:58:04 -06:00
871acc2eeb Actually, let's make it possible to disable it if needed 2021-08-10 04:13:23 -06:00
a9c9979b1c FS-218 2021-08-10 04:06:41 -06:00
fc3fe871b3 FS-381 2021-08-05 00:43:01 -06:00
e99aaa2eb4 Fixes FS-37
Fixes an oversight introduced in 76bb2d08ac in which the configuration is loaded twice.
2021-08-05 00:32:23 -06:00
62529a6171 Merge branch 'main' of https://github.com/AtlasMediaGroup/TotalFreedomMod into development 2021-07-17 13:18:18 +01:00
0caf972248 Merge pull request #90 from AtlasMediaGroup/FS-309
2 bugfixes, one command (FS-309)
2021-07-16 09:05:57 -05:00
a37364d07e Correct JDK Version in README (#92)
It's currently wrong so needed updating.
2021-07-16 11:43:46 +01:00
4ac9844534 Merge branch 'development' into FS-309 2021-07-12 22:53:44 -06:00
939e98b759 Update badges (#88)
Remove TravisCI
Add Github Maven Build Action 
Add CodeQL Badge
2021-07-08 20:48:41 +01:00
d99f3e657b Let's actually do dependency uplifts (#89) 2021-07-08 20:48:27 +01:00
92bbb62379 Temporarily re-naming /clearchat to /cleanchat (#91)
* Temporarily re-naming /clearchat to /cleanchat

Due to another plugin which currently doesn't quite have all the permissions working, this command is not currently able to be executed as it stands.

* Shhh I know I'm an idiot
2021-07-05 23:29:22 +01:00
e4a0943af2 Merge branch 'development' into FS-309 2021-06-29 22:00:13 -06:00
36bd8c0fad 2 bugfixes
- Fixes FS-309 by checking if a material provided is actually a block before caging someone.
- Fixes a bug that causes the command to throw an ArrayOutOfBoundsException if one were to use a command like `/cage player1 block`.
2021-06-29 21:52:46 -06:00
d77f59435b Use 'getPlayer()' to prevent NPE (FS-159) (#87)
Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
2021-06-26 15:06:15 +01:00
a08fd2afb6 Adds /seed command (FS-225) (#85)
* Create Command_seed.java

* Addresses requested changes

* My IDE decided to try to "fix" things with *s in imports

Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
2021-06-26 14:25:08 +01:00
6fd075fe96 Start building Java 16 (#84)
* Start building Java 16

* Re-apply Fleek's change

* Removed the shitty Github auto formatted white space.

* Update to the maven build in Github workflows

Given TravisCI has started to charge, I guess this might be what we move back to using as our main way to verify if something can actually build.

* Update maven.yml

* Delete .travis.yml
2021-06-24 21:21:39 +01:00
f57fc56f4a Merge pull request #83 from AtlasMediaGroup/FS-239-to-FS-242
Logs even more punishment types (FS-239, FS-240, FS-241, FS-242)
2021-06-19 03:20:47 -06:00
a6ca6b122c Merge branch 'development' into FS-239-to-FS-242 2021-06-18 13:24:15 +01:00
064e73f58b ez (#77) 2021-06-18 13:16:52 +01:00
32138b2e59 Order of operations fix 2021-06-17 13:41:25 -06:00
e1c3bad4d0 Even more punishment log types
Here's what I've changed in this commit:
- Adds /blockcmd to the punishment log (FS-239)
- Adds /blockedit and /blockpvp to the punishment log (FS-240)
- Adds /cage to the punishment log (FS-241)
- Adds /orbit to the punishment log (FS-242)
- Changes the order of operations in some commands to be a bit more consistent
2021-06-17 06:56:52 -06:00
4e78027f0c Merge pull request #79 from AtlasMediaGroup/FS-307
Fixes the EntityWiper not toggling properly (FS-307)
2021-06-17 06:12:26 -06:00
721f4f9fc3 Merge branch 'development' into FS-307 2021-06-17 05:56:56 -06:00
24ad2611a9 Merge pull request #81 from AtlasMediaGroup/FS-201
Admins can now see commands of everyone, regardless of rank (FS-201)
2021-06-17 05:54:10 -06:00
c238f251f2 Merge branch 'development' into FS-201 2021-06-17 05:46:40 -06:00
02848e3439 Merge pull request #82 from AtlasMediaGroup/FS-199
Prevents entities of type PLAYER from being purged in /entitywipe (FS-199)
2021-06-17 05:46:28 -06:00
9550f54e2b Merge branch 'development' into FS-199 2021-06-17 05:37:30 -06:00
39dade78e3 Merge pull request #80 from AtlasMediaGroup/FS-24-Round-2
Code quality improvements (FS-24)
2021-06-17 05:35:55 -06:00
5b6d8b01a4 Merge branch 'development' into FS-24-Round-2 2021-06-17 05:25:42 -06:00
96bc83cead Merge pull request #78 from AtlasMediaGroup/FS-207
Two fixes, one commit (FS-207)
2021-06-17 04:58:26 -06:00
be700a90ce Simple fix 2021-06-16 22:42:45 -06:00
6d1fce1716 FS-201 2021-06-16 22:06:12 -06:00
d3665f31fe Shut up Codacy 2021-06-16 21:56:25 -06:00
4188cb80fa FS-54 2021-06-16 21:10:08 -06:00
62fe72d99b Code quality and consistency improvements
Here's all the changes I've made in this commit:
- Resolves FS-44 (AutoEject.java)
- Resolves FS-45 (BlockBlocker.java)
- Resolves FS-47 and FS-48 (InteractBlocker.java)
- Resolves FS-49 (Command_cage.java)
- Resolves FS-50 (Command_manageshop.java)
- Resolves FS-51 (Command_notes.java)
- Resolves FS-52 (Command_potion.java)
- Resolves FS-53 (Command_tag.java)
- Resolves FS-55 (ItemFun.java)
- Resolves FS-56 (Module_list.java)
- Resolves FS-57 (Module_players.java)
- Removes redundant code from InteractBlocker.java
- Misc. code consistency corrections (global)
2021-06-16 21:10:08 -06:00
f4749559d2 FS-25 2021-06-16 21:10:08 -06:00
ed815794ed FS-26 2021-06-16 21:10:08 -06:00
0c12a19d1d FS-27 2021-06-16 21:10:08 -06:00
96d47e8e0c Update EntityWiper.java 2021-06-16 17:47:09 -06:00
3027e2a18c Two fixes, one commit
To kill two birds with one stone, I've done two fixes in this commit.
- Fixes issue that caused quiet warns to behave improperly (e.g. the warnings wouldn't increment if quiet)
- Added WARN to the PunishmentType list.
2021-06-16 17:29:57 -06:00
06025b2e69 Updated permissions to re-baseline with the dev server (#75)
Updating this to be based off of the dev server as it seems this has not been updated in some time. Primary purpose is to add the crackshot bypass removal for everyone (Though allow admins to bypass) and to add a start of network manager perms in the hopes it makes it more usable going forward.
2021-06-13 19:51:27 +01:00
da7e8f64aa Continuation on that notes thing (#74)
I forgot to remove the dependency after I removed the code that used JSONMessage. This fixes that by removing both the repository and the dependency from the pom file.
2021-06-12 11:26:40 +01:00
17b051e2a7 Retired support for 2021.02 fully. (#72) 2021-06-07 16:26:15 +01:00
77a05f22a8 TotalFreedomMod May Update 2021-06-07 16:26:15 +01:00
5c3ef1f107 Bump version 2021-06-07 16:26:15 +01:00
53c5991971 Addresses FS-224 (#70) 2021-06-07 16:26:15 +01:00
ff760a6c11 Use long instead of int and use offset to check time (FS-181) (#69)
* Use long instead of int and use offset to check time (FS-181)

* Remove star import
2021-06-07 16:26:15 +01:00
63069ff9ec Calculate the player count without offline players (FS-247) (#68)
Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
2021-06-07 16:26:15 +01:00
5e63b71861 Small modification to new TFGuilds (FS-255) (#67) 2021-06-07 16:26:15 +01:00
b72782de4f Add //g to blocked commands (#62)
Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com>
2021-06-07 16:26:15 +01:00
de9556c550 Name change for Fleek (#64) 2021-06-07 16:26:15 +01:00
6590504545 Added new dependency to allow TFM to compile (#65) 2021-06-07 16:26:15 +01:00
8d1e8dcf05 Switched from -c to -ci (#63)
Resolves FS-219
2021-06-07 16:26:15 +01:00
07b5076717 Bug fixes, improvements, and removals (FS-192) (#46)
* Three fixes

* Fixes /tempban throwing a NullPointerException when trying to get a player who isn't on the server but was in the past
* Fixes /tempban banning players for 24 hours regardless of the duration defined
* Fixes /list -t throwing a NullPointerException when performed from a non-player source (such as Telnet)

* Removes hubworld entriely

* Configurable blacklists for tag, muted commands, and wildcard

Changes:
* Moves globally blocked commands to the `global` subsection of the original `blocked_commands` section. You *will* need to update your configurations
* /wildcard's command blacklist is now configurable under the `wildcard` section in `blocked_commands`.
* The commands muted players can't use are now configurable under the `muted` section in `blocked_commands`.
* Removes some commented-out globally blocked command entries.

Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
2021-06-07 16:26:15 +01:00
6fb9507a4c Why overcomplicating things is a horrifically bad idea (#55)
The longer I look into this plugin's code, the angrier I will become.

This fixes 2 bugs in the /potion command:
- Fixes non-admins being able to clear other players
- Fixes NPE caused when trying to add potion effects to players who are not on the server as a non-admin.

Both of these issues are caused by overcomplicating seemingly simple solutions, hence the name of this commit.

Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com>
2021-06-07 16:26:15 +01:00
879a524bb4 Remove a number of wipe commands we don't want anyway
We shouldn't be wiping any of this data within the server now anyway so let's not tempt fate again.
2021-06-07 16:26:15 +01:00
c60b451ce7 grammar fix 2021-06-07 16:26:15 +01:00
f85f3e32ea Fixes FS-137 2021-06-07 16:26:15 +01:00
57b3351047 ok, done (FS-156) 2021-06-07 16:26:15 +01:00
dd10eb3f5e Update Command_ride.java 2021-06-07 16:26:15 +01:00
a498104777 Merge branch 'main' of github.com:AtlasMediaGroup/TotalFreedomMod into development 2021-06-07 16:22:43 +01:00
4e577f97fa Enable downward Sync from main (#60)
We want to make sure anything on the main branch which is commited makes it's way down to the dev and other branches.
2021-05-28 15:22:07 +01:00
8c7bf365a0 Addresses FS-224 (#70) 2021-05-26 19:55:49 +10:00
eedb7a5375 Use long instead of int and use offset to check time (FS-181) (#69)
* Use long instead of int and use offset to check time (FS-181)

* Remove star import
2021-05-25 21:45:53 +10:00
d047cfc8ff Calculate the player count without offline players (FS-247) (#68)
Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
2021-05-22 15:40:55 +01:00
9ff5da8d8f Small modification to new TFGuilds (FS-255) (#67) 2021-05-22 15:06:34 +01:00
ac615f54f7 Add //g to blocked commands (#62)
Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com>
2021-05-21 22:44:51 +01:00
21af722e23 Name change for Fleek (#64) 2021-05-17 20:31:34 +10:00
b1196fcf00 Added new dependency to allow TFM to compile (#65) 2021-05-17 06:50:09 +01:00
d170f6d323 Switched from -c to -ci (#63)
Resolves FS-219
2021-05-16 15:27:12 +01:00
9dd0298f56 Bug fixes, improvements, and removals (FS-192) (#46)
* Three fixes

* Fixes /tempban throwing a NullPointerException when trying to get a player who isn't on the server but was in the past
* Fixes /tempban banning players for 24 hours regardless of the duration defined
* Fixes /list -t throwing a NullPointerException when performed from a non-player source (such as Telnet)

* Removes hubworld entriely

* Configurable blacklists for tag, muted commands, and wildcard

Changes:
* Moves globally blocked commands to the `global` subsection of the original `blocked_commands` section. You *will* need to update your configurations
* /wildcard's command blacklist is now configurable under the `wildcard` section in `blocked_commands`.
* The commands muted players can't use are now configurable under the `muted` section in `blocked_commands`.
* Removes some commented-out globally blocked command entries.

Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
2021-05-09 16:42:31 +01:00
bdf4ca84e0 Why overcomplicating things is a horrifically bad idea (#55)
The longer I look into this plugin's code, the angrier I will become.

This fixes 2 bugs in the /potion command:
- Fixes non-admins being able to clear other players
- Fixes NPE caused when trying to add potion effects to players who are not on the server as a non-admin.

Both of these issues are caused by overcomplicating seemingly simple solutions, hence the name of this commit.

Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com>
2021-05-04 13:31:55 +01:00
caaa067096 Update Security Matrix (#59)
* Update Security Matrix

Updating the full security matrix.

* Yay for consistency

* I hate Markdown / Markup / Whatever the fuck this is.
2021-05-04 13:30:17 +01:00
7258d7f1bf Merge pull request #58 from AtlasMediaGroup/FS-221
Remove a number of wipe commands we don't want anyway
2021-05-04 12:59:31 +01:00
8a504bff07 Merge branch 'development' into FS-221 2021-05-03 22:15:20 -06:00
c00e64f736 Merge pull request #54 from VideoGameSmash12/FS-137
Assistant executive discord integration (FS-137)
2021-05-03 20:14:35 +01:00
9e73db0f24 Merge branch 'development' into FS-137 2021-05-03 19:46:59 +01:00
951c061d77 Merge pull request #57 from AtlasMediaGroup/Elmon11-patch-2
grammar fix
2021-05-03 19:46:37 +01:00
579d3e0719 Merge branch 'development' into Elmon11-patch-2 2021-05-03 19:13:39 +01:00
9777733d04 Merge pull request #53 from VideoGameSmash12/ride-typo
Fixes typo in /ride
2021-05-03 19:13:26 +01:00
05e118dcb4 Merge branch 'development' into ride-typo 2021-05-03 18:21:16 +01:00
7a0d6f49f4 Merge pull request #52 from VideoGameSmash12/FS-156
Fixes typo in the Lightning Rod's name (FS-156)
2021-05-03 18:20:20 +01:00
19f1b7f6bd Merge branch 'development' into Elmon11-patch-2 2021-05-03 15:45:54 +01:00
b12afbdc1f Merge branch 'development' into FS-137 2021-05-03 15:45:45 +01:00
49e77d4f93 Merge branch 'development' into ride-typo 2021-05-03 15:45:36 +01:00
eb9107bedf Merge branch 'development' into FS-156 2021-05-03 15:45:25 +01:00
951c699ed0 Remove a number of wipe commands we don't want anyway
We shouldn't be wiping any of this data within the server now anyway so let's not tempt fate again.
2021-05-03 15:44:05 +01:00
9e676143b8 2021.04 Release
Formal Release for 2021.04
2021-05-03 15:19:42 +01:00
6895e46375 Merge branch 'development' into ride-typo 2021-05-02 14:15:15 +02:00
c8b20bc255 RC2 Release 2021-05-02 13:12:37 +01:00
1cf46c7337 grammar fix 2021-05-02 14:03:48 +02:00
f240a15af3 Force the count to be zero if the value is negative (FS-216) (#56) 2021-05-01 23:58:03 +10:00
6073712fdf Bump Version
Bump Version to 2021.04-RC01
2021-04-26 20:46:11 +01:00
407b63e48b Fixes FS-137 2021-04-26 01:23:24 -06:00
be562fe722 ok, done (FS-156) 2021-04-26 00:58:28 -06:00
928ab41d7f Update Command_ride.java 2021-04-26 00:37:16 -06:00
d11d55b218 Vanished admins are no longer being counted (FS-148) (#41) 2021-04-24 14:06:28 +10:00
debb95fb4c video dev man (#51) 2021-04-24 13:03:11 +10:00
b9f7ab3ec3 Change punishment from kicking to muting on spam (FS-97) (#45) 2021-04-22 21:54:29 +10:00
2cdf1e66a6 Disables block gravity and makes it togglable (FS-89) (#50)
* Disables block gravity by default (FS-89)

* Combine these checks as Codacy ever so kindly suggested
2021-04-19 17:34:36 +10:00
20c2c4c96e Delete /wipeuserdata (FS-196) (#49) 2021-04-15 22:07:22 +10:00
d5238150d0 Curse be gone (#47)
Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com>
2021-04-13 14:13:47 +10:00
64a4e70c41 Merge pull request #48 from AtlasMediaGroup/abhi-fix
Strip role/user mentions (FS-191)
2021-04-12 16:45:13 -05:00
0c2f0a714c [+] Fix #replace() 2021-04-12 16:31:48 +05:30
4c67553bdd [+] Whitespace change! 2021-04-12 16:26:06 +05:30
ffab5e3c12 [+] Allman style formating 2021-04-12 16:01:31 +05:30
f7556a4861 [+] Remove redundant comments 2021-04-12 15:59:27 +05:30
385fc77771 [+] Done all the requested changes! 2021-04-12 15:44:51 +05:30
b852ea1822 [+] Update my account in developers list 2021-04-12 14:44:27 +05:30
4a5a3a1a2d [+] Fix FS-191 2021-04-12 13:57:58 +05:30
37762e5470 Merge pull request #39 from AtlasMediaGroup/Elmon11-patch-2
clearinv option in smite (FS-161)
2021-04-11 22:15:26 +01:00
85d90090c8 Merge branch 'development' into Elmon11-patch-2 2021-04-11 18:41:54 +01:00
09930c2d9a Merge pull request #43 from VideoGameSmash12/development
Consistency fixes (across 46 commands), additional CoreProtect integration (/dispfill and /setlever), and a critical bugfix (/setlever) (FS-162)
2021-04-10 12:56:32 +01:00
7ae1ab035a Merge branch 'development' into development 2021-04-10 12:50:52 +01:00
2bd1787663 Updated supported versions for TFM. 2021-04-10 12:45:56 +01:00
765b7dcc4b Merge branch 'development' into development 2021-04-10 12:39:47 +01:00
091381a076 Merge pull request #44 from AtlasMediaGroup/FS-145
Update JDA version and location (FS-145)
2021-04-10 12:39:08 +01:00
27dfd71b2e Update JDA version and location (FS-145) 2021-04-09 21:20:33 +10:00
16e06bd932 Forgot I had this there 2021-04-07 19:45:03 -06:00
a33c310757 Fucking shit 2021-04-07 19:41:13 -06:00
df21bdfa7e Other bug fixes
Credit to Fleek for some of the code here.

Bugs that were fixed:
* [Media] showing up with an extra space at the beginning of blank messages with attachments
* Admin chat using incorrect colors for its ranks in messages from Discord to Minecraft
* Admin notes not sending to admins, only admin impostors
2021-04-07 19:40:19 -06:00
d7e2c0da42 Merge branch 'development' into Elmon11-patch-2 2021-04-07 11:52:16 +10:00
a7529b41fb Oops 2021-04-05 18:08:24 -06:00
c4fce3f0f9 Right, so this change applies only to commands. For the sake of code consistency, I tried to change as many as possible to use FreedomCommand.msg instead of CommandSender.sendMessage for their messages. Here are a list of the files containing those changes:
* Command_adminworld.java
* Command_adventure.java
* Command_banip.java
* Command_blockedit.java
* Command_blockpvp.java
* Command_cage.java
* Command_cartsit.java
* Command_clearchat.java
* Command_clearinventory.java
* Command_commandlist.java
* Command_creative.java
* Command_deop.java
* Command_deopall.java
* Command_dispfill.java
* Command_doom.java
* Command_gcmd.java
* Command_hubworld.java
* Command_inspect.java
* Command_list.java
* Command_lockup.java
* Command_manageshop.java
* Command_manuallyverify.java
* Command_masterbuilderworld.java
* Command_mbconfig.java
* Command_moblimiter.java
* Command_mp44.java
* Command_mute.java
* Command_nickfilter.java
* Command_op.java
* Command_opall.java
* Command_opme.java
* Command_potion.java (Also corrected the inconsistent "player not found" message's color)
* Command_rank.java
* Command_ride.java
* Command_saconfig.java
* Command_scare.java
* Command_setplayerlimit.java
* Command_settotalvotes.java
* Command_smite.java
* Command_spectator.java
* Command_survival.java
* Command_unblockcmd.java
* Command_uncage.java
* Command_unmute.java
* Command_verifynoadmin.java

Here are some commands I added functionality to:
* Command_dispfill.java: Added some code that hooks into the CoreProtect API to log the items being removed from and added into the dispensers.
* Command_setlever.java: Added some code that hooks into the CoreProtect API to log the levers being interacted with.

Here's a command I fixed a critical bug in:
* Command_setlever.java
2021-04-05 17:13:26 -06:00
27f5f18962 FS-143 Resolution (#42)
* Bump to patch version.

* Fixes FS-143

Various changes to make it work better with logging and things like that.
2021-04-06 07:11:12 +10:00
dca5e30291 Actually display assistant exec in game (#37)
* Actually display assistant exec in game

* Update RankManager.java

* Update ConfigEntry.java

* Update FUtil.java

Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com>
2021-04-04 22:24:06 +10:00
09a435053e Merge pull request #40 from AtlasMediaGroup/phoenix-patch-1
Remove /premium
2021-03-31 17:12:56 -05:00
14309275fb Remove /premium 2021-03-31 15:16:01 -05:00
2375e92d90 Merge pull request #36 from AtlasMediaGroup/tfm-bugfix-001
FS-143
2021-03-26 15:43:22 +00:00
97672c2fff Update DiscordToAdminChatListener.java
This is the only way we can load media after [Discord] and [Formatting] without rewriting the method
2021-03-22 09:57:09 -05:00
5837b05a35 Merge branch 'tfm-bugfix-001' of https://github.com/AtlasMediaGroup/TotalFreedomMod into tfm-bugfix-001 2021-03-21 14:02:51 -05:00
b3b68ebd13 Switch to Allman Formatting 2021-03-21 14:02:43 -05:00
2dbbb5c262 Intellij says this is fine so if it breaks again gg 2021-03-21 19:07:07 +01:00
e45655edbb im a clown 2021-03-21 18:33:38 +01:00
9713fcabd6 Should work fingers crossed 2021-03-21 18:25:28 +01:00
dc10c40578 noclear option in smite 2021-03-21 13:57:24 +01:00
db3c190b2b Merge branch 'development' into tfm-bugfix-001 2021-03-21 16:11:13 +11:00
2725857364 Merge pull request #38 from AtlasMediaGroup/FS-147
Fix ban expiration (FS-147)
2021-03-20 22:14:10 -05:00
9f291f675c Use 'toEpochMilli()' instead (FS-147) 2021-03-21 13:44:55 +11:00
561c192c27 Fix bans not expiring (FS-147) 2021-03-21 12:21:15 +11:00
086dec28ac Merge branch 'development' into tfm-bugfix-001 2021-03-19 23:31:31 +00:00
b03870c0aa SQL Fixes
:)
2021-03-19 10:39:58 -05:00
f5c08cd28b Merge pull request #34 from AtlasMediaGroup/2021.02-release
Bump version to 2021.02 Release
2021-03-19 14:26:02 +00:00
2a87271642 Should fix FS-143 2021-03-19 08:58:29 -05:00
3b57aec0e8 Merge branch 'development' into 2021.02-release 2021-03-18 23:57:10 +00:00
efac65bc76 Merge pull request #35 from AtlasMediaGroup/FS-58
Fix checkstyle & other formatting
2021-03-18 23:17:25 +00:00
9c8fe6c590 Fix checkstyle & other formatting
This should help clear a lot of the "Security" alerts resolving FS-58
2021-03-18 22:42:52 +00:00
9f52cdf753 Merge branch 'development' into 2021.02-release 2021-03-18 22:28:53 +00:00
216234ea01 Merge pull request #32 from AtlasMediaGroup/FS-33
Properly fix FS-33
2021-03-18 16:20:06 -05:00
881dead392 Merge branch 'development' into 2021.02-release 2021-03-19 08:04:36 +11:00
ff2bca26aa Merge branch 'development' into FS-33 2021-03-18 19:58:10 +00:00
89ad934aa6 Bump version to 2021.02 Release 2021-03-18 19:18:11 +00:00
d0a195647c Merge pull request #33 from AtlasMediaGroup/FS-93
Fixed permission not setting for new players (FS-93)
2021-03-17 09:06:45 -05:00
eb05b05042 Fixed FS-93
- Players no longer need to relog, just need to be opped to get permissions.
- Removed redundant PlayerJoinEvent code as it's already been executed (See RankManager class).
2021-03-16 20:21:31 +11:00
b9c1970d20 Update player's permission when opping. 2021-03-16 19:56:29 +11:00
9eca9ac5b2 Remove double storage
It is unnecessary as the information is already stored in a map (Username, IPs)
2021-03-08 11:34:48 +11:00
5b577fae07 Add myself to developer list 2021-03-07 20:46:30 +11:00
452a8755c2 Properly fix FS-33 2021-03-07 20:43:25 +11:00
2fb8f224e7 Bump release to 2021.02-RC03 2021-03-06 23:38:46 +00:00
b6a2c8e021 Merge pull request #29 from AtlasMediaGroup/abhi-test
Added myself to TFM
2021-03-06 20:32:04 +00:00
f0a25fde0c Merge branch 'development' into abhi-test 2021-03-06 20:03:19 +00:00
4324497831 Merge pull request #31 from AtlasMediaGroup/Wild1145-patch-1
Tell CodeQL we're using Java 11 hopefully
2021-03-06 20:03:02 +00:00
14c53b7370 Merge branch 'development' into Wild1145-patch-1 2021-03-06 19:47:48 +00:00
0396b8ad86 Merge pull request #30 from AtlasMediaGroup/frontdoor-and-banExpiry-only
fix banning/?? Resolves FS-130
2021-03-06 19:46:57 +00:00
8ee7486afc Merge branch 'development' into frontdoor-and-banExpiry-only 2021-03-06 19:38:01 +00:00
694d9614c5 Tell Maven to also build Java 11 for once 2021-03-06 19:28:38 +00:00
150e25072a Tell CodeQL we're using Java 11 hopefully 2021-03-06 19:14:46 +00:00
7d990ae2c0 [+] Remove .idea 2021-03-06 23:50:23 +05:30
0dd5a26efa Merge branch 'frontdoor-and-banExpiry-only' of https://github.com/AtlasMediaGroup/TotalFreedomMod into frontdoor-and-banExpiry-only 2021-03-06 12:12:59 -06:00
5c097c83cb Here's to hoping this fixes that stupid ban crap. 2021-03-06 12:00:32 -06:00
a85dd014a0 Added .idea in gitignore 2021-03-06 13:05:42 +05:30
342df43f85 Added myself to TFM 2021-03-06 13:04:36 +05:30
d4be858c46 2021.02-RC02 Release Bump
Version bump with some Netbeans Config updates to use Java 11 as we should have been.
2021-03-05 21:44:38 +00:00
ec9a6e0d5b paldiu did some shit
FS-63 (FrontDoor)
FS-130 (Bans)
2021-03-04 20:37:31 -05:00
9161016f73 Merge branch 'development' into frontdoor-and-banExpiry-only 2021-03-03 11:52:37 -06:00
bdd22f8d75 Update month to be 30 days instead of 4 weeks 2021-03-03 12:50:45 -05:00
ce103ffd50 Merge pull request #28 from AtlasMediaGroup/abhi-test
fixes of JIRA issues.
2021-03-02 20:45:18 -06:00
85c35f25a3 [+] Fix codacy issue 2021-03-03 06:47:22 +05:30
c29b312101 [+] Remove .idea 2021-03-02 23:11:17 +05:30
a4ead85701 add annotations dependency 2021-03-01 23:03:49 -06:00
46273b3301 Revert "SQL PreparedStatement Fixes"
This reverts commit 17347c23a5.
2021-03-01 23:03:13 -06:00
d6b74a76bb [+] Fix of FS-33 2021-02-28 21:28:20 +05:30
6f66957b17 Few fixes for JIRA issues.... 2021-02-28 21:08:39 +05:30
17347c23a5 SQL PreparedStatement Fixes 2021-02-26 15:29:02 -06:00
718748f1a2 Commit Ultimate
ultimate super mega mode power upgrade
2021-02-26 15:26:13 -06:00
96d1c53ede First release candidate
Bumping version and build code name for the first release candidate of the 2021.02 release.
2021-02-26 16:53:00 +00:00
1293a8aa1e Merge pull request #26 from AtlasMediaGroup/ivan
Ruh-Roh Raggy!
2021-02-25 17:58:12 -05:00
96424694ee fix codacy errors 2021-02-25 17:03:31 -05:00
0367d9fd3a my end of the bargain 2021-02-25 16:42:30 -05:00
3b666f1fde Merge pull request #25 from AtlasMediaGroup/Elmon11-patch-1
removing BukkitTelnet from untouchable plugins
2021-02-17 18:25:19 -05:00
ec51cb7408 removing BukkitTelnet from untouchable plugins 2021-02-17 22:03:35 +01:00
4023394562 Merge pull request #24 from AtlasMediaGroup/FS-38
Remove duplicate config
2021-02-14 18:19:30 +00:00
5d312a12d4 Remove the duplicates that I can see based off of the recent warn
Heap is entirely removed as it doesn't appear to now be a valid command. The rest are duplicated elsewhere. When in doubt the highest level of restriction was applied.
2021-02-14 18:05:32 +00:00
b88cdf1250 Re-Base Config against Freedom-01
Ensures all the variables we probably have changed and that run as standard are set, commands that are blocked are updated and anything else I could think of are up to date.
2021-02-14 17:44:57 +00:00
ebec598120 Fix file permissions 2021-02-06 23:56:15 +00:00
aa060ea4d8 Update README with security info 2021-02-06 23:42:03 +00:00
fc3eef4d90 Fixed Travis Build Status 2021-02-06 23:06:15 +00:00
44ac012165 Re-adding Travis file based off of the original ones. 2021-02-06 22:44:50 +00:00
500d0e1044 Let's start using TravisCI Again
It just makes sense...
2021-02-06 22:43:29 +00:00
400a90b385 Merge pull request #21 from AtlasMediaGroup/smartnt-patch-1
Add new developers to util
2021-01-25 21:28:43 -05:00
b8a741aa58 Add new developers to util
Hopefully this doesn't fuck up this time - last PR my Macbook was having issues with for some reason.
2021-01-25 20:36:58 -05:00
a3929ec07e Merge pull request #19 from AtlasMediaGroup/permission-changes
merging according to wild's comments
2021-01-17 04:11:31 +01:00
8225daf6f1 permission changes & remove massmurder
resolves FS-69, FS-70, FS-71
2021-01-10 16:23:20 -05:00
8dce71eca1 Merge pull request #18 from AtlasMediaGroup/revert-15-sql-fix
Revert "SQL fix"
2021-01-10 20:45:13 +00:00
a2243abf2d Revert "SQL fix" 2021-01-10 20:44:57 +00:00
009b983c9a Merge pull request #15 from AtlasMediaGroup/sql-fix
SQL fix
2021-01-10 20:36:57 +00:00
1b3876cffa Merge branch 'development' into sql-fix 2021-01-10 15:06:40 -05:00
ed48ce3a8f Merge pull request #11 from AtlasMediaGroup/paldiu-local
Removal of Lombok
2021-01-10 15:06:22 -05:00
830daab8f4 Fix Daemon Error
Reflection issue when initializing the daemon; trying to call a constructor with one argument using two arguments.

Removed an unused constructor.
2021-01-08 17:32:54 -06:00
9688827a39 formatting 2021-01-08 10:10:54 -05:00
3464a33678 NPE on Thread.join() possible fix
This bug is hard to decipher mainly due to the thread being terminated somewhere before the thread.join is called. this may be due to the safeClose method defined with serverSocket, but again, I'm not too sure what's up here. This may also be because something failed to execute in one of the try catch statements, causing the thread to never be initialized in the first place.
2021-01-08 00:25:46 -06:00
5754d70d05 Merge branch 'development' into sql-fix 2021-01-07 14:46:13 -05:00
fbf2972006 Merge branch 'sql-fix' into paldiu-local 2021-01-07 13:40:59 -06:00
aa2836b29a Merge branch 'mbw-fix' into paldiu-local 2021-01-07 13:39:51 -06:00
260368585e reformat 2021-01-07 13:29:47 -06:00
323fd1a031 Should be fine now 2021-01-04 18:27:57 -06:00
c7b0f77910 Merge branch 'development' into paldiu-local 2021-01-04 13:14:53 -06:00
7fb6a2f087 Merge pull request #17 from AtlasMediaGroup/Elmon11-patch-1
Fix developer title not showing up on Offline mode servers
2021-01-03 13:47:14 -05:00
e32c2eed15 Update FUtil.java 2021-01-03 19:23:10 +01:00
7afa80c89f Update FUtil.java 2021-01-03 19:18:14 +01:00
a3cccc7ac0 Update FUtil.java 2021-01-03 19:16:41 +01:00
bc37ed5341 Fix developer title not showing up on Offline mode servers 2021-01-03 19:04:23 +01:00
0a5ce5b9cc fix w/e in mbw 2020-12-31 13:06:05 -05:00
a4e23dc03f Codacy Complacency Part 2 2020-12-29 22:14:57 -06:00
7a394e52e4 Codacy complacency 2020-12-29 22:06:12 -06:00
9352a48650 Finalized lombok removal
Finally removed all lomboks, also reduced npath complexity for FreedomCommand.FCommand#execute and removed empty constructor from Discord
2020-12-29 21:37:50 -06:00
a849e01ce5 Merge pull request #12 from AtlasMediaGroup/FS-59
admin chat discord formatting (FS-59)
2020-12-29 15:34:48 -05:00
fd725ca6c5 Merge branch 'development' into paldiu-local 2020-12-28 22:51:44 +00:00
0703ea685e Merge branch 'development' into FS-59 2020-12-28 22:51:21 +00:00
1ba468cbfc Merge branch 'development' into sql-fix 2020-12-28 17:49:11 -05:00
91dc89013c Merge pull request #14 from AtlasMediaGroup/mojangson-update
Mojangson update
2020-12-28 22:44:20 +00:00
7cdeac451b SQL fix 2020-12-28 17:39:07 -05:00
5b8cf2798e Update pom.xml 2020-12-28 17:05:52 -05:00
98158e0f27 mojangson update 2020-12-28 17:04:14 -05:00
c0ac0365eb Merge pull request #13 from AtlasMediaGroup/Elmon11-patch-1
Make gcmd not work on admins

//MERGE COMMIT:
At least one build check passed, the failing check is irrelevant.
2020-12-28 07:41:58 -05:00
0c60cbc739 Update Command_gcmd.java 2020-12-28 00:18:05 +01:00
402a6be5ad Make gcmd not work on admins 2020-12-28 00:04:57 +01:00
9d131f0f24 ok codacy 2020-12-26 19:11:15 -05:00
b9606fa0e3 admin chat discord formatting (FS-59) 2020-12-26 18:54:15 -05:00
d71f5452ad Changed instance of SplittableRandom back to Random
Overridable methods required Random instead of SplittableRandom and caused a build failure in the previous commit. This should fix the build failure.
2020-12-26 10:30:30 -05:00
eb9759f2d8 Replaced All Instances of Random With SplittableRandom
SplittableRandom is faster (negligable) than Random and is also able to recursively return new instances of itself for an even more complex pseudo random generator compared to the default Random supplied by Java.
2020-12-25 15:57:10 -05:00
dec35f76e4 Minor fix
Switched from a lengthy if else to a ternary.
2020-12-25 15:51:17 -05:00
97edce0a67 Fixes for Codacy;
These fixes are designed to satisfy codacy.

However, codacy reports a NPath Complexity of 649, whereas the current, recommended, and standardized threshold is 200.

This is caused by FreedomCommand#execute(CommandSender, String, String[]);
2020-12-25 15:35:33 -05:00
361aa4ee04 Bugfix on Commit #5c0f77c
A mismatched argument count during constructor initialization in Module_logs.class was fixed in this patch.
2020-12-25 15:20:34 -05:00
5c0f77c7c5 Removal of Lombok
Lombok implementation removal.

I have also gone through and replaced things with inline methods and variables, lambdas, and simplified loops down, removed unnecessary guard clauses, and overall cleaned up every single class. This took a long time, please do remember to follow proper naming conventions, don't include unnecessary guard clauses, follow exception rules and comment rules, and please PLEASE remember to use the DIAMOND OPERATOR rather than just inferring RAW TYPES!!!

Thank you!!
2020-12-25 14:46:43 -05:00
210b0f8b43 unnecessary 2020-12-24 20:07:09 -05:00
585fdb7992 fix verification toggle breaking everything (FS-39) 2020-12-24 19:48:52 -05:00
6d05e9b924 Merge pull request #10 from AtlasMediaGroup/maven-sec
Moved Repo's to HTTPS
2020-12-24 19:33:04 -05:00
fb314170c1 Moved Repo's to HTTPS 2020-12-24 22:52:35 +00:00
218d720b06 Merge pull request #9 from AtlasMediaGroup/FS-12
Update social links in line with live config
2020-12-24 14:18:33 -05:00
7bf97a03c4 Update social links in line with live config
The current server config has these links and those ones commented out. While I do now own them not all of them I'm actively using but thought it'd be good to keep this sync'd up.

Resolves FS-12
2020-12-24 18:36:27 +00:00
de496970d9 remove reddit system
jraw free 🦀🦀🦀
2020-12-24 13:09:42 -05:00
c8ec171b11 Update Discord.java 2020-12-23 20:13:26 -05:00
caf126f543 elmon
fix underscore italic thing
2020-12-23 20:09:57 -05:00
a717cce3b5 fix admins being able to see senior commands 2020-12-18 21:43:24 -05:00
ce32490b4d Update Module_list.java 2020-12-16 17:46:27 -05:00
5d882d9052 Update Module_list.java 2020-12-16 23:42:44 +01:00
7dfd6c0b8b Update Module_list.java 2020-12-16 23:37:14 +01:00
fa5c774f45 Remove developer who has been suspended indefintely. 2020-12-15 20:53:07 +00:00
c356ecd168 formatting & rename stuff 2020-12-14 19:05:13 -05:00
f8ce64d6c3 Merge pull request #8 from SupItsDillon/development
FS-5 Allow the verification system to be enabled / disabled in config (2)
2020-12-14 19:09:57 +00:00
39d5b610a1 Update WorldRestrictions.java 2020-12-12 12:59:19 -05:00
50643eb9ff Update Command_verify.java
ood code again
2020-12-09 16:03:40 +00:00
687166e0a4 Update Discord.java
formatting screwed up
2020-12-09 16:00:18 +00:00
98ead06355 Update Command_manuallyverify.java
ood file
2020-12-09 15:59:12 +00:00
cbc3795ef2 Update Command_playerverification.java
i should really keep my files updates
2020-12-09 15:55:45 +00:00
b9d608222e Update Command_playerverification.java
fixed codacy issue
2020-12-09 15:48:27 +00:00
777a66f8da Update Discord.java
correct updated file
2020-12-09 15:37:31 +00:00
6441deceab Update Command_playerverification.java
codacy is being fussy
2020-12-08 19:35:02 +00:00
1fedb1fad3 Update Discord.java
forgot to change this aswell
2020-12-08 19:28:47 +00:00
8b1cef3b83 Update Discord.java
whoops i did change something i didnt want to
2020-12-08 19:26:00 +00:00
81ef3d624a Update Discord.java
cant remember if i changed anything since last commit
2020-12-08 19:17:06 +00:00
b0c0f17043 Update Command_manuallyverify.java
discord verify enable disable
2020-12-08 19:16:28 +00:00
fb3cdf3603 Update Command_playerverification.java
discord enable disable verification
2020-12-08 19:15:55 +00:00
950c975e8f Update Command_verify.java
discord verification config
2020-12-08 19:15:17 +00:00
79c8ea301d Update config.yml
config option for discord verification
2020-12-08 16:10:14 +00:00
7a11c9062d Update ConfigEntry.java
config option for verification
2020-12-08 16:09:26 +00:00
2037775276 Update Discord.java
stuff to disable or enable discord verification
2020-12-08 16:08:31 +00:00
4a3ce64412 Merge pull request #1 from AtlasMediaGroup/development
updated stuff
2020-12-08 16:07:04 +00:00
681695150a Merge pull request #6 from AtlasMediaGroup/Wild1145-patch-1
Block new CoreProtect stuff better
2020-12-05 21:10:27 +00:00
e98682a1af Delete Command_gsay.java
https://forum.totalfreedom.me/d/114-why-is-gchat-now-gsay-back/13
2020-12-05 22:05:29 +01:00
92534640d4 Block new CoreProtect stuff better 2020-12-05 19:01:09 +00:00
695ccd0e71 /list -a
/list -s still exists
2020-12-04 10:37:40 -05:00
0be2aa718f ok 2020-12-03 20:50:30 -05:00
b3b9c2ef43 \ 2020-12-03 20:46:10 -05:00
293ea04c56 staff -> admins
* rename everything containing staff back to admin (as requested by ryan i've renamed commands like slconfig to saconfig but left "slconfig" as an alias)
* format almost every file correctly
* a few other improvements
2020-12-03 19:28:53 -05:00
aae1f524ea updating social and voting links 2020-12-02 22:25:17 +01:00
7871acc215 Merge pull request #5 from AtlasMediaGroup/Wild1145-patch-1
Update checkstyle.xml
2020-12-02 20:50:01 +00:00
153b87c3b3 Update checkstyle.xml
Think this should fix a load of our new warnings.
2020-12-02 20:40:32 +00:00
932fa467ba Update README.md 2020-12-02 20:31:44 +00:00
82804fcac2 Create codacy-analysis.yml 2020-12-02 20:23:31 +00:00
8ed35aba2b add "Interaction" result action string check
fixes container interactions being logged as block removals
2020-12-01 18:53:28 -05:00
4898bcf7b5 Merge pull request #2 from AtlasMediaGroup/Elmon11-patch-1
reordered response object and reformat
2020-12-02 00:16:39 +01:00
495c91f5bb Merge pull request #3 from AtlasMediaGroup/Elmon11-patch-2
checks if a player is OP before opping them
2020-12-01 17:52:54 -05:00
42199f9923 Update Command_opall.java 2020-12-01 23:45:32 +01:00
03a6f18d18 checks if a player is OP before opping them
response to
338fc81b7f (r533706741)
2020-12-01 23:44:00 +01:00
aff12edb03 reordered response object and reformat
reordered response object and changed senioradmins & masterbuilders to senior_admins & master_builders for consistency with the bot
2020-12-01 23:10:01 +01:00
c0a7ee1bb6 Final fix to security readme (I hope) 2020-12-01 19:43:45 +00:00
8c0db481ae Update SECURITY.md
Helps when you delete the template...
2020-12-01 19:43:07 +00:00
6084e7cb63 Create SECURITY.md 2020-12-01 19:42:16 +00:00
e40138dee6 Update maven.yml 2020-12-01 19:35:11 +00:00
28576a9e8b new developers ! ! ! 2020-11-30 19:03:51 -05:00
c1d4e126a3 add block inspector for ops
* adds /inspect (or /ins) as a /co i replacement command for OPs. container and sign logging are still a WIP for this command.
* replaces "Rank must be Trial Mod or higher." with "Rank must be Admin or higher." in slconfig
* replaces "scripthead is the owner of TotalFreedom." with "Wild1145 is the owner of TotalFreedom." in the config
2020-11-30 18:17:27 -05:00
6cd995ff52 sql fixes & more
fixes slconfig sql error
fixes nickclean npe
fixes a few command inconsistensies
2020-11-24 11:53:37 -05:00
495133da1a Let's see if this works. 2020-11-22 23:45:29 +00:00
de0d6853b7 revert calebs broken patch 2020-11-19 23:22:00 -06:00
5cdbae0166 Update ActivityLogEntry.java 2020-11-14 20:26:49 -06:00
a537183545 Add adminchat channel 2020-11-14 20:13:59 -06:00
2c19ce5c65 Adds https://tracker.telesphoreo.me/d/4-mbconfig-clearip 2020-11-09 21:05:33 -06:00
609053e13f oops 2020-11-09 20:16:26 -06:00
a3837a0e06 Resolves https://tracker.telesphoreo.me/d/3-fix-mb-config 2020-11-09 20:11:21 -06:00
0adee3582b d 2020-11-08 21:08:44 -06:00
08bfd73eec Delete FAWEBridge 2020-11-08 20:09:49 -06:00
9a7cc52e03 Fix players being marked as an impostor when the Discord verification system is disabled 2020-11-08 20:05:54 -06:00
11984bc46f Update BukkitTelnetBridge.java 2020-11-08 19:26:52 -06:00
8ac5bc827a Rename gchat to gsay 2020-11-07 22:21:06 -06:00
366287eb24 Fix reports being logged multiple times to console 2020-11-07 21:00:49 -06:00
43c2df58c7 knew there'd be a nms update 2020-11-02 23:33:04 -06:00
d0acfcf674 Delete Jenkinsfile 2020-10-29 21:38:24 -05:00
88ccd8edfd Delete .travis.yml 2020-10-29 21:38:11 -05:00
7f9e2af9a6 Update README.md 2020-10-29 21:37:34 -05:00
f9269f1fe4 Update maven.yml 2020-10-29 21:37:05 -05:00
a5359ec580 Update README.md 2020-10-29 21:33:18 -05:00
e3a6f5127f fix wildcard and add back some beloved commands 2020-10-29 21:24:06 -05:00
e1e046b16b lol whos the idiot who made this embarassing command 2020-10-29 20:47:23 -05:00
7d93050ff9 I assume 1.16.4 will have an NMS update 2020-10-29 18:59:54 -05:00
fadcb9ad5d TotalFreedomMod 2020.11 2020-10-29 18:47:53 -05:00
49f7c6e8c3 Merge pull request #292 from speedxx/development
fix ride request expire messages
2020-10-29 15:06:29 -05:00
9bcdb2bcdc fix ride request expire messages
fixes /ride sending request expired message even after accepting & properly remove player from map after accepting, #291
2020-10-28 18:06:12 -04:00
ca4670ed89 Merge pull request #290 from speedxx/development
getDeterminer() -> getArticle()
2020-10-25 12:43:34 -05:00
adf71cb020 Update RankManager.java 2020-10-25 13:24:41 -04:00
6e84fdad23 Login messages
Last commit from me. Don't have the power but to me Packs is the new Lead Developer
2020-10-25 09:27:56 -07:00
2ecfd9610f br 2020-10-19 19:07:44 -05:00
bb33778fc9 [Maven] FAWE 2020-10-16 22:33:33 -05:00
d4d1000c16 Merge pull request #289 from Focusvity/pr/discord
Enable media tag to be included in messages
2020-10-16 21:36:38 -05:00
5a96204f1b Tidy things up a bit 2020-10-16 17:51:21 +11:00
3bd72dacda Enable media tag to be included in messages 2020-10-16 17:33:58 +11:00
a4c8dad865 Merge pull request #288 from Focusvity/pr/perm-config-fix
Fix NPE
2020-10-15 21:40:14 -05:00
82e7a3b659 Fix NPE (https://github.com/TFPatches/TotalFreedomMod/issues/287) 2020-10-16 13:37:25 +11:00
586fa98c32 Merge pull request #286 from Focusvity/pr/discord-media
Use Component API for attachments
2020-10-15 21:37:15 -05:00
a8f95bcb19 Use Component API for attachments 2020-10-16 13:20:20 +11:00
82d92565e7 lol 2020-10-13 13:37:11 -07:00
533e4fe369 Login messages for players. Still need to come up with login messaghes 2020-10-02 02:27:06 -07:00
f8304aecd7 fix 24 hour bans 2020-09-29 23:54:17 -07:00
ac6e58ff9e and this is why I approve things before it goes on the server 2020-09-29 17:24:28 -07:00
4be2a1e05b throwback thursday 2020-09-27 22:53:11 -05:00
59831ef1f3 Finish the job 2020-09-27 22:17:01 -05:00
54e6e2f9b1 relying on someone else to look this over to see if i missed anything 2020-09-27 21:51:15 -05:00
d203772a9a This somehow got reverted back to the old version
Reblocks bigtree in the plotworld as it is used to grief. Players can still use the /tool tree comamnd from WorldEdit to achieve the same thing
2020-09-26 14:52:13 -05:00
55522e8191 quick bump for the october 2020 update 2020-09-25 20:36:58 -05:00
ac3d0fca88 Allow executives to manage the shop 2020-09-18 18:04:21 -07:00
eb6514332e fix the config issues 2020-09-14 21:58:46 -05:00
098d3e4cf1 i hope thisll work 2020-09-14 20:54:14 -05:00
81eb333b6a Pterodactyl 2020-09-14 02:36:25 -07:00
3057421d6d Fixed the last bug for now 2020-09-12 14:42:12 -05:00
9cb96e81ac Fix all the bugs 2020-09-11 22:27:26 -05:00
d67189e170 e 2020-09-07 15:14:30 -05:00
451ef8f009 Merge pull request #280 from CoolJWB/development
Potion command fix & performance
2020-09-06 21:28:22 +02:00
7af53448be Potion command fix and refreshment
The potion command didn't work for OPs due to some misstake that made it think that all commands were executed on other players (a staff only feature).
It now instead uses switches to execute for better performance and readability.
2020-09-06 21:25:15 +02:00
2072c89f77 Merge branch 'development' of https://github.com/TFPatches/TotalFreedomMod into development 2020-09-06 18:52:04 +02:00
43b266f17d Update NMS + Use PaperLib for teleportAsync 2020-08-30 19:13:46 -05:00
c61f7e78fd Update for 1.16.2 2020-08-30 14:39:07 -05:00
14ab1e95b5 Merge branch 'development' of https://github.com/TFPatches/TotalFreedomMod into development 2020-08-30 00:27:13 +02:00
44fe8f6f94 Merge pull request #279 from speedxx/development
fix spectral arrows bypassing pvp blocking
2020-08-28 10:16:37 -05:00
1c487a6a60 fix spectral arrows bypassing pvp blocking 2020-08-27 14:55:39 -04:00
6f4cc8d4b5 Optimized FAWE bridge 2020-08-24 22:44:45 +02:00
f98f6990ea Merge pull request #278 from speedxx/patch-1
:)
2020-08-23 00:19:48 -05:00
4c81c94702 :) 2020-08-22 13:04:03 -04:00
aaa495cf41 Merge pull request #277 from speedxx/development
use UUIDs for developers
2020-08-19 19:42:54 -07:00
72322f2e56 use UUIDs for developers 2020-08-19 21:19:15 -04:00
04fee7d5c1 Merge pull request #276 from speedxx/development
fix vanish bug
2020-08-18 23:18:34 -05:00
d38ddac311 fix vanish bug 2020-08-18 22:56:32 -04:00
d65f584707 Merge pull request #275 from CoolJWB/development
Mistakes were made
2020-08-18 17:24:30 +02:00
ff42713f92 Mistakes were made 2020-08-18 17:22:43 +02:00
5047363f83 Merge pull request #274 from Focusvity/patch-1
Make sure you check the code @CoolJWB
2020-08-18 09:48:07 -05:00
34a0dae305 Make sure you check the code @CoolJWB 2020-08-18 18:23:19 +10:00
ebc07f6259 Merge pull request #273 from CoolJWB/development
Updated my own code
2020-08-18 09:40:56 +02:00
6a7a6e74e3 Update code 2020-08-18 09:37:19 +02:00
1e36b484ac Merge branch 'development' of https://github.com/TFPatches/TotalFreedomMod into development
 Conflicts:
	src/main/java/me/totalfreedom/totalfreedommod/Monitors.java
2020-08-18 09:32:05 +02:00
efae9e314f Merge pull request #264 from DragonSlayer2189/patch-4
added "kicked (user) quietly" msg
2020-08-18 09:29:35 +02:00
ea946fe14f Merge pull request #265 from DragonSlayer2189/patch-3
added "banned (user) quietly" message
2020-08-18 09:29:14 +02:00
fc08761e70 Merge pull request #272 from Focusvity/pr/discord-msg
Prevent Discord from sending messages to the server
2020-08-18 09:27:05 +02:00
3f68677d99 Don't send empty messages 2020-08-18 15:52:19 +10:00
f4007a7c9d Fix long standing bug with player notes 2020-08-17 23:53:21 -05:00
f3a655d40d Merge branch 'development' of https://github.com/TFPatches/TotalFreedomMod into development 2020-08-17 21:21:21 -05:00
6b3a765c90 shorten Administrator 2020-08-17 21:21:13 -05:00
7e8a519c87 Update src/main/java/me/totalfreedom/totalfreedommod/command/Command_kick.java
Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com>
2020-08-17 19:00:07 -04:00
388e1fd52d Update src/main/java/me/totalfreedom/totalfreedommod/command/Command_ban.java
Co-authored-by: Nathan Curran <30569566+Focusvity@users.noreply.github.com>
2020-08-17 18:59:26 -04:00
cdb28afba6 Merge pull request #271 from speedxx/development
index httpd module
2020-08-17 17:54:50 -05:00
24575aba88 index httpd module 2020-08-17 18:17:45 -04:00
090c445aa9 seth kelly 2020-08-16 22:33:35 -05:00
c936759b6c oup 2020-08-15 21:18:47 -05:00
36fc1a00b6 bru 2020-08-15 19:32:25 -05:00
7b9920dbc4 Merge pull request #268 from speedxx/development
stuff seth missed
2020-08-15 19:24:47 -05:00
b0daf2066a supervanish is gone 2020-08-15 20:17:54 -04:00
ed5d18c0df rip supervanish 2020-08-15 18:03:26 -05:00
04a7b633a4 it compiles now 2020-08-15 17:58:48 -05:00
7a810519f3 fuck intellij 2020-08-15 17:44:50 -05:00
53038ca3b2 fuck intellij 2020-08-15 17:42:46 -05:00
e77d92407c Revert "forgot to pull"
This reverts commit e4c9ea656e.
2020-08-15 17:41:26 -05:00
da80f1b69e Revert "Merge branch 'development' of https://github.com/TFPatches/TotalFreedomMod into development"
This reverts commit 4407e9e6ec, reversing
changes made to e4c9ea656e.
2020-08-15 17:41:23 -05:00
4407e9e6ec Merge branch 'development' of https://github.com/TFPatches/TotalFreedomMod into development 2020-08-15 17:09:03 -05:00
e4c9ea656e forgot to pull 2020-08-15 17:08:39 -05:00
63570d61d6 admins are seniors 2020-08-15 13:06:58 -04:00
257a2eec33 no 2020-08-15 12:37:20 -04:00
78b73b3b63 stuff seth missed
admin -> staff
2020-08-15 12:35:48 -04:00
d74846cde6 Fixed my bad code 2020-08-15 15:33:29 +02:00
3f4d34d172 Forgot to actually make sure this compiles lol 2020-08-14 23:48:31 -07:00
f5b5fcd5ef Admins are now known as staff
To other developers: If you find places where staff are refered to as only admins pls fix it for me.
2020-08-14 23:44:57 -07:00
f42e047723 Merge pull request #267 from speedxx/development
fix exceptions, properly teleport player in /ride
2020-08-14 22:10:09 -05:00
e79145ee54 fix exceptions, properly teleport player in /ride
- fixes ArrayIndexOutOfBoundsException in /ride
- teleport sender properly if target is in different world for /ride
- fixes IllegalArgumentException in /stopsound
2020-08-14 21:56:04 -04:00
6dbc99690a added "kicked (user) quietly" msg
once again, did i do this right
2020-08-14 00:34:01 -04:00
8628e88e3a added "banned (user) quietly" message
did i do this right, idk java
2020-08-14 00:29:50 -04:00
51e1191816 Increase range on tpr 2020-08-13 22:14:12 -05:00
e294ef8312 Reimplement vanish command
- SuperVanish has a wack permission system, and it didn't work in some rare circumstances. Added back TFMs vanish with the SuperVanish API
- Fixed the permission nodes so admins can see other admins, like how it was in TFM
2020-08-13 14:34:03 -05:00
541abb1ba8 whoever commented the shit out in the pom.xml: i hope both sides of your pillow are warm tonight 2020-08-12 22:07:15 -05:00
306c8bc8b9 ok 2020-08-12 18:51:10 -05:00
9f006325b4 This is no longer needed 2020-08-09 22:25:16 -07:00
aab4f55b7d UUID definite bans 2020-08-09 22:25:04 -07:00
00f94e47f1 github is a love hate relationship 2020-08-09 17:49:52 -07:00
44b7307e4d Revert "Revert "Permbans are now indefinite bans.""
This reverts commit 54df0e08f5.
2020-08-09 17:49:35 -07:00
54df0e08f5 Revert "Permbans are now indefinite bans."
This reverts commit 4003db6dd9.
2020-08-09 17:49:20 -07:00
4003db6dd9 Permbans are now indefinite bans. 2020-08-09 17:48:42 -07:00
f4f25c1590 useless 2020-08-09 17:47:53 -07:00
328225fe6e Merge pull request #262 from speedxx/development
fix adminchat bug
2020-08-08 22:35:45 -05:00
087e4a0d9c fix adminchat bug 2020-08-08 23:20:06 -04:00
2ecde80b5f AMP automation 2020-08-07 22:51:09 -07:00
075299dbd9 Merge pull request #261 from speedxx/development
-q arg for more commands
2020-08-07 18:45:00 -07:00
30d5a1d888 -q arg for more commands
- add `-q` arg for tban, warn, and tempban
- add reasons to tban
(#259)
2020-08-07 20:51:47 -04:00
b6746acb44 Merge pull request #255 from Focusvity/pr/modifyitem-fix
Fixed modifyitem command
2020-08-08 00:38:59 +02:00
560353e7cf Merge pull request #258 from DragonSlayer2189/patch-1
Removed "Build" "break-block" and "place-block"
2020-08-08 00:36:12 +02:00
86cf9dc344 I hate PacksGamingHD.
fix tossmob not working, toggle stuff
2020-08-06 16:18:32 -05:00
877c174e2d I hate PacksGamingHD. 2020-08-06 16:17:18 -04:00
642725252b fix tossmob not working, toggle stuff
- fix tossmob not working, sorta revamp it (#259)
- make tossmob and a few other config things toggleable with /toggle (note mp44 and landmines still don't work, i'll probably try and fix those too)
- replace if else statements with switch and catch (yandere dev code type beat)
2020-08-06 16:05:17 -04:00
880b78e528 master 2020-08-05 02:01:21 -05:00
7224319fae Removed "Build" "break-block" and "place-block"
removed these flags from restricted worlds due to it breaking gravity blocks, redstone, pistons, and various other things, blocks still cant be broken due to the onblockplace and onblockbreak event handlers

idk how to add this but /summon, /spawnmob, /etree, /ebigtree, and any of those commands aliases also need to be blocked due to them being able to bypass these restrictions
2020-08-04 19:13:35 -04:00
ca8758cbb1 oup 2020-08-04 17:31:17 -05:00
81df3103b6 Some updates
- Added Reddit flair sync
- Removed magical saddle because the stacking potato does the same thing
- Some internal improvements
- Fixed bug where if a service throws an error while starting or stopping it breaks the entire plugin
2020-08-04 15:16:11 -07:00
b73d1df350 baddev 2020-08-04 15:05:43 -05:00
299b31a75b Merge pull request #256 from Focusvity/pr/command-fix
Plugin-specific registration fix
2020-08-04 14:29:38 -05:00
8832d5c870 Merge pull request #257 from speedxx/development
silent joining and leaving fixes
2020-08-04 14:29:19 -05:00
abe3b68480 Update permissions.yml 2020-08-04 15:28:40 -04:00
5c50f8f27d silent joining and leaving fixes 2020-08-04 15:11:16 -04:00
4561641d2b Plugin-specific registration fix 2020-08-04 18:14:42 +10:00
4555a7e3f2 [WIP / DO NOT USE ON PRODUCTION!!] Begin implementing support for SuperVanish and fix bugs
- Update dependencies in pom.xml
- Replace TotalFreedomMod's vanish system with SuperVanish. It's widely supported by many major plugins and does a better job vanishing players
- Fixed a typo in the SQL command for creating admin tables, where the table would not be created on a clean install of TFM
- Update bStats Metrics to latest version
- Remove the VanishHandler
- Sync the permissions.yml from whats on the server. Entries for Essentials and SuperVanish will be added soon

KNOWN BUG:
- Plugins override TFM commands (e.g. Essentials takes over /list instead of giving it to TFM). I noticed that there is a semicolon before every TFM command. (:/ban, :/list), which is the actual TFM command. I have no idea where / how this bug came from. Urgently needs to be fixed.
2020-08-04 01:31:26 -05:00
c826afe399 Removed some imports 2020-08-04 11:44:01 +10:00
ae57573eeb Fixed modifyitem command 2020-08-04 11:39:59 +10:00
073a618035 Hotfix to potion spy
Note to self: don't do crack cocain when you code, this will actually announce the potion splashes to admins (also fixed a spell issue).
2020-08-04 00:07:50 +02:00
e1b514ca85 Merge pull request #253 from speedxx/patch-1
replace private constructors & 1.16 attribute names
2020-08-03 14:18:53 -05:00
3f942613d7 add missing mobs here too why not 2020-08-03 13:52:49 -04:00
bb4f8d1fc6 replace private constructors & new attribute names 2020-08-03 13:50:44 -04:00
5401cc5dc7 Merge pull request #252 from TFPatches/development
August Update
2020-08-03 10:13:33 -07:00
1a7c14ad3e Formatting fixes and bump up the versions on the pom.xml 2020-08-02 20:59:47 -05:00
25bf79bdb1 this was causing issues 2020-08-02 19:06:45 -05:00
12a4f4da84 Seeing if this will fix the compiling issue 2020-08-02 13:26:21 -07:00
a0b29c1d01 We dont use javadoc & format fixes 2020-08-01 17:46:14 -07:00
76bb2d08ac Split gcmd sub cmds out n other stuff 2020-07-31 21:10:44 -07:00
891e5c2f12 Merge pull request #250 from CoolJWB/development
Made nc work with hex colors
2020-07-31 21:53:59 +02:00
4de1fe454d Fixed oopsie 2020-07-31 21:48:22 +02:00
80e39d3db1 Hex color for nc
Made sure that hex colors are cleared correctly.
2020-07-31 21:46:44 +02:00
e25e785c26 Merge pull request #249 from speedxx/development
weSmart
2020-07-29 18:32:43 +02:00
0ae835aa04 weSmart
sourcetype fixes; making sure in game commands work only in game
2020-07-28 23:14:58 -04:00
05abebea65 Merge pull request #248 from CoolJWB/development
A bridge for TF-FAWE
2020-07-29 02:48:12 +02:00
c04e944466 A bridge for TF-FAWE
Made a bridge for a TotalFreedom version of FastAsyncWorldEdit that will work better with our needs and not collide with other plugins.
2020-07-29 02:45:16 +02:00
3ee80e0f70 Merge pull request #247 from ZeroEpoch1969/development
literally had to do this shit the dumb ass way
2020-07-28 14:59:34 -07:00
27f7276698 Dont have my pc, have to do this from github
2/2
2020-07-28 14:56:45 -07:00
9ecfe703cb Dont have my pc, have to do this from github
1/2
2020-07-28 14:55:38 -07:00
ab660a7ca7 Merge pull request #243 from vJayyy/patch-4
Format change (/cmdspy)
2020-07-28 14:38:39 -07:00
2353c728c1 Merge pull request #246 from speedxx/development
fix beds exploding in new nether biomes
2020-07-28 14:38:12 -07:00
106e457fa7 fix beds exploding in new nether biomes
add end biomes too since beds explode there aswell & fix the stupid "(amount) entitiess removed." shit too
2020-07-28 16:24:41 -04:00
582acdb176 It's late lol
derp
2020-07-28 02:33:42 -04:00
05f94920d9 Format change (/cmdspy)
While executing this during administration I noticed the ratio between execution and response was rather delayed, and I realized it's because the command is waiting for all the tables and grab methods to run before sending the player the enabled/disabled message. This creates a false sense of lag and is as simple as making the message run before anything else, given that the methods run and tables save almost instantly, this won't negatively affect the module or command.
2020-07-28 02:12:30 -04:00
ee04a456a1 Merge pull request #242 from speedxx/patch-1
fix clearchat
2020-07-27 22:41:50 -05:00
8e8daa457b fix clearchat 2020-07-27 23:37:10 -04:00
95e67f84ef Merge pull request #241 from speedxx/development
add magical saddle to shop
2020-07-25 21:08:24 -07:00
6f2d5aa08d add magical saddle to shop 2020-07-25 22:59:37 -04:00
417a0c39dd Merge pull request #240 from speedxx/development
separate unblocking commands from bcmd
2020-07-25 20:31:03 +02:00
4ad7fd874f separate unblocking commands from bcmd 2020-07-24 23:24:14 -04:00
aef85b2120 Merge pull request #239 from speedxx/development
i am a massive retard
2020-07-23 23:12:05 -04:00
37c65a85d4 Update FUtil.java 2020-07-23 23:03:53 -04:00
d93a2a7e7d Merge pull request #238 from speedxx/development
fix nickclean not being registered
2020-07-23 19:50:02 -04:00
db414164dc fix nickclean not being registered
also allow for ops/non-ops to run /opme, there isn't any reason as to why this command should be limited to  admins only
2020-07-23 19:05:38 -04:00
30085a7a52 Merge pull request #237 from speedxx/development
revamp vanish
2020-07-22 18:04:36 -04:00
7593fbda9e revamp vanish 2020-07-22 17:40:58 -04:00
fc05003354 Merge pull request #236 from speedxx/development
fix cage & uncage
2020-07-21 23:20:23 -05:00
113350b228 fix this too 2020-07-21 23:56:18 -04:00
a1f64ef912 oop 2020-07-21 23:54:56 -04:00
e4ee3066bc Merge pull request #235 from speedxx/development
fix guildchat being sent to discord
2020-07-21 15:28:03 -04:00
2bf78bcccf fix guildchat being sent to discord 2020-07-21 15:21:51 -04:00
8c93da758a Forgot question mark 2020-07-20 07:07:20 -07:00
75e50582e9 Kuper forgot db stuff 2020-07-20 07:05:00 -07:00
d92f661f12 2 new devs 2020-07-20 06:27:37 -07:00
22d40bd0e9 Merge pull request #234 from speedxx/development
readd console checks for saconfig
2020-07-19 20:35:42 -07:00
3f75712732 readd console checks for saconfig 2020-07-19 22:10:51 -04:00
fc31babff3 Merge pull request #233 from speedxx/development
fix npe in /myinfo
2020-07-18 19:58:09 -04:00
588a2f1eba fix npe in /myinfo 2020-07-18 19:51:17 -04:00
4f276ec78e Merge pull request #232 from speedxx/development
remove aw guest from tab complete
2020-07-18 14:12:09 -04:00
2ce1a3d1d3 remove aw guest from tab complete
& fix the description
2020-07-18 13:56:13 -04:00
cef2d8cec4 Let sender know votes were changed. 2020-07-17 21:04:22 -07:00
12b096b0ad mute & unmute improvements 2020-07-17 18:00:26 -07:00
cb1c67e568 mute & unmute improvements
- fix muted player messages being sent to discord
- fix mute sending 2 messages
- tell sender target has been unmuted
2020-07-17 19:54:46 -04:00
5a41632654 typo type beat 2020-07-17 16:00:27 -04:00
cde24b748a make discord chat toggleable from in-game 2020-07-17 15:58:15 -04:00
0e63857ae0 lol 2020-07-17 00:40:10 -04:00
b8e5de2080 real smart nathan 2020-07-16 22:55:57 -04:00
62aa46f856 Merge pull request #229 from Focusvity/patch-1
Fix Issue #228 - unvanishing doesn't show admins
2020-07-16 22:54:44 -04:00
d33f661d55 Merge pull request #230 from speedxx/development
remove this blocked string & don't send messages containing discord.gg to server-chat
2020-07-16 22:31:21 -04:00
c1f0d81fcc remove this blocked string & don't send messages containing discord.gg to server-chat 2020-07-16 22:24:59 -04:00
c4124de781 Fix Issue #228 - unvanishing doesn't show admins 2020-07-17 12:02:22 +10:00
30fd3ea6a1 increase login char limit 2020-07-16 00:45:44 -04:00
6435078703 /sit 2020-07-16 00:06:58 -04:00
03b22ac326 make aw available to ops 2020-07-15 20:17:45 -04:00
a1418eb516 Fixed reactions 2020-07-15 01:40:48 -07:00
7a08152c14 Some adjustments 2020-07-15 01:22:32 -07:00
bf6ef152d9 add zoglin and piglin spawn eggs to the egg list 2020-07-15 00:45:57 -04:00
114567a302 randomized gradients and /playtime 2020-07-15 00:23:26 -04:00
067180d2cf add defaulting for command permissions 2020-07-14 19:07:46 -04:00
4973318249 Merge pull request #226 from CoolJWB/development
Better potionspy
2020-07-14 18:34:50 -04:00
ceed8bd303 Merge pull request #227 from Telesphoreo/nickgr
Personally, I think this alias is very useful
2020-07-14 18:31:49 -04:00
a7d386e6be Personally, I think this alias is very useful 2020-07-14 14:56:36 -07:00
6e622ad2f3 Potionspy remake
Remade the entire potionspy and monitor class to avoid spam in the chat.

Furthermore, there is now a way to look at a history of potions thrown (individually and globally) however this history is limited to avoid too much useless data in the memory.
2020-07-14 21:00:22 +02:00
2ca57c9b39 Nick gradient, and some other thing 2020-07-13 23:00:08 -07:00
eea17a24bc i'm gonna cry this is amazing x2 2020-07-13 20:52:53 -04:00
7d6370da23 i'm gonna cry this is amazing 2020-07-13 20:41:44 -04:00
cdb385dd20 Merge pull request #224 from CoolJWB/development
Fix tempban reason issues
2020-07-13 10:13:45 -04:00
cb108e0c13 Fix tempban reason issues
Tempban won't cut off reasons that take the durations argument place anymore.
2020-07-13 01:34:39 +02:00
f9e8a4c8ba set command feedback to automatically be false 2020-07-12 12:13:41 -04:00
c836838f51 Hopefully the last hot update for now 2020-07-11 23:54:33 -07:00
6ca7f6ba24 :) 2020-07-11 23:53:40 -07:00
c7c567a14f Version change & hot update so I can restore shop data
also fuck cbtool
2020-07-11 23:53:11 -07:00
38918afe67 Update this 2020-07-10 02:12:55 -07:00
ba2b636e04 2 MB bug fixes 2020-07-10 02:10:52 -07:00
da1bec6cc0 2 MB bug fixes 2020-07-10 02:09:47 -07:00
4e432eeeea fix merging fuck up, fuck squashing 2020-07-10 01:14:49 -07:00
f6bf485c0d fix merging fuck up, fuck squashing 2020-07-10 01:13:18 -07:00
06d40927b0 Merge pull request #220 from TFPatches/development
Shouldn't of squashed this.
2020-07-10 01:04:41 -07:00
58872e2c32 Merge branch 'server' into development 2020-07-10 01:04:02 -07:00
00450e5732 i dislike people 2020-07-10 00:58:52 -07:00
98f4af7fab Hot fixes 2020-07-09 22:43:10 -07:00
7b7f09e457 1.16 Update (#219) 2020-07-09 17:07:03 -07:00
4a297a237c Fix teams not being removed for ops if they were offline
also forgot to update the display of donators
2020-07-09 16:22:12 -07:00
d12a121300 useless 2020-07-09 15:29:00 -07:00
c87e1b3d64 Read description lol
- Re-added premium
- Made the clown fish a shop item
- Thank fuck I caught this DB bug with setting null values
2020-07-09 15:18:29 -07:00
f6ee9271c6 yeah no 2020-07-09 14:11:36 -04:00
4328a13eaf Bad imports 2020-07-07 19:18:09 -07:00
ed9fe87e44 and these 2020-07-07 19:17:59 -07:00
8b4a91b2e6 Fix command blocker 2020-07-07 19:10:21 -07:00
c1a7b1c141 forgot a thing 2020-07-07 19:08:00 -07:00
78349ba49e Add back the project configurations 2020-07-07 19:04:10 -07:00
d74eeec113 Guess I had to modify LibsDisguises after all 2020-07-07 01:36:29 -07:00
c333a6ee39 2 bug fixes
- Fix votifier being non-existent breaking shop
- Fix plugin breaking error
2020-07-06 22:21:35 -07:00
3fd7147fc2 i hate /campfire 2020-07-03 13:55:46 -04:00
adfd55b419 Redstone blocker fix (#217)
* Redstone blocker fix

The redstone blocker caused severe crashes in some cases such as when redstone torches and targets were connected to wire.
The event used to block redstone is not efficient in any means so this should be reverted when (or if) it is fixed internally.

* Delete encodings.xml

* Delete compiler.xml
2020-07-03 11:03:08 -04:00
2a88e05021 honestly confused?? 2020-07-02 20:40:08 -04:00
8a60ae2235 respawn anchor place prevention 2020-07-02 08:13:20 -04:00
556dfa7233 Fixed Flatlands generation & Discord bot not actually disabled (#215) 2020-07-02 02:08:57 -07:00
19ed60d407 Bossbar reactions and stacking potato 2020-07-02 01:42:27 -07:00
aac791d768 Removal of premium 2020-07-02 01:41:40 -07:00
1357ac7e09 are you kidding kelly 2020-07-01 20:29:06 -04:00
5421de0c2f fix wildcard and clean up command executor 2020-07-01 12:45:09 -04:00
9d7e0cdefc Mojang fixed this, resolves #207 2020-07-01 03:28:33 -07:00
e4d1d6ff9e yeah smart 2020-06-30 23:55:52 -04:00
3eec04ec1c quality control 2020-06-30 23:38:29 -04:00
357eddf51a bug fixing 2020-06-30 23:21:44 -04:00
baf5fd42f6 remove silly plugin 2020-06-30 21:53:00 -04:00
9d71a7f4ae removal of aero 2020-06-30 21:51:06 -04:00
9dad7c6d05 Fuckoff was pulling you towards the player 2020-06-30 02:14:44 -07:00
35b4990f0c bruh 2020-06-30 02:00:33 -07:00
b4b1128905 fuck 2020-06-30 02:00:06 -07:00
4d19d44d19 Forgot to remove this 2020-06-30 00:55:57 -07:00
eb58419a3a 1.16, overhaul of player data 2020-06-30 00:25:38 -07:00
4ddcc3b8d7 SQL DB is a WIP 2020-05-29 03:14:21 -07:00
43ee17807a Fix my OCD (#196) 2020-05-16 19:05:59 -07:00
d1cc694742 stop confirm because video is dumb (#197) 2020-05-16 19:04:25 -07:00
abbadb55ee revert shop to names, next up mysql 2020-04-29 16:29:43 -07:00
a2a4a8a0b8 Fixes for https://totalfreedom.boards.net/thread/66504/server-problems-admin-info-section (#194) 2020-04-25 19:13:54 -07:00
c49abd1f4a got bored 2020-04-23 04:18:03 -07:00
dd5e256c84 ZING (#193)
ok
2020-04-22 13:27:07 -07:00
321d9f97e0 coder of the year award goes to me 2020-04-22 01:29:27 -07:00
721c2dc18e shit 2020-04-22 01:25:00 -07:00
a523cc313c wftgeuhjor 2020-04-22 01:23:51 -07:00
bc8ff3cd7f permission system 2020-04-13 23:40:22 -07:00
e23bfa7f87 sometimes I fucking hate people 2020-04-08 20:08:37 -07:00
cbc1d997ec chat reactions 2020-04-08 01:34:08 -07:00
af935cb824 shops stuffs 2020-04-07 19:20:01 -07:00
9485b62716 typo (#190) 2020-03-31 15:07:17 -04:00
372ba97bef Change command descriptions, as well as simplify some commands 2020-03-30 19:43:57 -04:00
925fe4a4b2 Revert command blocker as the one pushed was not working whatsoever 2020-03-27 19:53:00 -04:00
4a5032bb4c Changes with chat, add some commands 2020-03-27 18:16:28 -04:00
48ee7b0e6d Inconsistency and Ridiculous Bug Corrections (#189) 2020-03-16 17:58:44 -07:00
c94ce6b276 things 2020-03-09 18:58:45 -07:00
ecc907b535 The command blocker is now functioning as per normal (#187) 2020-02-26 22:31:21 -05:00
ce804ac23b Update Jenkinsfile 2020-02-10 16:43:07 -05:00
1744eaac69 lets test this 2020-02-10 16:35:34 -05:00
9874fe0ed5 Create Jenkinsfile 2020-02-10 16:26:05 -05:00
2d7353c076 block beehives 2020-02-08 21:52:43 -07:00
b2abc1db45 Merge branch 'TFM-1.15' of https://github.com/TFPatches/TotalFreedomMod into TFM-1.15 2020-02-08 20:54:43 -07:00
682145eb13 A better way to display the current IP (#186)
a better dev did this
2020-02-05 21:11:07 -05:00
046bebe54c shop updates 2020-02-05 17:07:16 -05:00
ea6d541270 Merge remote-tracking branch 'origin/TFM-1.15' into TFM-1.15 2020-02-04 00:06:23 -05:00
7fef35a7e2 ah so that's how it works. 2020-02-04 00:02:16 -05:00
1772164fa2 Update README.md 2020-02-03 23:59:05 -05:00
c5d778896e Merge remote-tracking branch 'origin/TFM-1.15' into TFM-1.15 2020-02-03 23:55:13 -05:00
ee8eb30a92 add current ip if online on gtfo 2020-02-03 23:54:51 -05:00
b7c1a46cbd show ip address on ban 2020-02-03 23:54:37 -05:00
a37d8ecb31 yeah 2020-01-24 23:27:16 -07:00
47a62753d1 Wow Seth, how did you not see this? (#185) 2020-01-21 22:37:51 -05:00
608791d918 This is no longer required (#182) 2020-01-20 23:09:38 -05:00
5b0ba0917c fffffffff 2020-01-15 18:10:00 -05:00
8c0391f050 https://jfrog.com/jcenter-http/ 2020-01-15 17:53:22 -05:00
56d5a669cf fishhooks can bypass pvp blocking (#178)
add fishhook to the list
2020-01-15 17:44:51 -05:00
7940313dd1 ivan u never commit 2020-01-12 20:56:31 -05:00
1ee1cbca2b fixed cooldowns and shortened them 2020-01-12 11:18:41 -05:00
939e0730fd realtime and the superior sword 2020-01-12 09:51:29 -05:00
93a9885477 forgot to do this 2020-01-11 20:55:18 -07:00
5641d0d504 oops 2020-01-11 19:59:12 -07:00
6d0400cdf3 fix ban spam when someone joins and spams at 308 mph (#176)
* fix ban spam when someone joins and spams at 308 mph

there's probably a more efficient and less retarded way of doing this but its 2 am and i cannot think

* changed the message while testing but i dont see anything wrong with the old one

* wanted to add this rq

* not needed

* clean up crew

Co-authored-by: super
2020-01-11 17:46:14 -05:00
89b91598fb why dont i ever commit 2020-01-11 17:44:13 -05:00
98ed23969a you can't read an array and modify it at the same time 2020-01-09 21:50:45 -07:00
f989b34ada kuper kant kode 2020-01-09 18:02:28 -07:00
cf21b8d07e rewrote the entitywiper 2020-01-09 06:56:25 -05:00
81621d260d grammatical genius 2020-01-09 06:43:11 -05:00
5bb489e8ba new item 2020-01-08 18:00:15 -05:00
24d121643e use ordinal over explicit ids 2020-01-08 15:00:22 -05:00
035acbfa19 more epic ! 2020-01-07 15:53:31 -05:00
fbcb6da30d shop and grappling hook 2020-01-07 15:13:59 -05:00
3b715fc091 im getting drafted 2020-01-06 23:32:54 -05:00
648d0e9b2e little things I found idk 2020-01-06 11:30:40 -07:00
1181de8ed4 i hate video ass smash 2020-01-04 18:35:41 -05:00
a7de5edfcb god fucking damnit fleek 2020-01-04 01:16:54 -05:00
fbfc605f1e im so confused 2020-01-03 23:51:46 -05:00
156c85ce69 forgot to push 2020-01-03 23:41:16 -05:00
3ea73f78e9 for luke 2020-01-03 21:42:23 -05:00
52269c2122 smart developer gang 2020-01-03 11:05:57 -05:00
446f658c13 section exploit patch 2020-01-02 19:58:52 -05:00
ee4bbea340 whoever did this was high 2020-01-02 18:39:30 -05:00
a2404d1bc6 Restrict the owner length to 16 instead of blocking them (#170)
* Restrict the owner length to 16

* no assertion thank u

Co-authored-by: super
2020-01-02 18:26:51 -05:00
81c5775150 useless 2020-01-02 10:24:29 -05:00
35ef866690 bc panther asked for it 2020-01-02 00:51:02 -05:00
eb3a266bf6 fixed the pi exploit for normal placement 2020-01-01 23:37:20 -05:00
c53de9d789 god marco you really had to make it that way 2019-12-28 21:17:25 -05:00
0efbf77cf7 Revert "ok kae"
This reverts commit 33cc3043
2019-12-28 21:16:21 -05:00
33cc304330 ok kae 2019-12-28 21:10:07 -05:00
7d19de5dfa this has been broken for like a year 2019-12-28 15:19:37 -05:00
fa51976ea5 big brain 2019-12-27 11:26:38 -05:00
6a5dc4b98e whoever didn't do this is a dumbass 2019-12-24 20:11:07 -05:00
73a799d709 customizable login title 2019-12-24 20:05:36 -05:00
96e1d0afdc wtf ivan 2019-12-24 11:08:29 -05:00
9fb89f2c69 so illogical 2019-12-24 09:51:53 -05:00
855c01a46b just stupid shit 2019-12-23 23:21:52 -05:00
1bc06f2c1d prozza gay 2019-12-23 22:26:40 -05:00
1dc2bd8518 my fucking god 2019-12-20 19:47:23 -05:00
ef9f55f7ad heads grouping 2019-12-20 19:12:04 -05:00
9167c47c2f mafrans gay code type beat 2019-12-20 18:42:13 -05:00
82cd7f2d05 why didnt i do this earlier 2019-12-20 17:35:33 -05:00
d40c85f39c :) 2019-12-20 16:08:44 -05:00
86a4577023 Why I didn't put this here before is beyond me 2019-12-19 15:31:21 -07:00
7cffdac400 1.15 2019-12-14 13:39:57 -07:00
259f3068e2 super smart x2 2019-12-14 08:12:26 -05:00
ce643661fc default to ask 2019-12-14 08:04:45 -05:00
4d1cdfedc7 forgot a check 2019-12-13 22:02:16 -07:00
6b3d170c6d that should solve it all 2019-12-13 23:33:16 -05:00
d767e7ebd6 yes super be smart 2019-12-13 22:21:23 -05:00
572ebdd0f5 Merge branch 'TFM-1.14' of https://github.com/TFPatches/TotalFreedomMod into TFM-1.14 2019-12-13 22:20:32 -05:00
d0b64c6438 yet another command void fix 2019-12-13 22:17:34 -05:00
9a6cd007ed disable death messages 2019-12-13 20:16:09 -07:00
97caed9313 fixed it yeet 2019-12-13 19:58:49 -05:00
f0aec56186 new ride mode: ask
ask players to ride them
2019-12-13 19:38:36 -05:00
a0571b0175 fixed invis, added cooldown for op and qop 2019-12-12 18:33:23 -05:00
ee44b5fb7f command cooldowns 2019-12-12 17:02:33 -05:00
69fb21f57c my bad 2019-12-12 06:56:53 -05:00
d7e3f05010 it won't stop erroring
this wouldn't be good for the server, so for now, it's removed. i will work on it again soon, though.
2019-12-12 06:52:58 -05:00
c096c4a781 fixed
offline player lookup should work now, but i still need to allow for nbt data lookup as well.
2019-12-11 22:17:05 -05:00
135d1af27d kinda ugly but it works
inventory saving: complete
2019-12-11 17:55:44 -05:00
f758be9e70 Ivan did an oopsie 😬 (#164) 2019-12-11 06:48:06 -05:00
bd84257c16 Added Paper Check (#163) 2019-12-10 20:13:47 -05:00
d78d28cc7a command void issue is no more 2019-12-10 16:23:30 -05:00
5206ab5b27 ride for ops, 4chan, and more toggles 2019-12-09 19:59:17 -05:00
2c99a8e4f4 it's official 2019-12-09 12:27:17 -05:00
9de3388525 bru 2019-12-08 21:57:28 -07:00
5cfb525a1f more freedom i guess? 2019-12-08 12:41:09 -05:00
93e6361148 ok retard 2019-12-01 16:37:19 -07:00
7572f77ab6 you're the dev (#162) 2019-12-01 13:36:45 -07:00
4344ae58bf let's add titles shall we 2019-11-30 12:43:16 -05:00
9a50903c14 some day ill stop changing my name 2019-11-29 13:34:09 -05:00
f7bca3f868 yes super be retarded (#161) 2019-11-29 13:28:21 -05:00
bbcf4a984b yes ivan be retarded 2019-11-29 11:44:56 -05:00
acd7de715e new commands, fix /tempban, etc 2019-11-29 11:41:18 -05:00
43b4fc89ef unwaterlog blocks on water ro (#160)
bruh
2019-11-29 11:35:03 -05:00
a79b26f4be gg seth (#159)
smartnt
2019-11-28 21:56:10 -05:00
90febba91a bru 2019-11-28 14:41:44 -07:00
bb9e46b1fd i dont like this either 2019-11-28 12:30:42 -07:00
79d54d09f9 this is useless 2019-11-28 12:28:42 -07:00
cc6a9a843c forgot a check 2019-11-28 12:23:08 -07:00
421315a31c revert my changes (#158) 2019-11-28 11:21:54 -07:00
0ab0ca2c66 solved forever 2019-11-28 02:28:48 -07:00
f4a77859bf FUCKOFF 2019-11-28 02:24:46 -07:00
ac1065afff : 2019-11-28 02:20:51 -07:00
0abfb70a42 smfh 2019-11-28 02:12:47 -07:00
d99e6629c4 Merge branch 'TFM-1.14' of https://github.com/TFPatches/TotalFreedomMod into TFM-1.14 2019-11-28 02:09:33 -07:00
4ca89c6bf2 probably broke something 2019-11-28 02:08:36 -07:00
f976c8ba19 Update .travis.yml 2019-11-28 00:33:08 -05:00
aac208710d travis 2019-11-28 00:28:24 -05:00
9d20b8cf1d webhook time 2019-11-28 00:27:55 -05:00
7936936942 just a test 2019-11-28 00:22:30 -05:00
ba9d3a085f Create maven.yml 2019-11-27 23:47:28 -05:00
60c46b7c8e im gay 2019-11-27 00:39:30 -05:00
9f22115b30 patch jukebox exploit (#157)
he beat seth omg
2019-11-25 23:08:13 -05:00
07e0b4e2c8 and I must do this to trigger people 2019-11-24 11:59:55 -07:00
ea93b069df but i must purposely forget to change a line to keep my fuckup streak going 2019-11-24 11:58:52 -07:00
e0bbbbdda8 assistant executive title now exists 2019-11-24 11:56:32 -07:00
fd809a0d33 Grammar fix for command_setlevel.java (#156)
I catch these as I edit my own fork, I've made one or two other error pulls. If these are annoying or unnecessary, let me know
2019-11-21 00:13:56 -05:00
b3f785beb9 tban with incomplete names 2019-11-19 20:04:44 -05:00
a926f72b67 some things deserve to be outright ignored 2019-11-18 18:00:54 -05:00
5a6dacfc37 big no no (#155)
bad @SuperSteelYT
2019-11-18 17:42:18 -05:00
7726cae9a3 block worldedit copy variables (#154) 2019-11-18 17:29:20 -05:00
e884d9b47e bruh
maybe this might lower codebeat's quality
2019-11-18 17:25:14 -05:00
75168dbb38 add codebeat classification to readme 2019-11-18 16:48:47 -05:00
337a612437 tpr on join (#153) 2019-11-18 16:45:18 -05:00
b2305a918b hi these are disabled for now don't give me bullshit thanks 2019-11-16 22:28:10 -05:00
8d0540dc66 teleport players to random location on clearonjoin 2019-11-16 16:16:38 -05:00
5c1c06afa0 asot 2019-11-12 19:50:53 -07:00
a40785f31e this grammar error is literally the root cause of climate change (#152) 2019-11-08 16:49:36 -05:00
35ff7494a4 ivan did this 2019-11-06 21:29:04 -05:00
4aaf9bc9ff pls 2019-11-04 17:47:05 +05:00
23b29bdf38 seniors get console 2019-11-04 17:42:01 +05:00
4a69f529c2 ok 2019-11-03 18:25:12 -05:00
fe2bdef026 fixed lombok on intellij 2019-11-03 17:47:51 -05:00
233632eaf1 this is what happens when you force push 2019-11-03 17:40:58 -05:00
db42985743 update to essentialsx 2019-11-03 17:00:58 -05:00
1d932e2c7b oop 2019-11-03 14:43:29 -07:00
b525e53348 cubev3.com 2019-11-03 14:40:05 -07:00
d582398f93 add toggleable clear inventories on join feature, fix shop 2019-11-03 09:10:56 -05:00
f05d6a71ae more shop related stuff 2019-11-02 13:21:23 -04:00
aad33958f0 hubworld is no longer necessary 2019-11-01 21:35:13 -04:00
ac850bc41d basics for shop, and stuff on join 2019-11-01 21:28:07 -04:00
d6dbdf15bc i'm retarded
added file back - TFM should compile now
2019-10-28 11:05:40 -04:00
2a168ece3d Change nickname character length to 3 (#149)
* You can have minimum of 3 characters in your name

* Another one
2019-10-20 18:02:11 -04:00
4f339b29b8 Block death potions (#148)
Blocks all known death potions as it's possible to use amplifier 29, 61, 93 and 125 to get the same effect from it.
2019-09-15 12:49:24 -04:00
9f4b48af5a Bruh, else statement won't set saved tags (#145) 2019-09-09 22:44:27 -07:00
14c9db3433 i missed something as usual 2019-09-09 22:43:02 -07:00
44f101841b Forgot to remove this in last commit 2019-09-08 18:33:19 -04:00
81002cbe97 HTTPD updates 2019-09-08 18:18:33 -04:00
eccf940b81 Smartn't 2019-09-02 13:05:38 -04:00
1babf57570 :okretard: 2019-09-02 12:22:02 +05:00
bd6c7d55a7 based palestine 2019-08-27 19:25:50 -04:00
d21c5f0e9d Fix issue with chat not formatting. 2019-08-22 18:07:26 -04:00
f2f3720de2 Admins can now use color chatting and formatting. 2019-08-22 17:48:30 -04:00
d6d42cc905 We don't make mistakes, just happy accidents. 2019-08-19 03:09:06 -04:00
03e1a7c9c4 /rtp as alias for /tpr (#144) 2019-08-19 03:01:53 -04:00
73470a90e5 Fix some of the messages and unblock some commands for the Hub restrictions. 2019-08-19 01:52:26 -04:00
7d0ea0837e Fixes, added /hub, removed CONSOLE restrictions on some commands 2019-08-18 21:06:47 -04:00
1c3970b984 fix /vanish 2019-08-14 16:53:35 -04:00
cecbf09584 Travis = dead (#142) 2019-08-13 17:56:40 +05:00
a166154e48 Fix %rank%/%coloredrank% not showing actual rank (#143) 2019-08-13 17:55:01 +05:00
1951d9adea we dont use travis 2019-08-11 14:16:48 -07:00
e7ebc51847 also this thing can go away thx 2019-08-11 14:15:07 -07:00
841e354d35 fix titles not showing up in login messages 2019-08-11 14:12:53 -07:00
fb336f27bb block spawn eggs 2019-08-07 00:31:05 -07:00
a4ee58cac7 wouldnt be right if I didn't fuck up somewhere 2019-08-06 21:41:31 -07:00
5085b90727 require ranks to be displayed in login messgaes 2019-08-06 21:33:12 -07:00
503a8d5b4f Remove potion effect on /vanish so OPs do not see particle effects 2019-08-06 01:15:01 -04:00
c01c436d40 Comply with suggestion to remove IPs announcing on ban or unban 2019-08-06 01:11:46 -04:00
6187c9c068 clearinventory 2019-08-03 20:31:25 -07:00
dffd9f8c3c couldnt give it a better name 2019-08-03 19:50:31 -07:00
fb0bfb847f sorry marco 2019-08-03 12:46:40 -07:00
1eaa55bb6d oops 2019-08-03 01:57:42 +05:00
ca790b6d2c bruh we have a util for this 2019-08-03 01:56:56 +05:00
668ccda5cd bru 2019-08-03 01:48:12 +05:00
894feaf1dc okay robin complain about my color taste... 2019-08-01 16:45:51 -04:00
d635e2c3d1 bruh 2019-08-01 01:59:26 -04:00
2254f1225d seth is drunk... 2019-07-31 22:10:00 -04:00
0b7813d87f i'm baby... 2019-07-31 20:05:24 -04:00
9a5f2e2231 here's your spongebob humor i guess 2019-07-31 20:01:11 -04:00
561854f2f0 smartn't @ZeroEpoch1969
Signed-off-by: Robinson Gallego <robinson.leal7@gmail.com>
2019-07-31 13:15:09 -04:00
ca868a290d remove freecam protection whatever
Signed-off-by: Robinson Gallego <robinson.leal7@gmail.com>
2019-07-31 13:02:17 -04:00
5ab0feebfd Merge remote-tracking branch 'origin/TFM-1.14' into TFM-1.14 2019-07-31 12:47:32 -04:00
797d8516d1 seth look at the todo thanks
Signed-off-by: Robinson Gallego <robinson.leal7@gmail.com>
2019-07-31 12:46:47 -04:00
5a59877f24 add ginlangs notification message
Signed-off-by: Robinson Gallego <robinson.leal7@gmail.com>
2019-07-31 12:21:21 -04:00
ae1701613b ok fixed some bugs
Signed-off-by: Robinson Gallego <robinson.leal7@gmail.com>
2019-07-31 12:19:23 -04:00
9cb4bd7822 this is how you properly silence bells 2019-07-30 21:35:41 -07:00
c3d35487e7 restrict clear features to admins etc etc
Signed-off-by: Robinson Gallego <robinson.leal7@gmail.com>
2019-07-30 17:05:59 -04:00
a71bfde4ee give ops more rights aka freedom,,,,
Signed-off-by: Robinson Gallego <robinson.leal7@gmail.com>
2019-07-30 20:31:31 -04:00
95ef7d6cfe stupid ass phone 2019-07-29 21:34:52 -07:00
6706437ab7 this isn't total nazi 2019-07-29 21:33:49 -07:00
b4dd877f2b annoying shit quick fix 2019-07-29 22:27:04 -04:00
6dcccac2b0 Merge remote-tracking branch 'origin/TFM-1.14' into TFM-1.14 2019-07-28 16:48:46 -04:00
e861f272fe people can't read, so here
Signed-off-by: Robinson Gallego <robinson.leal7@gmail.com>
2019-07-28 16:48:34 -04:00
27aaa5406d fine if you think you can still exploit it then good luck now 2019-07-28 17:39:00 +05:00
de1fbde20a Fix [TotalFreedomMod] showing up in the logs instead of the proper message 2019-07-28 14:57:10 +05:00
a97a3f3177 :okretard: marco 2019-07-28 13:36:06 +05:00
521825024e omg maga tease
Signed-off-by: Robinson Gallego <robinson.leal7@gmail.com>
2019-07-28 02:04:16 -04:00
bcb466a95c piss off
Signed-off-by: Robinson Gallego <robinson.leal7@gmail.com>
2019-07-28 00:07:01 -04:00
635316dcd2 fix NPE (#138) 2019-07-20 12:56:28 -07:00
7a4b044d45 Check if JDA is on the server. (#139) 2019-07-17 12:48:09 -07:00
c7e0a7a288 resonance freqency of a cow 2019-07-17 12:35:36 -07:00
4a91c8129b oops 2019-07-17 01:32:42 -07:00
591b8644cb fuck you super there is development 2019-07-10 19:13:57 -07:00
6b8cab5005 Block replacenear command in master builder world (#140)
http://totalfreedom.boards.net/thread/64150/replacenear-master-builder-world
2019-06-26 23:04:27 -07:00
7fbc255ee4 one final thing 2019-04-23 01:10:04 -07:00
59ee519955 More stuff for discord and mb changes 2019-04-23 00:36:51 -07:00
92ad950155 More discord stuff 2019-04-20 17:16:00 -07:00
481983aeaf unblock shulkers 2019-03-24 21:47:40 -07:00
ea6d0aba60 Merge branch 'TFM-1.13' of https://github.com/TFPatches/TotalFreedomMod into TFM-1.13 2019-03-15 16:39:05 -07:00
8f097c7454 . 2019-03-15 16:36:44 -07:00
f3cc70330e windows no longer owner 2019-03-04 17:52:30 +05:00
59cbc05a4a chee 2019-02-22 16:16:08 -07:00
4dc63fb756 don't allow adding player impostors to admin list (#132) 2019-02-09 22:30:02 +05:00
843a6ce88f h 2019-02-09 22:23:51 +05:00
e3adc7ab83 new owner (#131) 2019-02-09 22:21:47 +05:00
f263c0f5f6 pls 2019-02-09 14:48:44 +05:00
00483be7d4 .13: Auto stash before merge of "TFM-1.13" and "origin/TFM-1.13" 2019-02-09 14:46:38 +05:00
a77e53932b Merge remote-tracking branch 'origin/TFM-1.13' into TFM-1.13 2019-02-09 14:45:56 +05:00
b4bb2cf4d8 //UNTESTED: add personal jumppads 2019-02-09 14:45:37 +05:00
a56a9396d4 my bad this is redundent 2019-01-28 22:13:59 -07:00
56175dacb4 clean this shit up 2019-01-28 22:02:32 -07:00
5b2334c60f Tab completion 2019-01-28 21:57:41 -07:00
d7931793f1 nO GO AWAY UGLY 2019-01-27 18:50:54 -07:00
3d7d363e30 yay more things 2019-01-27 18:49:07 -07:00
7c6c407f78 add ssh support 2019-01-18 18:08:20 +05:00
746ccdfd44 Fix colour because it's triggering. (#129) 2019-01-18 10:43:03 +05:00
93d4c9654e bleh 2019-01-11 20:05:12 -07:00
3754222582 let's actually not touch that 2019-01-12 02:58:12 +05:00
f649e3d6c3 add clearchat 2019-01-11 22:04:32 +05:00
8c7823d7bf some things 2019-01-04 14:39:38 -07:00
2408054a49 this was a failure i forgot to remove 2018-12-29 12:44:57 -07:00
72db71b3cf yay done 2018-12-29 12:41:48 -07:00
7a43f991e3 Fix bat spawning and POM updates (#121)
* Fix bat spawning and POM updates

- Update POM for latest versions available
- Fix bats and giants bypassing spawn rules
- Update usages for /invis from /invis (clear) to /invis [clear]
- Add /mob as an alias to /spawnmob
- Remove redundant variables from POM
2018-10-06 12:44:58 -06:00
322ed77232 Force Metrics to submit to TFM even if the plugin is renamed (#119) 2018-09-18 07:56:24 -06:00
d58ee9f590 1.13.1 2018-08-30 23:33:10 -07:00
6b176820c5 This should of been added 2018-08-16 17:22:51 -07:00
516c21533c . 2018-08-16 17:20:50 -07:00
2bfc412e78 ok 2018-08-12 21:21:59 -06:00
d17457dbfa . 2018-08-11 21:21:57 -07:00
3895c2235e Geek chat 2018-08-11 02:11:03 -07:00
34c8544690 Replace ${git.commit.id.abbrev} with unknown (#118)
* Replace ${git.commit.id.abbrev} with unknown

* Use actual unknown command message
2018-08-09 00:26:12 -06:00
87cd901f72 Again, this is temp 2018-08-08 15:00:12 -07:00
968a36b216 :xdd: 2018-08-08 14:51:40 -07:00
47565ece6b Add a temp WorldEdit jar for CoreProtect. 2018-08-08 14:37:48 -07:00
94d91bbb31 -1 file (#117)
* hippity hoppity git no longer has properties

* for some reason it has to be there

* Build properties wont refresh?
2018-08-08 14:05:57 -06:00
1588ab8baa just another unprofessional commit message here 2018-08-07 22:23:33 -07:00
aac921b283 pls 2018-08-07 17:51:48 -07:00
84c0e90164 pls 2018-08-04 15:06:19 +05:00
75fb1b2172 On second thought that looks ugly. 2018-08-04 04:03:19 -06:00
69efba711a Unlinkdiscord saves changes (#116)
* Unlinkdiscord saves changes

* Unlinkdiscord saves changes
2018-08-04 03:54:23 -06:00
73cea831af fix world generation once and for all
so xmax and ymax and zmax are now exclusive and not inclusive
2018-08-03 11:50:47 +05:00
e285a72719 Marco (#114) 2018-08-01 00:08:06 -07:00
f3baf37279 merge /verifyplayer into /verify (#113)
* Spelling error and addition of forgotten checks

* Fix tag nyan

* this is what happens when you don't sleep for 2 days

* d

* Merge /verifyplayer into /verify
2018-07-31 22:58:38 -07:00
533e7892cc sigh seth 2018-07-31 20:36:23 +05:00
0657d01059 Okay I've been up for two days, I'm going to bed 2018-07-31 01:03:12 -07:00
da06ff50cb Enforce the project code style. 2018-07-31 01:31:38 -06:00
93e7957e25 It's ok, just gotta fine tune one commit at a time 2018-07-31 00:05:28 -07:00
6ec420f7fe Merge branch 'TFM-1.13' of https://github.com/TFPatches/TotalFreedomMod into TFM-1.13 2018-07-31 00:01:47 -07:00
2716e2500b Forgot class paths, remove things lombok covers, and optimize imports 2018-07-31 00:01:29 -07:00
5da2237cb3 b& (#110) 2018-07-30 23:47:26 -07:00
1f9078b702 forgot to remove an import test 2018-07-30 23:42:34 -07:00
60c627c591 I'm tired of seeing prs that make small code reformats so im doing a commit to fix it all at once 2018-07-30 23:41:56 -07:00
8bd8efc665 ok 2018-07-30 23:36:03 -07:00
b97fd70b83 stupid ide 2018-07-30 23:04:35 -07:00
12f023196a I think I have a better solution to #109 2018-07-30 22:58:50 -07:00
b702c1cec5 oops (#106) 2018-07-30 00:24:09 -07:00
1e60b06dba new high end piece of software (#107)
* new high end piece of software

- refactor all the shit to isEnabled
- idk debug
- gotta keep the messages consistent
- worldedit 🅱️ roke
- lockup description
- add /nh as an alias for namehistory
- yo /setl actually checks for w/e now cool
- gtfo and unban now are less bugs
- /whitelist is no longer written in tfm43 code and in beta
- l a m b a d a in help
- enable the bridges
- i worked on a converter for the login messages but then seth already made it work so fuck me i wasted an hour of my life

* whitelist

* i enabled them for testing
2018-07-30 00:23:57 -07:00
941bbc8da3 OPs can now have persistent tags (#108)
* new high end piece of software

- refactor all the shit to isEnabled
- idk debug
- gotta keep the messages consistent
- worldedit 🅱️ roke
- lockup description
- add /nh as an alias for namehistory
- yo /setl actually checks for w/e now cool
- gtfo and unban now are less bugs
- /whitelist is no longer written in tfm43 code and in beta
- l a m b a d a in help
- enable the bridges
- i worked on a converter for the login messages but then seth already made it work so fuck me i wasted an hour of my life

* whitelist

* i enabled them for testing

* OPs can now have persistent tags!

* Summary (required)
2018-07-30 00:23:01 -07:00
9c2f181ab9 sIgNifICanT buG FixEs (#105)
- Ignore totalfreedom.iml (people who clone from Git get this instead of TotalFreedomMod)
- Essentials check before running /denick
- Revise grammar in /invis
- WorldEdit check for /setl (since W/E is no longer a required dependency)
- WorldEdit check for /gtfo
- WorldEdit check for /unban
- Refactor -> LibsDisguiseBridge: isPluginEnabled -> isEnabled
- Remove unneccesary ChatColor in /wiperegions
- Use BlockData in Trailer
- Revise /wiewarps grammar
2018-07-28 00:11:48 -07:00
ed9200689c add a usage to cookie (#104) 2018-07-27 14:54:37 -07:00
f8b5078f84 shut up nerd. delet #103 2018-07-27 01:19:56 -07:00
c0e16ee9c7 Replace mcstats with bstats 2018-07-27 00:31:18 -07:00
45a10a871f Cool stuff (#101)
* add twitter link

* Add /pardon as an alias

* Add /unban -redo
2018-07-26 15:55:55 -07:00
519b456807 Update CoreProtect and masterbuilder restrictions (#100)
* Update CoreProtect and masterbuilder restrictions

* intellij is gay shit
2018-07-27 02:08:48 +05:00
655766a0c4 Merge remote-tracking branch 'origin/TFM-1.13' into TFM-1.13 2018-07-26 15:28:59 +05:00
bf6e35238e it's something? actually generates worlds properly (slow though) 2018-07-26 15:28:35 +05:00
575818ba69 It's 3AM so time for random commit titles: Longboi Johnson 2018-07-26 03:09:33 -07:00
7baf5f322e why did this duplicate? 2018-07-26 02:53:32 -07:00
8268cea3db Merge branch 'TFM-1.13' of https://github.com/TFPatches/TotalFreedomMod into TFM-1.13 2018-07-26 14:38:22 +05:00
815211e454 let's meme? 2018-07-26 14:37:13 +05:00
48383af346 ew what is this formatting 2018-07-26 02:03:27 -07:00
9360148426 Add important Intellij IDE files. (#99)
* Add the code style. We use allman.

* Add compiler settings.

* Set encoding.

* Add modules

* Add jar
2018-07-26 00:59:27 -07:00
d2d93ec76a Permission adjustments and this triggered my OCD 2018-07-26 00:40:28 -07:00
1bffb5994a Whoops 2018-07-26 01:36:04 -06:00
fb7c17aff7 TFM is now lib free! (#98)
- Remove lib folder
- Add a WorldEdit redo for future usage
2018-07-26 00:35:31 -07:00
7a2b7ec78b Add the admininfo command info TFM 2018-07-26 00:10:54 -07:00
551a0b2317 Even more 1.13 things 2018-07-25 22:22:19 -07:00
3c46df0082 Compile against 1.13 (#97) 2018-07-25 21:37:34 -07:00
af777f1a76 Attempt to resolve banning issues (#96) 2018-07-25 18:34:40 -07:00
25aa28194b Even more bug fixes (#94)
- Clean up /commandlist
- /ov now displays proper unknown command message
- /toggle doesnt check for case
- Trailer will now check if CoreProtect is enabled before trying to log
- Temporarily disable master builder world restrictions, causing spam in console everytime a command is one
2018-07-25 15:09:35 -07:00
0d0ad7d947 This is 2018 2018-07-25 15:06:19 -07:00
38e1769f0d More 1.13 things 2018-07-25 14:23:23 -07:00
113ab62f0b Bug fixes (#92)
* Bug fixes

- Now checks if nothing was ejected
- Fix NPE in saconfig
- Module_permbans now checks if you are an admin

* Discord is better
2018-07-24 22:54:00 -07:00
c0b43f26ea This is why Lombok exists 2018-07-24 22:52:49 -07:00
65bd609952 go away 2018-07-24 19:49:58 -07:00
f671f3c3fa this was my fault for messing up the pr attempting to resolve the conflicts, im so stupid smh 2018-07-24 19:47:04 -07:00
7278176143 asdf (#91) 2018-07-24 19:44:00 -07:00
0d503a6c06 It will be fixed, one character commit at a time 2018-07-24 19:27:50 -07:00
7e93b2ae53 ... 2018-07-24 19:20:01 -07:00
7170b1c999 More progress towards 1.13 2018-07-24 19:08:29 -07:00
6275fd8bcb the more commits the better right? right? anyone? 2018-07-24 17:28:22 -07:00
d29f192a36 Change hosts 2018-07-24 17:16:04 -07:00
22c6cf014c Overhaul build proccess (#89)
- Now only requires CoreProtect in /lib
- WorldEditListener and LibsDisguiseBridge updated
- Releaseparrots will now check if there are any parrots
- Fix some red lines in playerdata
2018-07-24 17:06:58 -07:00
402a1e28b7 Add all valid entries to toString() (#88) 2018-07-23 23:58:17 -07:00
a90e7654d1 This was the lib i used to try to add the brigadier, but it didnt work and i forgot to remove it 2018-07-23 23:57:09 -07:00
31015be69f Merge branch 'TFM-1.13' of https://github.com/TFPatches/TotalFreedomMod into TFM-1.13 2018-07-23 23:54:40 -07:00
ebb05fa6a6 Temporarily disable some things 2018-07-23 23:54:19 -07:00
bfefebe480 Some restrictions and something should of added a while ago 2018-07-22 12:57:18 -07:00
0c702ee967 how much edge? 2018-07-22 22:28:46 +05:00
cae068a151 Begin the process of updating to 1.13 2018-07-21 22:51:43 -07:00
e8eda42295 lotta commands 2018-07-21 17:45:56 -07:00
301c5b8da1 add patch for negative infinity and infinity attributes causing disconnect 2018-07-21 21:34:34 +05:00
f0a9b6d747 there's no semicolon 2018-07-19 16:30:08 +05:00
24f65dc46b oops 2018-07-18 21:55:12 +05:00
fdbc02bac9 make old tags independent of ac format 2018-07-18 21:54:30 +05:00
46cc6d37c3 yes this is needed, for some people who think they are unkillable 2018-07-14 00:28:45 -07:00
04089973f0 Improve the spawnmob command 2018-07-12 16:33:02 -07:00
f167134a3a VS now ops players, more security measures for MBW 2018-07-12 15:25:18 -07:00
8602850245 fix spawnmob command 2018-07-11 16:17:00 -07:00
114567f94c okay don't save IDE 2018-07-06 22:17:00 +05:00
12a0b6961b fix crash mobs 2018-07-06 22:06:34 +05:00
b43a9b6749 Unlinkdiscord now works for ops 2018-06-29 12:36:42 -07:00
107d886b35 Config is handled by MainConfig not built in class 2018-06-29 12:15:36 -07:00
92d63180f9 Add a silent option for the vanish command 2018-06-29 10:49:06 -07:00
bd44173a14 Fix /invsee (#79) 2018-06-28 11:13:18 -07:00
650f732dd4 Logstick stuff 2018-06-28 11:06:13 -07:00
d7450bf181 oops. 2018-06-19 14:01:51 +05:00
0898c0a81b Wipe worldguard regions when the flatlands is wiped. 2018-06-16 12:50:35 -07:00
6e2255c904 Update Command_unlinkdiscord.java 2018-06-12 22:12:05 +05:00
c071c701b3 Update Command_unlinkdiscord.java 2018-06-12 22:11:50 +05:00
e92b755306 Update Command_spawnmob.java (#75) 2018-06-10 12:33:20 -07:00
7a45734baf Fix EntityWiper not registering dropped items (#76)
* Fix EntityWiper not registering dropped items

* Remove unused import
2018-06-10 12:32:59 -07:00
553767454d use the tfm way 2018-06-08 18:34:10 +05:00
1ad60c1c80 fix stuff social links 2018-06-08 13:21:10 +05:00
c9a0626239 h
* At least make sure it actually compiles

* Remove extra >
2018-06-05 15:36:20 +05:00
4da29d5c9d more h 2018-06-03 02:16:42 +05:00
57e7fe13cf h 2018-06-03 02:15:18 +05:00
6c5ae5d7d7 Merge remote-tracking branch 'origin/TFM1.12-Alpha' into TFM1.12-Alpha 2018-06-02 23:10:36 +02:00
a6584eaa9d Fix my own shitty formatting 2018-06-02 23:09:58 +02:00
7228180f4b let's keep it in sync 2018-06-03 02:03:50 +05:00
d38d780887 Merge branch 'TFM1.12-Alpha' of https://github.com/TFPatches/TotalFreedomMod into TFM1.12-Alpha 2018-06-02 23:01:24 +02:00
b44d08eb55 *sigh* 2018-06-02 13:45:05 -07:00
c835d38b7c attempting to make good codes at 3 in the morning isnt very bright 2018-06-02 13:08:35 -07:00
7026423e8e TotalFreedomMod 5.2 God (#69) 2018-06-02 01:18:28 -07:00
435898550b Lemon at least make sure it compiles 2018-06-01 23:13:52 -07:00
100e155fe0 What 2018-06-01 22:38:01 -07:00
b8f4119924 Bring changes from the official repo over to here 2018-06-01 22:36:37 -07:00
6647088429 why did that not push 2018-06-02 03:40:25 +05:00
4cf338bfb5 add customization of admin format 2018-06-02 03:39:52 +05:00
56b712729a might as well shorten that 2018-06-02 02:28:44 +05:00
713ec7c8d9 Add a command that shows social media links.
Resolves #67
2018-06-01 19:35:48 +02:00
ee7dbd56da Resolves TFPatches/TotalFreedomMod#57 (#66)
After a bit of recreating the PlayerVerification system, it will work now.
2018-06-01 19:13:40 +05:00
45bda95a75 yes 2018-06-01 02:42:50 -06:00
aad947a354 Small problem 2018-05-29 14:30:29 -07:00
f82f3932b9 Ya missed somethin there 2018-05-26 14:01:53 -07:00
6e7297e48f add .java
*cough cough* @ZeroEpoch1969 check PR's before merging them, also the formatting is off
2018-05-26 13:56:19 +05:00
bdae2b7b54 /cookie returns (#65) 2018-05-25 23:11:55 -07:00
f7f6c47a1a Some color changes 2018-05-24 16:25:22 -07:00
ff3f9f0a66 /potspy saving (#64) 2018-05-22 16:01:24 -07:00
baf367b003 Allow telnets to verify master builders, and mb httpd addition. 2018-05-21 19:49:03 -07:00
69e82b5746 Remove updater fully and revert /tfm properly. 2018-05-21 19:32:28 -07:00
6e3fa2d6dd let's not break the license shall we
update wasn't used anyway
2018-05-22 00:44:18 +05:00
94b7e138d7 oh no 2018-05-18 19:10:18 -07:00
40362eb790 Increase WorldEdit limit 2018-05-18 19:08:08 -07:00
1ff7d7c8cc Remove range bans and add mbworld alias 2018-05-17 17:46:20 -07:00
7b1a8cb527 Added some missing stuff for MB World (#61)
* Added some missing stuff for MB World

* Fix isExecutive method
2018-05-14 23:11:24 -07:00
6853baebdd Master Builder world 2018-05-13 12:49:13 -07:00
1371e23d59 Master builder title, resolves #36 2018-05-11 20:09:23 -07:00
83017e518d Removed some things 2018-04-29 13:06:56 -07:00
34a8e7f912 Make the expel command senior only (#56) 2018-04-21 19:34:34 -07:00
ffbe71f5dd Old admin mode and commandspy saving 2018-04-19 07:29:19 -07:00
200a856413 allow admins to see eachothers command's 2018-04-12 23:15:16 +05:00
b402987e41 Update FUtil.java 2018-04-01 20:51:57 -06:00
f23818a9f9 fix invsee offhand bug (#52)
https://i.untuned.me/jndoUt.png
chest size can only be a multiple of 9, it was set to 1
2018-03-30 09:58:19 +05:00
a8e39e3db2 Actually use the admin's personal tag if available (#51) 2018-03-28 15:37:40 +05:00
dec237db9f don't unfreeze player impostors either 2018-03-27 12:08:57 +05:00
a63681d4a3 Improvements 2018-03-26 16:26:21 +05:00
affe77c203 Lemon went too fast 2018-03-25 17:12:47 -07:00
1080893be4 No more waiting for windows to update TFM 2018-03-25 16:29:30 -07:00
d5a3742849 Forgot something 2018-03-24 23:08:50 -07:00
88f89d7e67 Tested to be working, but made some minor changes. 2018-03-24 18:41:51 -07:00
01223d44ef that shouldn't have pushed.. 2018-03-24 20:44:09 +05:00
3576a9bb6e [UNTESTED] implement player verification system 2018-03-24 20:41:45 +05:00
50cb6c4ca9 Improvements 2018-03-18 01:32:50 -07:00
c423f273c5 Fixed freezer. Resolves #48 2018-03-12 21:43:51 -07:00
5223339a9e Improve PvP blocker 2018-03-10 13:51:19 -07:00
664c56dfd5 Update FUtil.java 2018-03-06 13:59:34 -07:00
101e490104 Commodore was removed 2018-03-05 16:26:20 -07:00
7c7265e662 It was just a little mistake 2018-03-02 21:34:43 -07:00
40a78f8608 Punishment logging! 2018-03-02 21:29:08 -07:00
2185794444 Who needs itemizer? 2018-02-22 23:49:12 -07:00
0551337e8b Implement #22 and fix pom.xml.
Signed-off-by: Lemon <minecraftoxlemonxo@gmail.com>
2018-02-22 17:55:04 +05:00
2bffcef9a9 Myadmin tags and misc improvements 2018-02-21 18:22:13 -07:00
c8683ea489 Add Seth to dev
yes yes yes
2018-02-21 22:06:19 +05:00
04c6b9ba64 Update Command_entitywipe.java (#35) 2018-02-21 22:04:46 +05:00
8b425967a4 Fix #25 and #23 with other misc. fixes.
Signed-off-by: Lemon <minecraftoxlemonxo@gmail.com>
2018-02-09 13:21:44 +05:00
b801979f72 oops. 2018-01-24 00:02:08 +05:00
908caafb7d oops, fix error 2018-01-24 00:00:51 +05:00
4f2a6bfcb8 Add armor & offhand functionality to invsee 2018-01-24 00:00:15 +05:00
9b6394c8c6 Fixed pom, added tprandom, admins can now kick other admins (#21)
* Fixed pom, added tprandom, admins can now kick other admins

* went too fast

* im mental
2018-01-15 02:53:05 +05:00
7c3ea836e7 Keep inventory items upon death (#20) 2018-01-08 00:49:38 +05:00
d2eea67f67 Security & improvement update (#19) 2018-01-08 00:33:58 +05:00
09e5b39099 add /potspy as an alias (#18) 2018-01-05 20:33:33 +05:00
4ed0db05de Fixed /list-a and optimized /gtfo (#17)
* Fixed /list-a and optimized /gtfo

* heck

* Don't use fuzzy ips for telnet

* It never ends with the list command

* no really it doesnt

* Why not? Commits get squashed and merged here.

* On second thought, it's fine. It only wildcards that last digit.
2018-01-04 22:27:58 +05:00
3f360a4d5e Bug fixes and improvements (#16)
* Bug fixes and improvements

* Re-add Marco's name

* Actually make the logfile page load.
2018-01-02 10:46:35 +08:00
059bf14d90 More improvements. (#15)
* This is rediculous

* Forgot some final and this

* Fixed and improved skull caging

* Windows wanted this yeah
2018-01-01 11:43:10 +08:00
d9d1d4fa9b Re-added potion spy (#14)
* Re-added potion spy

* grammar nazi
2017-12-31 11:58:20 +08:00
7e524da928 Forgot to optimize this. (#12) 2017-12-30 02:44:36 +08:00
6a09b23331 Added discord support (#11) 2017-12-30 02:12:47 +08:00
1871451ed6 Lots of formatting fixes and removal of useless things (#10) 2017-12-28 13:50:39 +08:00
b931cce3bb Fixing marco's mistakes (#8) 2017-12-23 12:07:36 +08:00
a67fe49c98 Merge pull request #6 from marcocorriero/TFM1.12-Alpha
Adds Something that is missing
2017-11-27 12:17:04 +05:00
77131c2138 Update Command_wipewarps.java 2017-11-27 12:16:26 +05:00
75c0db71ff Update Command_stfu.java 2017-11-27 12:14:26 +05:00
f56ecd4663 Update Command_smite.java 2017-11-27 12:12:56 +05:00
cffe0a6db5 fix formatting 2017-11-27 12:12:00 +05:00
a697acbdea Update Command_gtfo.java 2017-11-27 12:11:02 +05:00
381c06e818 Merge branch 'TFM1.12-Alpha' into TFM1.12-Alpha 2017-11-27 12:09:54 +05:00
019950152b Add rainbownick 2017-11-27 12:06:39 +05:00
7c42f78426 Add rainbowtag 2017-11-27 12:06:04 +05:00
336a2de231 eh 2017-11-27 12:04:53 +05:00
a1a0894eb5 Log IP's downloading logfiles & uploading schematics 2017-11-27 11:58:40 +05:00
bb8dbc9e31 Add files via upload 2017-11-26 16:21:04 +01:00
c5e40bcc13 Merge pull request #5 from marcocorriero/patch-2
Makes Trail loggeable to coreprotect.
2017-11-23 07:25:32 +05:00
a10a0cbef9 Update Trailer.java 2017-11-22 20:48:45 +01:00
5ee8c31a3d Update Command_gtfo.java 2017-11-17 14:15:48 +01:00
ff8f6a1a96 Update Command_disguisetoggle.java 2017-11-17 14:14:25 +01:00
b485a9792d Update Command_cage.java 2017-11-17 14:13:45 +01:00
cba204d9f3 Applying requested changes 2017-11-17 14:12:21 +01:00
1fcaef8ab1 Update Command_blockpvp.java 2017-11-16 23:42:05 +01:00
5d80ef063f Update Command_blockedit.java 2017-11-16 23:41:03 +01:00
1c46c26ad9 Update Command_blockcmd.java 2017-11-16 23:39:56 +01:00
7b33d91c94 Update Command_blockcmd.java 2017-11-16 23:39:44 +01:00
51eb3f59fd Update .gitignore 2017-11-16 23:38:31 +01:00
2443d3eaca Adds Something that is missing
Adds Futil.strictcolorize (that filters Banned colors on smite and gtfo)

Adds Actual Server-TFM features
Adds Wipewarps
adds wipecoreprotectdata
adds spectator
adds rainbownick
adds rainbowtag
2017-11-16 23:32:09 +01:00
3babdf88a2 Update Trailer.java 2017-11-16 14:54:53 +01:00
25ad80be60 Makes Trail loggeable to coreprotect. 2017-11-16 14:48:54 +01:00
9e7c385fef Merge pull request #4 from marcocorriero/patch-1
Forgot to cancel the event
2017-11-14 15:44:54 +05:00
af11581133 Forgot to cancel the event
im a such stupid xD
2017-11-14 11:34:49 +01:00
8c8c5360c2 Merge pull request #3 from marcocorriero/TFM1.12-Alpha
Adds PVP Filtering
2017-11-14 15:27:42 +05:00
489bbf4fc9 Removes the warning and stuff 2017-11-14 11:23:52 +01:00
c42ad5e706 Adds PVP monitoring
Resolves

God PVPing
Creative PVPing
 Both PVPing.
2017-11-13 18:48:02 +01:00
3958c58ed2 He's a developer again. 2017-11-11 22:14:01 +05:00
a916a06994 last 2017-11-11 22:12:47 +05:00
6812d9cfd5 another 2017-11-11 22:12:30 +05:00
c4fcd91776 update 2017-11-11 22:10:23 +05:00
c866571e93 upload 2017-11-11 22:09:57 +05:00
e1ac92b784 Add files via upload 2017-11-07 14:11:18 +05:00
212b367c3c Update 2017-10-29 19:45:38 +05:00
a9681fb7d7 Little typo 2017-10-21 22:32:15 +05:00
79857345bb Add signpatch service 2017-10-21 22:31:17 +05:00
8bb4911607 Don't need this anymore 2017-10-21 22:28:58 +05:00
13be60142a Don't need this anymore 2017-10-21 22:28:50 +05:00
8f45d08ea3 Fix movement exploit 2017-10-21 22:28:20 +05:00
2bb2c77caf Add sign patch 2017-10-21 22:27:43 +05:00
4011ecd7e7 Add files via upload 2017-10-14 18:33:53 +05:00
b9098a7251 Make sure EVERYTHING is uploaded. 2017-10-14 16:21:07 +05:00
b397e57139 Patches and additions 2017-10-13 23:38:40 +05:00
d878fd2458 Patches 2017-10-13 23:38:05 +05:00
ed2f15cc54 Patches
1. Remove marco from dev
2. Add namehistory
3. Fix grammar issues
4. Actually use CoreProtect bridge to rollback players
5.  Improve automatic wiper
2017-10-13 23:35:11 +05:00
3c09bc7995 Updated default config to account for removal of MC Version field. 2017-09-09 15:16:00 +01:00
13dc0a25be Resolved issue whereby the editor didnt save when it should have 2017-08-13 13:18:01 +01:00
299e0ccd4a Merged Devel into 1.12 Alpha Branch 2017-08-13 13:16:35 +01:00
4f6d32330b Update README.md 2017-08-06 08:45:04 -04:00
089fc0670d Set up Travis CI automatic build uploads to SFTP server. 2017-08-02 13:35:56 -04:00
b55ca70056 Logviewer registration overhaul. 2017-08-01 15:59:24 -04:00
3bc8adfb98 Update Travis CI status image link. 2017-08-01 13:59:04 -04:00
3668c5e9d6 Merge remote-tracking branch 'origin/maventravisci-nocb' into devel 2017-08-01 13:57:51 -04:00
1971910178 Add .travis.yml file for Travis CI integration 2017-07-29 01:19:34 +02:00
655d7471dc Removed dependency to Craftbukkit and Spigot server code.
This breaks whitelist and onlinemode toggle.
2017-07-25 21:07:22 -04:00
2c5ac7297d Set up Travis CI for TotalFreedom organization. 2017-07-25 17:34:22 -04:00
e16714ea6c Resolved dependency issues - Building correctly 2017-07-25 10:20:36 +01:00
c4ebbb74c7 Resolved conflicts with TotalFreedom/Devel Branch 2017-07-25 09:53:34 +01:00
8c424a45f9 Updated dependencies removing Libs Disguise due to unstable upstream repos 2017-07-25 09:46:48 +01:00
98f0fdb620 Added a catch for if a player is caged and kicked. Resolves #1789 (#2041) 2017-06-30 09:47:31 +02:00
26c83ff585 Corrected player message for /disguisetoggle. Resolves #1872 (#2042) 2017-06-30 09:46:31 +02:00
f97de65787 Update /smite (#2009)
This update makes smite messages stand out more in chat and to the smitten player.
2017-06-30 09:42:49 +02:00
30a6b7a442 Increased text limit. Resolves #1941 (#2039)
* Updated the comment as I forgot that

* Corrected the max limited based on updated issue from 250 to 256
2017-06-30 09:41:01 +02:00
5d7aa8913b Frontdoor IP update (#2064) 2017-06-30 09:40:27 +02:00
f25207104c Updated to 1.12 R01 for dependencies 2017-06-09 15:02:30 +01:00
c6a2496d72 Fixed Module_players to include only active admins. Closes #1852 (#2036)
With Madgeek's latest changes, the logviewer now pulls from the 'players' HTTPD module. This edit switch causes inactive admins to no longer have access to the log viewer.
2017-05-29 20:59:06 +02:00
baf73df4f9 Added /adventure, removed /spectator 2017-05-22 20:13:59 +02:00
5ffbc9e8a4 Update compile version to v1_12_R1 2017-05-22 20:05:41 +02:00
7245de1513 Update README.md 2017-04-26 22:36:20 +01:00
d2503da298 Updated Libs Disguise Version Dependency
It will now always pull the latest 1.11 branch commit, this should remain build-able and stable as it is a TF Project.
2017-04-26 22:34:14 +01:00
c8fb54182e Update pom.xml 2017-04-23 17:17:14 +01:00
f3130f5cfc Update pom.xml
Updated Libs Disguise version
2017-04-19 18:29:47 +01:00
6e6842dbd2 Update compile version to v1_11_R1 2017-01-08 17:07:28 +01:00
28142a6883 Update to Spigot 1.11-R1 2017-01-08 17:07:28 +01:00
0bb5265b77 Fixed issues with POM file - Everything is resolving properly and CI is working 2017-01-08 12:42:49 +00:00
60b143e248 Added Travis YAML File for CI# 2017-01-08 00:01:42 +00:00
aaeee0d36e Final fix to the dependency resolution. Reverted minor changes to WorldEdit handling 2017-01-07 23:59:53 +00:00
7b183612e4 Moved all dependencies over to proper resoultion. Currently experiencing an issue with TF-WorldEdit not pulling custom additions 2017-01-07 23:37:25 +00:00
0eb0c7a02f Remove /invis smite, add /invis clear. Resolves #959 (#1011) 2016-11-13 16:46:06 +01:00
475b299e37 Fixed a typo in announcements (#911) 2016-11-13 16:30:22 +01:00
be8203a832 Added /unloadchunks. Resolves #1779 (#674) 2016-11-13 16:16:42 +01:00
9fa4c0662c Fix /premium. Fixes #1850
Add ArmorStand to list of wipeable entities
Add /whohas clear. Resolves #1836
2016-10-02 23:05:03 +02:00
c10b08df27 Force wipe entities when using /entitywipe 2016-10-02 22:42:36 +02:00
25fafa7a6c Fix /wildcard selecting only 1 player. Fixes #1861 2016-10-02 22:33:00 +02:00
2ff66ad54b Properly block dangerous /wildcard commands 2016-08-27 17:34:42 +02:00
1e47d29adf Add aggelosQQ to the developers list 2016-08-26 22:40:10 +02:00
2008871658 Fixed /dtoggle
Apparantly LibsDisguises does not support plugin reloading.
Now switched back to OxLemonxO's method, using a modified LibsDisguises method
2016-08-26 22:06:20 +02:00
cadf4e4fc7 Readd /uall and /dtoggle. Resolves #1793 2016-08-26 17:34:13 +02:00
662cef44d5 Automatically despawn item entities after some time. Resolves #901 2016-08-26 12:54:53 +02:00
c885bbb144 Prevent /saconfig setrank from setting to a console rank. Fixes #1721 2016-08-26 12:44:57 +02:00
f2260d56a4 Fix potential IOOBE in /stfu. Fixes #1750 2016-08-26 12:40:59 +02:00
174a782759 Make /save-all available to admins again. Resolves #1795 2016-08-26 12:36:54 +02:00
6a86f66cf6 Improved entitywiper. Fixes #512 2016-08-26 12:34:18 +02:00
b153debdef Block sign interaction. Fixes #1831 2016-08-26 11:57:39 +02:00
71c46b5431 Update the target IP when using /myadmin -o. Fixes #1841 2016-08-26 11:42:13 +02:00
580e88d1a9 Improved wildcard command blocking. Fixes #1842 2016-08-26 11:38:35 +02:00
92a7e354ba Block structure blocks from being placed 2016-06-25 01:28:05 +02:00
6a004a9f35 Merge branch 'tfm5.0-mc1.10' into tfm5.1-mc1.10 2016-06-25 01:21:12 +02:00
91506480b7 Updated to Spigot-1.10-R1 2016-06-24 15:53:11 +02:00
e8e0e9988a Updated to Spigot-1.10-R1 2016-06-24 15:29:48 +02:00
1a16f06ac6 Resolves #1644 (#1716)
Fix /doom breaking blocks
2016-05-14 20:47:52 +02:00
aca3398d21 TotalFreedomMod Electrum
Version 5.0

This TotalFreedomMod release implements many changes. Most notably, the
internals have been completely revamped. TotalFreedomMod now relies on the
Aero library for core mechanics such as command handling and services.

Another important change is the UUID system. In TotalFreedomMod Electrum,
it has been completely removed. The core reason for this is that the
system as a whole was very bugged. Additionally, it did not solve the
primary reason for its conception: preserving player data when the player
changes their username. This is because TotalFreedomMod servers usually
run in offline-mode. This meaning that some of the players joining do not
have a registerd Mojang UUID whatsoever. All in all, the UUID system was
buggy, and it did not fix the reason it was implemented, so it has been
completely removed. The admin list and the ban list now use usernames and
IPs again.

Lastly, many smaller changes have been implemented. Due to the amount of
changes, they have not been named individualy. Please refer to the issues
below for more details.

Fixes #342
Fixes #350
Fixes #380
Fixes #684
Fixes #704
Fixes #716
Fixes #735
Fixes #745
Fixes #784
Fixes #765
Fixes #791
Fixes #805
Fixes #826
Fixes #883
Fixes #1524
Fixes #1534
Fixes #1536
Fixes #1538
Fixes #1545
Fixes #1546
Fixes #1568
Fixes #1627
Resolves #403
Resolves #435
Resolves #597
Resolves #603
Resolves #628
Resolves #690
Resolves #708
Resolves #747
Resolves #748
Resolves #749
Resolves #764
Resolves #767
Resolves #782
Resolves #809
Resolves #803
Resolves #811
Resolves #813
Resolves #830
Resolves #848
Resolves #856
Resolves #876
Resolves #908
Resolves #992
Resolves #1018
Resolves #1432
Resolves #1446
Resolves #1494
Resolves #1501
Resolves #1526
Resolves #1540
Resolves #1550
Resolves #1560
Resolves #1561
Resolves #1578
Resolves #1613
2016-05-12 21:51:58 +02:00
924f718d5a Fixed bugs in TFM 5.0
Added /saconfig setrank
Added /saconfig reload
Small changes
2016-03-07 21:32:05 +01:00
6edb6be7d9 Many changes for TFM 5.0
Improved admin system
Improved Rank system
Implemented config converter
Improved command handling
Updated Aero
2016-03-06 16:58:59 +01:00
055973aa37 Many changes for TFM 5.0
Refractoring
Reworked /saconfig
Reworked part of the command system
Removed unused config sections
Refractored part of the config
Fixed bugs with admin list
Actually allow CONSOLE to have senior perms
2016-03-02 20:28:01 +01:00
19ced05110 Update to Spigot 1.9-R1 2016-03-01 19:14:14 +01:00
e93ac11172 Use custom service abstraction in favour of Aero's AbstractService
Use Aero's YamlConfig in favour of FConfig
Refractoring
Small edits
2016-03-01 17:47:01 +01:00
7328d20c84 Rename some commands to more fitting alternatives
Preserve old command names as aliases
2016-02-29 22:27:11 +01:00
4586b7519f [Bleeding] Revamped rank system yet again
Refractoring
Bug fixes
Mass format
2016-02-29 21:48:17 +01:00
a0058869c9 Added checkstyle plugin
Moved resources to correct folder
Fixed and improved build information, no longer tracking build.properties
2015-11-22 19:28:32 +01:00
89a317b7df Mavenized project 2015-11-18 21:41:51 +01:00
0c3bc40b03 Completely switched over to service-based events 2015-11-16 00:32:04 +01:00
848f103afa [Bleeding] TotalFreedomMod 5.0
Mass Refractoring, now uses me.totalfreedom.totalfreedommod as package
Uses Aero https://github.com/Pravian/Aero
Revamped command system
Remove all TFM_ prefixes
Revamp rank system
Use new service based system
Cleanup
2015-10-19 19:43:46 +02:00
a7a2db15d6 Track build information in a better way
build.properties replaces buildcreator.properties, buildcreator.default.properties annd buildnumber.properties, but is untracked.
'git describe --tags --always HEAD' is now used to identify the build version, and its result is stored in the build properties file, included with the build. appinfo.properties is removed in favour of build.properties in the compiled jar.
The build number is still tracked, but offline, allowing TFM commits to more easily be merged
2015-09-06 23:05:36 +02:00
6aeb56de07 Block commands right when the TFM is enabled. Fixes #735 2015-09-06 17:05:03 +02:00
400038265b Prevent command arguments from using long number strings. Resolves #782
Mass format
2015-09-06 17:02:06 +02:00
3b87323c41 Remove /permban list. Resolves #805 2015-09-06 16:46:20 +02:00
cdf2dc6760 Limit host console commands even more. Resolves #811 2015-09-06 16:42:02 +02:00
bf1d779b95 Merge with upstream 2015-06-11 22:29:39 +02:00
27004da544 Compile for Spigot-1.8.7-R0.1. Resolves #644 2015-06-11 22:28:55 +02:00
c0c4c25875 Merge branch 'tfm44' into pr/584 2015-06-07 17:39:01 +02:00
adbaf9341d Grammar fix in Command_invis.java 2015-06-07 17:38:30 +02:00
b5c5e60c12 Merge branch 'pr/687' into tfm44 2015-06-07 17:36:25 +02:00
1ed1b352f3 Properly allow Forge clients to log in. Fixes #493 2015-06-07 17:35:56 +02:00
53c898fd76 Merge branch pr/580 2015-06-07 17:30:12 +02:00
acc8f3e2b8 Changed /kicknoob message to be more user-friendly 2015-06-07 17:28:58 +02:00
157eeef867 Merge branch 'tfm43' into tfm44 2015-06-07 17:22:21 +02:00
21c0833f14 Rename dependency names to match wiki 2015-06-07 17:21:05 +02:00
c002fbc537 Handle player online check in AsyncPlayerPreLoginEvent
Apparently, online players with the same username are kicked before PlayerLoginEvent is called. This commit moves the online player check to AsyncPlayerPreloginEvent so the default behaviour can still be modified

Fixes #642
2015-05-30 20:51:49 +02:00
a4d8f4646e Properly block /jail and /unjail
They're both aliases, /togglejail is the actual command
2015-05-30 20:13:11 +02:00
f2dc46d4ef Work around /saconfig clearme bug. Fixes #629 2015-05-30 20:01:10 +02:00
901a327b1e Block/unblock pending commands for non-superadmins
Blocked /jail, /unjail and /blockdata for non-superadmins
Moved /clearhistory, /save-all, /save-on and /save-off to non-autoeject section

Resolves #671, Resolves #670, Resolves #656
2015-05-30 19:58:15 +02:00
580ba0a357 Prevent players moving to illegal positions. Fixes #651 2015-05-30 19:45:22 +02:00
abf52870dd Block /green for non-superadmins. Resolves #594
Moved /restart to the correct section
2015-05-14 15:27:15 +02:00
d48bfde128 Merge branch 'pr/625' into tfm44 2015-05-14 15:19:15 +02:00
7ac7b75ae6 Allow admins to use lava/water buckets 2015-05-14 14:38:15 +02:00
b66614cad9 Block /execute for non-superadmins. Resolves #630 2015-05-14 14:30:51 +02:00
ff70f13e05 Fixed bug where /uuid recalculate would set ranks incorrectly 2015-05-13 14:56:38 +02:00
ea110c01dd Add /overlord 2015-05-13 14:52:01 +02:00
632f3647a8 Blocked /tpall for non-superadmins 2015-05-12 20:43:35 +02:00
80287433eb Properly fixed commandblocker
Rest in peace, terrible, terrible mistake
2015-05-12 20:34:04 +02:00
b18aeb2d38 Work around setFlying() throwing exceptions 2015-05-12 20:17:38 +02:00
68f972c562 Allow players to fly. Fixes #608 2015-05-12 17:18:12 +02:00
994056047a Block /weather for non-superadmins. Resolves #617 2015-05-12 17:13:28 +02:00
f115315341 Block /worldborder for non-superadmins. Resolves #615 2015-05-12 17:08:44 +02:00
57e5395143 Block /title for non-superadmins. Resolves #621 2015-05-12 17:07:41 +02:00
17f3a4ca3d Remove blocked commands from the CommandMap. Resolves #622
Temporarily workaround: Remove blocked command from the CommandMap
In Spigot 1.8.3, cancelling PlayerCommandPreprocessEvent will have no effect
This results in TFM failing to block player commands: The player will get a message,
but the command will still execute. Removing the command from the CommandMap is a
temporary workaround untill the related Spigot issue has been fixed.

https://hub.spigotmc.org/jira/browse/SPIGOT-879
2015-05-12 16:54:51 +02:00
e2d0e9e754 Fixed error when blocking player commands 2015-05-12 16:45:10 +02:00
b167540ad7 Properly cancel blocked commands 2015-05-11 23:05:21 +02:00
0d1ce072dc Reorder prefix assignments, fixes admin prefixes 2015-05-11 22:37:38 +02:00
887a5c6b16 Fixed all admins showing up as Superadmins 2015-05-11 22:21:59 +02:00
ea6bfa8387 Fix commandblocker not blocking properly. Resolves #586 2015-05-10 23:28:13 +02:00
42266c37ea Fixed false positive plugin specific command block. Resolves #575 2015-05-10 23:19:23 +02:00
2dd8e00201 Lowercase commands before mute-block checking. Resolves #312 2015-04-27 00:58:27 +02:00
46cd88a18a Add protected spawnpoints after all worlds have been loaded. Resolves #438 2015-04-27 00:53:07 +02:00
2ff0f6f5d6 Fix Forge clients being unable to log in. Resolves #493 2015-04-27 00:48:33 +02:00
9ff6325469 Add owner to standard prefixes. Resolves #504 2015-04-27 00:45:47 +02:00
ea404985fd Ban IPs in /tban. Resolves #499 2015-04-27 00:39:36 +02:00
8fc25111e2 Synchronize calls in AsyncPlayerChatEvent listener. Resolves #524 2015-04-27 00:31:54 +02:00
4fce1109a1 Merge branch 'master' into pr/553 2015-04-27 00:08:13 +02:00
916fd75003 Added Mumble announcement 2015-04-27 00:07:50 +02:00
aa35aae58f Merge branch 'master' into pr/574 2015-04-26 23:51:18 +02:00
6849fb2784 Display proper URL when banning with /glist ban
When you glist ban an online player, it says totalfreedom.boards.net regardless of the config entry. I modified it so it is the config.yml's ban appeal URL.
2015-04-26 23:50:40 +02:00
313577d083 Merge from master 2015-04-26 23:30:54 +02:00
53efcfd06b Don't autoeject players using /reload. Resolves #525 2015-04-26 23:28:29 +02:00
edaaeef65f Merge branch 'master' into pr/571 2015-04-26 23:25:32 +02:00
d6eb5bdcda Fix getIpBanList() returning UUID bans. Fixes #570 2015-04-26 23:23:46 +02:00
7d675923db Replaced last instances of DarthSalamon with Prozza 2015-04-26 22:40:38 +02:00
87fd8a165c Added MCConnect IP to nosuper IPs 2015-04-26 22:29:31 +02:00
1205252450 Correct compile NMS version 2015-04-26 22:21:26 +02:00
1ed45b1a20 Compile with Java 7 2015-04-26 22:17:25 +02:00
822f55d9f2 Merge with master 2015-04-26 20:44:28 +02:00
aacf37aa56 Update to Spigot 1.8.3-R2 2015-04-26 20:43:37 +02:00
a15e39d7dd Added more announcements. Resolves #516 2015-03-29 12:10:55 +02:00
72fa8532d3 Blocked pending commands in CommandBlocker. Resolves #492 2015-03-15 13:19:20 +01:00
f4aa0c324c Updated to new WorldEdit API
TF-WorldEdit doesn't depend on TFM anymore. It's event-based now.
Moved TFM_TelnetListener to the Bridge subpackage
2015-03-07 17:32:27 +01:00
73ee1f3624 Implement SuperAdmin service 2015-02-18 19:24:04 +01:00
4ca3593653 Release v4.3 2015-02-16 17:13:21 +01:00
af52dec24a Store UUIDs in a SQLite database. Resolves #373 and resolves #406 2015-02-16 17:00:38 +01:00
34ebb3586c Resolve PlayerRank entries by IP. Resolves #415 2015-02-16 15:49:10 +01:00
eee8682959 Merge branch 'master' into commandblocker 2015-02-15 19:28:10 +01:00
af1dd2e9ff Added support for blocking subcommands. Resolves #357, Resolves #365 and Resolves #334 2015-02-15 19:27:35 +01:00
ade60ad611 Updated developer names. Resolves #421 2015-02-13 18:08:27 +01:00
e699ad1663 Cleanup: Mass reformat and organize imports 2015-01-15 15:47:10 +01:00
e2308ee904 Block /spreadplayers in config. Closes #382 2014-12-06 15:02:51 +01:00
d14a595ac4 Update to Spigot's CraftBukkit 1.8
Corrected the version check number

Moved Apache Commons reference to imports section
2014-11-30 13:54:29 +01:00
5190af0a6b Merge pull request #377 from ItzLevvie/patch-3
Fixed spelling mistake in TFM_PlayerData.java
2014-11-25 20:39:00 +01:00
a11b87ec83 Fixed spelling mistake in TFM_PlayerData.java 2014-11-25 19:29:58 +00:00
c7a0604afc Move unfreeze and unmute tasks to TFM_PlayerData. Resolves #352
Mass format & cleanup
2014-11-20 23:20:31 +01:00
9970277134 Fixed last bugs with ForceIP. Closes #354 2014-11-13 21:14:21 +01:00
49f6879ccb Merged with master 2014-11-13 19:22:18 +01:00
794b76321a Avoid adding blocked IPs to the superadmin list 2014-11-13 18:37:49 +01:00
e5b4ae0e3e Merge with master 2014-11-02 14:22:53 +01:00
310ce4f75a Ported all useful features from MobArena over to TFM 2014-11-02 14:20:10 +01:00
cf072dc0d5 Merge pull request #353 from Wild1145/master
ForceIP bugfixes.
2014-11-01 21:00:19 +01:00
7fe0b562ee Cleaned it up a bit as suggested by @jeromsar 2014-11-01 19:55:45 +00:00
6f6fdb28bf Minor tweaks to default port, Heartbeat and blocked cmd's 2014-11-01 19:51:43 +00:00
524d4da9d8 Bug Crunching on the ForceIP - Should work a lot better now. 2014-11-01 19:46:00 +00:00
0aa0bae0ad Merge pull request #349 from Wild1145/master
Added ForceIP. Resolves #224
2014-11-01 20:14:27 +01:00
fcf52ba02a Managed to tweak the port requirement, isnt actually needed like I thought. 2014-11-01 17:44:07 +00:00
8a92ff132b Changed the default config entry for the server address & added a little tweak. 2014-11-01 15:36:24 +00:00
99043a7c49 Removed Hostname and Port from the config - Now using the server address. 2014-11-01 12:10:08 +00:00
2a71be4050 Tweaked the config notes for Hostname & Port to make it a bit more descriptive 2014-10-31 18:10:06 +00:00
b43ef812a2 Fixed another slight formatting issue. 2014-10-31 18:05:25 +00:00
7981adaf85 Fixed Formatting Issues - Forgot it was allman style there. 2014-10-31 17:57:44 +00:00
1bc22a817a Removed the whitespace. 2014-10-31 17:52:57 +00:00
57a6b35457 Added the ForceIP feature - Resolves #224 2014-10-31 17:47:05 +00:00
8b45482d0a [Bleeding] Block listed IPs from being supered. Resolves #201 2014-10-30 19:44:05 +01:00
af64a77268 Officially compiling for Spigot for the time being 2014-10-30 19:28:47 +01:00
5c50069f21 Merge pull request #346 from ItzLevvie/patch-2
Fixed spelling mistake in Command_rd.java
2014-10-25 14:20:53 -04:00
3c329667a4 Fixed spelling mistake in Command_rd.java 2014-10-25 19:08:44 +01:00
1565c9643d Merge branch 'Obi2kanobi-master' 2014-10-01 13:22:10 -04:00
84ef49bf65 Tweak whitespace, change description. 2014-10-01 13:21:52 -04:00
878075c898 Merge branch 'master' of https://github.com/Obi2kanobi/TotalFreedomMod into Obi2kanobi-master 2014-10-01 13:18:09 -04:00
c74763c96a Adjust filename filter for schematic manager. 2014-09-28 18:24:48 -04:00
d01f9d0b2f Smite players with /stfu -s. Fixes #325. 2014-09-28 22:14:52 +01:00
e780c4ffec Change to v1_7_R4 for Spigot's pseudo-1.8 support. 2014-09-24 18:37:12 -04:00
3968dbe0a2 Merge pull request #316 from KingDragonRider/master
Blocked /size and //mask. Resolves #316
2014-09-23 21:23:49 +02:00
ff9164714c Restructured /saconfig. Resolves #322. Resolves #303. 2014-09-19 19:59:29 -04:00
72e105eb34 Added extra blocked commands used to bypass //brush
I've added commands which enable //brush even though it is blocked (/size and //mask) to the blocked commands list (for superadmins only).
2014-09-13 17:16:55 +01:00
f4440fd262 Merge pull request #310 from ItzLevvie/patch-1
Blocked "/setidletimeout" in config.yml
2014-09-13 17:49:56 +02:00
587b84a489 Blocked "/setidletimeout" in Config
Closes https://github.com/TotalFreedom/TotalFreedomMod/issues/307
2014-09-03 17:15:38 +01:00
107952f0ba Modified /ro to not affect adminworld. 2014-08-30 15:18:45 -04:00
8cae042857 Don't write spoofed UUIDs to cache 2014-08-30 16:24:35 +02:00
d1b73592af Compatibility with old builds of WorldEdit. 2014-08-27 20:53:43 -04:00
b7175d73ab Fixed AIOOBE in /rollback 2014-08-27 13:30:46 +02:00
9c976b381b Added TFM_UuidManager to cache UUIDs. Resolves #255
All methods related to UUIDs in TFM_Util have been moved to TFM_UuidManager
2014-08-27 11:42:49 +02:00
0c99862793 Perform backups in a seperate folder
Perform weekly backups on config.yml
Minor refractoring
2014-08-27 10:58:26 +02:00
0240b65fad Save and remove player entries on leave
Removed timer for player loading, applied to plugin instead
2014-08-27 00:28:44 +02:00
b6d3e5baca Merged with master 2014-08-26 18:25:27 +02:00
15650b84cf Fixed duplicate ban entries
Bans are equal when:
a) The ban-type matches
b) The ban-subject matches
Small changes
2014-08-26 18:23:48 +02:00
9233bcfedc Added some getters for TFM_Announcer 2014-08-25 20:05:10 +02:00
b0aa4a850d Added Announcer. Resolves #226
Organised onEnable()
Formatting
2014-08-25 20:01:54 +02:00
af97481d11 Return false on incorrect args in Command_rollback. Fixes #296 2014-08-25 18:47:29 +02:00
3c6e706c98 Merged with master 2014-08-25 14:07:47 +02:00
aca62caec1 Revamped TFM_BanManager, TFM_Ban and TFM_ServerInterface
Better ban type checking
Moved ban reason compilation to TFM_Ban
TFM_ServerInterface: Less expensive operations first
Command_rollback now polls TFM_RollbackManager for available players
2014-08-25 13:57:13 +02:00
eaa23985bd Merge pull request #294 from Obi2kanobi/contributing
Format GTFO reason broadcast. Fixes #293
2014-08-24 11:21:24 +01:00
e3f9452b9f Fix GTFO broadcast formatting. Fixes #293 2014-08-24 00:30:56 +01:00
755080d0a4 Code refactoring and cleanup. 2014-08-23 14:19:25 -04:00
0f764b976b Tweak /cake. Fixes #295. 2014-08-23 13:52:26 -04:00
d0a435a5d6 Added preliminary TFM support for TelnetRequestDataTagsEvent. 2014-08-20 21:23:22 -04:00
b02764ddca lang.StringUtils -> lang3.StringUtils
Remove bold from /nickclean.
2014-08-18 16:48:52 -04:00
b3c28d33f2 Fixed broken format for /gadmin ipban. 2014-08-15 22:53:57 -04:00
6ad1187eef Merge branch 'patch-2' 2014-08-15 16:29:53 -04:00
1bf1267b49 Remove extra lines. 2014-08-15 16:29:40 -04:00
d2f6f7f51a Make '/tfm reload' update blocked commands. Resolves #265.
Config must be reloaded in order to pull in any changes to blocked commands list.
2014-08-15 16:16:45 -04:00
dc2c996516 Block tags containing "console", fixes #260. 2014-08-15 15:59:43 -04:00
f502e44764 Added /nickclean - mass remove distracting things from player nicknames. 2014-08-14 19:07:52 -04:00
c490a3d62e Now made qdeop require you to be op else it wont try to deop the player. 2014-08-14 22:37:20 +01:00
9a2dc52e87 Using qop should now only op those who are not op.
This will further reduce the amount of spam and doesn't spam everyone with "you are now op".
2014-08-14 22:32:45 +01:00
a1c11f4e0f Using playerMsg(final String message) instead of playerMsg(final CommandSender sender, final String message) when possible. 2014-08-14 15:49:48 -04:00
48fd4c590d Use TFM_Command.playerMsg instead of TFM_Util.playerMsg for commands. 2014-08-13 20:56:04 -04:00
97cde0cfd4 Modified /qop and /qdeop to be a bit less spammy when multiple matches are found. 2014-08-13 20:11:12 -04:00
429269d8d2 Partial fix for #267.
Still need to implement method to kick people off telnet if they are deactivated while connected.

Also - 800th commit! Woohoo!
2014-08-12 19:38:32 -04:00
1a50c16d9a Rework tags (now they won't duplicate when Essentials changes display name). 2014-08-12 18:25:57 -04:00
891d8d178f Use commons' substring function to avoid IndexOutOfBoundsExceptions. 2014-08-12 15:32:56 -04:00
fc1c487dce Woops 2014-08-09 18:53:54 +02:00
e2cc14370a Added /forestgen to blocked commands 2014-08-09 18:13:15 +02:00
d5d6f18fb4 Truncate string argument on calls calls to setPlayerListName. Resolves #262. 2014-08-07 20:47:15 -04:00
00e22dc56e Formatting fix for CONTRIBUTING.md 2014-08-02 21:58:57 +02:00
40b475ea0c Merge branch 'master' of https://github.com/TotalFreedom/TotalFreedomMod 2014-08-02 21:55:03 +02:00
65eabbdba4 Added links 2014-08-02 21:54:18 +02:00
cb4a47d812 Made some changes to CONTRIBUTING.md 2014-08-02 21:45:57 +02:00
ecbd70493b Merge branch 'master' of https://github.com/TotalFreedom/TotalFreedomMod 2014-08-02 11:14:55 -04:00
4988140268 Fixed mixed string concatenation / String.format usage.
Doesn't make much sense to use string concatenation and a String.format to generate the same output. I believe this method is much more readable.
2014-08-02 11:14:37 -04:00
57b0aadb9b Added some comments regarding the license 2014-08-02 17:10:54 +02:00
ef9ce2a9a7 [Bleeding] First compile of new playerdata system. Resolves #223
The new TFM_PlayerList stores player under /players/[uuid].yml and only caches online players. When players log in, their playerdata will be loaded.
2014-08-02 16:27:43 +02:00
2c92b0874e Merge pull request #253 from PacksGamingHD/patch-2
Fixed compile error.
2014-08-02 14:05:20 +02:00
927560ad75 TotalFreedomMod won't compile like that. 2014-08-01 23:01:04 -07:00
c8dbc8a623 Merge pull request #251 from LevnettUKRonit/patch-2
Add ban reason to /gtfo
2014-08-01 17:58:10 +02:00
11eef83a65 Fixed the ban reason on the same line as the actual ban
Resolves https://github.com/TotalFreedom/TotalFreedomMod/pull/250
2014-08-01 15:39:07 +01:00
a2439a7093 Merge pull request #249 from LevnettUKRonit/patch-1
Update config.yml
2014-07-30 14:12:07 +01:00
d8697590a7 Update config.yml
Closes https://github.com/TotalFreedom/TotalFreedomMod/issues/233
2014-07-30 14:07:31 +01:00
6d98604cf0 Update config.yml 2014-07-30 09:27:21 +01:00
3d6be1cd51 Significantly speed up player list loading. 2014-07-29 22:38:08 -04:00
01edfed307 Tweak /whohas. Note the change from bitwise & to logical && resolving possible bug. 2014-07-26 11:48:17 -04:00
5e4d1d0d6d Limit duration and amplifier for /potion command. Resolves #243 2014-07-26 11:47:23 -04:00
86f61f1487 Restructure gadmin. Resolves #245 2014-07-25 23:11:44 -04:00
461cfa7bdc Switched from Essentials' StringUtil to Apache Commons StringUtils. 2014-07-20 17:40:06 -04:00
75b296496e Removed DisguiseCraft support. 2014-07-20 17:25:45 -04:00
183277db21 Clean up sources of compile warnings.
Move anything that causes deprecation warnings into TFM_DepreciationAggregator if no alternative implementation possible.
2014-07-19 21:02:00 -04:00
2b597867f0 Eliminate usage of deprecated org.bukkit.Server.matchPlayer
Suppress unchecked cast warnings in Module_players.
2014-07-19 17:39:42 -04:00
7f7312c0a2 Fix landmine. 2014-07-19 17:34:12 -04:00
73214165a5 Fix glitch in clownfish smacker. 2014-07-19 15:29:07 -04:00
54be4f7e88 Added clownfish smacker. 2014-07-19 14:59:02 -04:00
3ccab5f534 Fixed exploit that allows command blocker to be bypassed. 2014-07-17 17:28:32 -04:00
f635af5f95 Fix error when using /ops purge. 2014-07-16 20:41:14 -04:00
cc3a183cac Fixed toggle message for /toggle fluidspread. 2014-07-13 22:43:27 -04:00
173b686658 Add HTTPD Module_logs, resolves #238 2014-07-13 18:04:08 -04:00
a0d5743232 Ensure UUID is never null at login. Amends #214 and fixes #229 2014-06-30 19:09:26 +02:00
7598d211cd Correctly display permban URL. Fixes #228 2014-06-30 17:51:13 +02:00
6b064d0e68 Correctly reference static members in TFM_Jumppads. Fixes #225 2014-06-30 17:35:58 +02:00
8fc0673bb2 /tfm: Return true when the player doesn't have permission. Fixes #227 2014-06-30 17:30:16 +02:00
aa062a9d11 Ensure UUID is never null for non-existing players
Currently, the player's name is SHA-1'ed and the first 32 hexadecimal
characters are formed into a 'spoofed UUID'. I think this is the best solution
2014-06-29 16:40:53 +02:00
8b4b2f97e0 Finished TFM_UuidResolver and /uuid. Resolves #214 2014-06-29 12:09:03 +02:00
c4f1d0c06f Merge from master 2014-06-29 10:53:39 +02:00
20d4e886fc Merge from bleeding 2014-06-28 22:31:33 +02:00
e36ace1671 [Bleeding] Started work on TFM_UuidFetcher 2014-06-28 22:24:36 +02:00
2f055fbecb /gadmin: return false if required args are not present. Resolves #220 2014-06-28 12:00:16 +02:00
d193686c79 Block //snow. Resolves #217 2014-06-28 11:50:15 +02:00
ba2ada569f [Bleeding] Fixed permissions through console. Resolves #195 2014-06-28 11:43:05 +02:00
850fd9aa4a [Bleeding] Save when purging (ip)ban list. Resolves #219
Small changes
2014-06-28 00:22:55 +02:00
1fb14ca1dd Added /list -a. Resolves #194 2014-06-22 18:07:02 +02:00
499472a126 Remove adminworld guests properly. Fixes #202 2014-06-22 17:53:50 +02:00
28459e4702 Merge branch 'master' of https://github.com/TotalFreedom/TotalFreedomMod 2014-06-22 17:13:30 +02:00
57dda8367c Merge branch 'Wilee999-patch-3' 2014-06-22 17:12:56 +02:00
cdf03b4353 Perform suggested changes. Fixes #184 2014-06-22 17:12:30 +02:00
5ec66e8c7e Merge branch 'patch-3' of https://github.com/Wilee999/TotalFreedomMod into Wilee999-patch-3 2014-06-22 17:06:54 +02:00
f57aeb8fb0 Merge pull request #210 from WickedGamingUK/patch-1
Java Code Conventions
2014-06-22 16:58:46 +02:00
adb3834836 Don't double toggle in /toggle. Fixes #193 2014-06-22 16:56:02 +02:00
d82d6fd704 Updated latest WorldEdit methods 2014-06-22 16:50:57 +02:00
ec0683f610 Java Code Conventions 2014-06-18 16:36:52 +01:00
2d118a44a9 Removed xXWilee99Xx from the developer list 2014-06-16 15:50:16 +02:00
64cd7f7393 Merge pull request #204 from LevnettUKRonit/patch-4
Added aliases /gmc to /creative
2014-06-10 16:42:13 +02:00
9a1fc8ea36 Merge pull request #205 from LevnettUKRonit/patch-5
Added alias /gms to /survival
2014-06-10 16:41:38 +02:00
75247af337 Added aliases /gms 2014-06-09 17:48:57 +01:00
d20b062b70 Added aliases /gmc 2014-06-09 17:25:31 +01:00
4b36574255 Merge pull request #199 from LevnettUKRonit/patch-3
Changed /tag remove to /tag off to match usage.
2014-06-08 10:47:11 +02:00
bba42797d8 Changed /tag remove to /tag off to match usage. 2014-05-29 17:22:28 +01:00
365e38e63a Merge pull request #196 from LevnettUKRonit/patch-1
Telnet Admin should be dark green. Fixes #192.
2014-05-28 17:05:50 +02:00
5a3106ace8 Fixed TFM_PlayerListener.java
Fixed where it said Telnet Admin was light green its now ChatColor.DARK_GREEN
2014-05-28 09:53:23 +01:00
8cb4ef111c Rename /saconfig clear to /saconfig clearme. Closes #189 2014-05-19 19:46:40 +02:00
50d6cf471c Incremented version number for development towards next release 2014-05-19 19:33:18 +02:00
e942f0bf75 Removed most singleton patterns. Resolves #181 2014-05-19 19:32:25 +02:00
f8231aeb3f Stable release v4.2 2014-05-19 14:25:04 +02:00
eddbcf515c Allow customization of Owners. Appends to #178 and commit 67c86aea 2014-05-19 14:21:37 +02:00
00ac914066 Unban fuzzy IPs for admins. Fixes #187 2014-05-16 15:39:40 +02:00
179fe9d665 Organise TFM_ConfigEntry values by type 2014-05-16 15:30:02 +02:00
67c86aea24 Added config values for MOTD, server name and address. Resolves #178 2014-05-16 15:18:24 +02:00
e4bb1ef6aa Auto-freeze on imposter login; adds: http://www.totalfreedom.boards.net/thread/12123 2014-05-15 18:57:34 -07:00
16b02e3dec Changed /saconfig remove to /saconfig delete to match usage. Fixes #183 2014-05-14 16:22:56 +02:00
70e248202b Increment version number to 4.2 2014-05-13 17:56:21 +02:00
51ef752259 Don't warn when finding unknown services in ServiceChecker 2014-05-13 17:18:08 +02:00
b3e40462e2 Preload player when logging in. Fixes #182 2014-05-13 17:11:32 +02:00
73a91c02c6 Re-implement unbannable usernames. Resolves #180 2014-05-13 17:01:55 +02:00
7b8ba0bdf5 Revamp /plugincontrol. Fixes #159 2014-05-13 16:32:01 +02:00
bd9d6114ba Add /wipeuserdata. Resolves #177 2014-05-11 19:04:01 +02:00
0435174342 Perform daily and weekly backups. Resolves #163 2014-05-11 18:41:58 +02:00
796ef3d359 Refractored .createBackup() to TFM_Util.createBackup(String) 2014-05-11 18:15:04 +02:00
a3f3903760 Increase default nuking block place threshold. Resolves #169 2014-05-11 18:05:51 +02:00
5c99aa9a44 Merge pull request #176 from Wild1145/patch-1
Removed Legacy Login
2014-05-11 17:54:22 +02:00
8292eb20ae Removed Legacy Login
Due to HeartBleed Mojang had to disable the legacy login servers. They will always show as "Offline" so may as well just remove them.
2014-05-11 12:56:01 +02:00
d9e0791a3b Merge pull request #175 from Wild1145/master
Added Telent check along with Auto Prefix and Auto color tab
2014-05-10 23:44:39 +02:00
dbfec1e86d Added Color Tabs and Auto Prefixes. Resolves #173 2014-05-10 22:42:37 +01:00
31e03d6348 Added a telnet checker. 2014-05-10 22:40:32 +01:00
46494a2c87 Reset 2014-05-10 22:40:19 +01:00
b11eb0f762 Added in both player tab colours, Auto Prefixes and a telnet checker 2014-05-10 22:35:45 +01:00
730b0e2c83 Merge with master 2014-05-07 12:53:05 +02:00
60a9de7e7c [Bleeding] Allow spaces in tags. Resolves #160 2014-05-05 16:25:57 +02:00
8a4fa946fd Make /doom ban all IPs
Before, /doom would only ban the current IP
2014-05-05 16:10:14 +02:00
9bc0859fdf Added /tagnyan. Resolves #170 2014-05-05 16:03:30 +02:00
742450d016 Convert stop/remove to string literals. Resolves #168
Removed TFM_Util.isStopCommand(String) and TFM_Util.isRemoveCommand(String)
2014-05-05 15:31:12 +02:00
ad06bea3ae Fixed bugs with /saconfig clear. Resolves #167
Admins can now use /saconfig clear [ip] to remove the designated IP (only their own IPs can be removed. They can also simply use /saconfig clear to remove all IPs but the current one. /saconfig clear is safe, meaning you can't remove your current IP or an IP that doesn't belong to you.
2014-05-05 14:27:33 +02:00
68d83fa397 Allow admins to remove their own IPs 2014-05-05 14:10:32 +02:00
fe84c3a2a0 Removed Command_listsync. Resolves #166
@markbyrn wants it removed. It also didn't have much of a use, associated servers wouldn't use it since it overwrites the current superadmin and permban config.
2014-05-05 13:35:47 +02:00
6e5e70ac90 [Bleeding] A little more config tweaking 2014-05-05 13:30:17 +02:00
489549a0ea Warn when NMS versions don't match. Resolves #165 2014-05-05 00:01:57 +02:00
56b55eb3e2 [Bleeding] Fixed last errors due to misconfigured config 2014-05-04 23:07:26 +02:00
4ef5f59fb9 [Bleeding] Fixed startup error due to misconfigured config 2014-05-04 23:03:34 +02:00
d31ad2e9fc [Bleeding] Remove player online check through PlayerNotFoundException
getPlayer(String) now returns null when the player could not be found
2014-04-26 13:55:24 +02:00
8a9dfca6d3 [Bleeding] Config refractoring 2014-04-26 13:21:36 +02:00
55ddf5a30a Merge branch 'master' into bleeding 2014-04-25 17:36:08 +02:00
59e890c654 Added more startup statistics 2014-04-25 17:26:10 +02:00
b0e62add9f Reupdate index lists when adding an admin. Fixes #156 2014-04-25 17:10:43 +02:00
7cdf1abcf2 [Bleeding] Fix invalid characters in usernames 2014-04-23 19:30:11 +02:00
ee0ebd85fc Increment to version 4.1 to reflect latest changes 2014-04-23 17:03:33 +02:00
518537413b Allow use of multiple blocks in /ro. Closes #87 2014-04-23 17:00:44 +02:00
802d02d653 Shoot players in the sky when using /doom. Closes #142 2014-04-23 16:43:12 +02:00
f3cb57c9cd Extend command rollback time. Closes #136
Addresses http://www.totalfreedom.boards.net/thread/9531/problem-suggestion
2014-04-23 16:38:47 +02:00
c7c2795f41 Tweaked /ops and /qop 2014-04-23 16:36:11 +02:00
20b117a703 Moved toggle commands (/firespread, /lavadmg, etc) to /toggle 2014-04-23 16:23:50 +02:00
8522570db5 Move license to separate project 2014-04-22 23:19:40 +02:00
08e4a4a171 Moved permban list to a seperate class
Refractoring
Code cleanup
2014-04-21 23:09:10 +02:00
a0affddeed Refractored command handling to seperate class: TFM_CommandHandler
Cleanup, refractoring
2014-04-21 19:00:39 +02:00
c82113dc22 Fixed duplicate entries when adding/removing players
Some refractoring
2014-04-21 17:45:32 +02:00
9315227906 Actually make the default console senior permissions configurable 2014-04-21 15:08:52 +02:00
00e9b4ea1f [Bleeding] Cleaned up TFM_Command.senderHasPermission() 2014-04-21 14:56:24 +02:00
22b0781020 Allow the default CONSOLE to have senior permissions 2014-04-21 14:52:23 +02:00
7df24c6b86 Added more detailed build information to /tfm through appinfo.properties 2014-04-21 14:37:53 +02:00
0e9044ffc3 Allow compiling for Spigot 1.7.8 2014-04-17 18:29:08 +02:00
3371f54c06 Merged from master 2014-04-15 16:43:38 +02:00
92d7c58957 Merge pull request #148 from Wilee999/patch-5
Fix /invis smite bug where it spammed the smite message each player.
2014-04-13 00:56:57 +02:00
478244773b Fix /invis smite bug where it spammed the smite message each player. 2014-04-11 17:57:11 -07:00
b3b182e753 Merge pull request #141 from Wilee999/patch-5
Implement /tfipbanlist purge adminAction.
2014-04-09 23:10:48 +02:00
49601035a5 Implement /tfipbanlist purge adminAction. 2014-03-02 18:02:10 -08:00
475 changed files with 32062 additions and 20958 deletions

23
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,23 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
# Maintain Maven Updates
- package-ecosystem: "maven" # See documentation for possible values
directory: "/" # Location of package manifests
target-branch: "development"
open-pull-requests-limit: 50
schedule:
interval: "daily"
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "development"
open-pull-requests-limit: 50
schedule:
interval: "daily"

46
.github/workflows/codacy-analysis.yml vendored Normal file
View File

@ -0,0 +1,46 @@
# This workflow checks out code, performs a Codacy security scan
# and integrates the results with the
# GitHub Advanced Security code scanning feature. For more information on
# the Codacy security scan action usage and parameters, see
# https://github.com/codacy/codacy-analysis-cli-action.
# For more information on Codacy Analysis CLI in general, see
# https://github.com/codacy/codacy-analysis-cli.
name: Codacy Security Scan
on:
push:
branches: [ development ]
pull_request:
branches: [ development ]
jobs:
codacy-security-scan:
name: Codacy Security Scan
runs-on: ubuntu-latest
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v3
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@v4.2.0
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
verbose: true
output: results.sarif
format: sarif
# Adjust severity of non-security issues
gh-code-scanning-compat: true
# Force 0 exit code to allow SARIF file generation
# This will handover control about PR rejection to the GitHub side
max-allowed-issues: 2147483647
# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif

74
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@ -0,0 +1,74 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ development ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ development ]
schedule:
- cron: '20 18 * * 1'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Java JDK
uses: actions/setup-java@v3.9.0
with:
# The Java version to make available on the path. Takes a whole or semver Java version, or 1.x syntax (e.g. 1.8 => Java 8.x). Early access versions can be specified in the form of e.g. 14-ea, 14.0.0-ea, or 14.0.0-ea.28
java-version: 17
distribution: 'adopt'
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

21
.github/workflows/java17-maven.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: Java17-Maven-Build
on: [push]
jobs:
build-java-17:
runs-on: ubuntu-latest
steps:
# Checkout the code
- uses: actions/checkout@v3
# Java 16 Builds
- name: Set up JDK 17
uses: actions/setup-java@v3.9.0
with:
java-version: 17
distribution: 'adopt'
- name: Build with Maven
run: mvn -B package --file pom.xml

38
.gitignore vendored
View File

@ -1,14 +1,35 @@
# Netbeans excludes - StevenLawson & JeromSar
/nbproject/private/
/dist/
/build/
manifest.mf
# TFM excludes
build.properties
dependency-reduced-pom.xml
# Eclipse excludes - JeromSar (old)
# Netbeans excludes
/nbproject/private
/dist
/build
manifest.mf
# Now defines that Maven CheckStyle is used
# nb-configuration.xml
# Eclipse excludes
.project
.classpath
/bin/
/.settings/
/bin
/.settings
# IntelliJ excludes
*.ipr
*.iws
/.idea/modules.xml
/.idea/discord.xml
/.idea/jarRepositories.xml
/.idea/workspace.xml
/.idea/uiDesigner.xml
/.idea/libraries
/.idea/
*.iml
# Maven excludes
/target
# OS generated files
.DS_Store
@ -17,3 +38,4 @@ manifest.mf
.Trashes
ehthumbs.db
Thumbs.db
.idea/inspectionProfiles/Project_Default.xml

View File

@ -1,55 +1,3 @@
# Contributing to TotalFreedomMod #
TotalFreedomMod is a CraftBukkit server plugin designed primarily to support the [Official TotalFreedom Minecraft Server](http://totalfreedom.me/). However, it can be used in a variety of other configurations with minimal fuss.
# Contributing to TotalFreedomMod
For those who wish to contribute, we encourage you to fork the repository and submit pull requests. Below you will find guidelines that will explain this process in further detail.
## Getting Started ##
* Make sure you have a [GitHub account](https://github.com/signup/free)
* If the issue is a bug, submit a ticket for it, assuming one does not already exist.
* Clearly describe the issue including steps to reproduce it.
* Make sure you fill in the earliest version that you know has the issue.
* Fork the repository on GitHub
## Making Changes ##
* Create a topic branch from where you want to base your work.
* This is usually the master branch.
* Only target release branches if you are certain your addition must be on that branch.
* To quickly create a topic branch based on master; `git checkout -b contribution` - Please avoid working directly on the `master` branch.
* Make changes and commit where necessary.
* Check for unnecessary whitespace with `git diff --check` before committing.
* Make sure your commit messages are in line with those which are already made.
* Make sure your changes build (<b>and work!</b>).
## Tips - How To Get Your Pull Request Accepted ##
* See this picture for help:
![Imgur](http://i.imgur.com/7kogorv.jpg)
* Make sure your changes work and compile without difficulty.
* Make sure your change adds something useful, do not add commands to micromanage the server. (ie: Shorthands for a collection of commands)
* __Commands that make use of `org.bukkit.Server.dispatchCommand()` will probably be rejected.__
* Features must be in line the general idea of "Total Freedom".
* Changes must be directed towards the main "TotalFreedom" server. Adding names such as the name of your own TotalFreedom-like server will get your pull request denied.
* Do not add yourself to the developer list.
* Ensure that you use the correct whitespace-style. That is: 4 spaces as indentation.
* Please make sure your changes are written such as other features would be. Eg: commands have their own class and extend TFM_Command.
* __Make sure your code is written in the [Allman style](http://en.wikipedia.org/wiki/Indent_style#Allman_style).__
* Do not increment the version number.
* If you want to add multiple changes, please make one pull request per change. This way, it's easier to accept your changes faster and won't block the other changes if there is an issue with a specific line of code.
* Please make sure there are no bugs in your code.
* Please avoid having to add files in the main namespace where possible.
* Make sure all changes work before you commit these, this avoids having multiple unnecessary commits.
* Please refrain from using an excessive amount of commits. As few as possible is generally the best.
* Please do not spread your addition over several pull-requests.
## Submitting Your Changes ##
* Push your changes to a topic branch in your fork of the repository.
* Submit a pull request to this repository.
* Explain in detail what each one of your commits changes and point out any big changes.
* Wait as a developer evaluates your changes.
## Additional Resources ##
* [TotalFreedom information](http://totalfreedom.me)
* [TotalFreedom forums](http://totalfreedom.boards.net)
* [Bug tracker](https://github.com/TotalFreedom/TotalFreedomMod/issues)
* [General GitHub documentation](http://help.github.com/)
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
For information about contributing to TotalFreedomMod, please see the [contributing guidelines](https://github.com/TotalFreedom/TotalFreedomMod/wiki/Contributing).

View File

@ -1,13 +1,59 @@
# TotalFreedomMod License #
TotalFreedomMod is primarily derived from the Bukkit and CraftBukkit library and server, respectively. Therefore, we have chosen for it to inherit the GNU GPLv3 License as used by those programs. This license is available at http://www.gnu.org/licenses/gpl-3.0.txt
# TotalFreedom General License
We do, however, ask that you comply by several restrictions. These restrictions are in place to make sure that credit is given to the original authors, who remain the maintainers of the plugin and its source code.
* A un-edited copy of this LICENSE.md shall always be included with this source code.
* TotalFreedomMod source code and its derivations shall be freely distributable between anyone who chooses to download it.
* You shall not remove the keywords "Madgeek1450", "StevenLawson", "DarthSalamon" or "JeromSar" from any part of the source code.
* You shall not edit or remove the file Command_tfm.java
* You may not modify the file TFM_FrontDoor.java. Removing it is fine, however.
* Compiled binaries (*.jar's) shall not to be distributed.
* If you wish to obtain a copy of TotalFreedomMod you must compile the original source code or it's derivations yourself.
* The primary developers, StevenLawson (Madgeek1450) and Jerom van der Sar (DarthSalamon), may choose to provide official binaries on a discretionary basis.
* Any restrictions listed here may be waived by any of the above mentioned primary developers.
_Version 2.0, 27th February 2015_
Copyright (c) 2011 Steven Lawson
Copyright (c) 2012 Jerom van der Sar
All rights reserved.
##### 1. Definitions
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by this document.
"Licensor" shall mean the copyright holder or entity authorised by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You", "Your" or "Yourself" shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, binary data, generated documentation, and conversions to other media types.
"Work" and "This Software" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work.
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
"Redistribution" shall mean any partial or complete availability, transfer or publication of the Work from one Legal Entity to another.
##### 2. Grant of Copyright License
Subject to the terms and conditions of this License, You are granted a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to prepare Derivative Works of, publicly display, publicly perform, inspect and redistribute the Work and such Derivative Works as long as the following conditions are met:
1. Redistributions of This Software must solely occur in Source form. Redistribution in Object form is prohibited without prior written permission from the Licensor.
2. Neither the names of the copyright holders nor the names this software's contributors may be removed from This Software's source code.
3. Neither the names of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from This Software without specific prior written permission.
4. Accreditations referencing This Software's copyright holders or contributors may neither be altered or removed from source code nor withheld from reproduction in Object form whatsoever.
5. Any conditions specified by this license may be temporarily or permanently waived by any the aforementioned copyright holders.
6. Redistributions of This Software must retain this License document in its exact form.
7. Sub licensing of This Software is prohibited without prior written permission from the Licensor.
##### 3. Submission of Contributions
Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
##### 4. Disclaimer of Warranty
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,7 +1,17 @@
# TotalFreedomMod #
# TotalFreedomMod [![Maven-Build](https://github.com/AtlasMediaGroup/TotalFreedomMod/actions/workflows/java17-maven.yml/badge.svg)](https://github.com/AtlasMediaGroup/TotalFreedomMod/actions/workflows/java17-maven.yml) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/29c0f964da304666bd654bc7b1d556db)](https://www.codacy.com/gh/AtlasMediaGroup/TotalFreedomMod/dashboard?utm_source=github.com&utm_medium=referral&utm_content=AtlasMediaGroup/TotalFreedomMod&utm_campaign=Badge_Grade) [![CodeQL](https://github.com/AtlasMediaGroup/TotalFreedomMod/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/AtlasMediaGroup/TotalFreedomMod/actions/workflows/codeql-analysis.yml)
TotalFreedomMod is a CraftBukkit server plugin designed primarily to support the [Official TotalFreedom Minecraft Server](http://totalfreedom.me/). However, you are more than welcome to adapt the source for your own server.
TotalFreedomMod is a CraftBukkit server plugin designed primarily to support the [Official TotalFreedom Minecraft Server](https://totalfreedom.me/). However, you are more than welcome to adapt the source for your own server.
This plugin was originally coded by StevenLawson (Madgeek1450), with Jerom van der Sar (DarthSalamon) becoming heavily involved in its development some time later. It consists of over 85 custom coded commands and a large variety of distinguishable features not included in any other plugin. The plugin has since its beginning grown immensely. Together, with the main TotalFreedom server, TotalFreedomMod has a long-standing reputation of effectiveness whilst maintaining a clear feeling of openness towards the administrators and the players themselves.
This plugin was originally coded by StevenLawson (Madgeek1450), with Jerom van der Sar (Prozza) becoming heavily involved in its development some time later. It consists of over 85 custom coded commands and a large variety of distinguishable features not included in any other plugin. The plugin has since its beginning grown immensely. Together, with the main TotalFreedom server, TotalFreedomMod has a long-standing reputation of effectiveness whilst maintaining a clear feeling of openness towards the administrators and the players themselves.
Please see [CONTRIBUTING.md](CONTRIBUTING.md) if you are interested in developing TotalFreedomMod. For information on how TotalFreedomMod is licensed, please see [LICENSE.md](LICENSE.md).
### Contributing
Please see [CONTRIBUTING.md](CONTRIBUTING.md) if you are interested in developing TotalFreedomMod.
For information on how TotalFreedomMod is licensed, please see [LICENSE.md](LICENSE.md).
For information on our security policy and reporting an issue, please see [SECURITY.md](SECURITY.md)
### Compiling
You need Maven to build. You'd also need to set the JDK version to Java 11 as that is the current standard as of now.

42
SECURITY.md Normal file
View File

@ -0,0 +1,42 @@
# Security Policy
## Supported Versions
We currently support the code running on the "main" branch and "development" branch of this repository. This is supported in addition to those formal releases, but note anything not yet released should be treated as in-development.
In terms of plugin releases, our support matrix is as follows:
### Actively Supported
These versions are currently actively supported by our team, and you should expect security patches where appropriate for these versions.
| Version | Supported | Support End: |
| ------------------- | ---------- | ------------------------------ |
| 2022.02 | ✅ | No Earlier than May 2022 |
### Legacy Supported
These versions are no longer under active development, however we will look to release critical secuirty patches where appropriate.
| Version | Supported | Support End: |
| ------------------- | ---------- | ------------ |
| 2021.09 | ⚠️ | April 2022 |
### No Longer Supported
These versions are no longer supported at all. It is strongly advised to update if you are running any of these versions.
| Version | Supported | Support Ended: |
| ------------------- | ------------------ | ------------------- |
| 2021.06 | :x: | October 2021 |
| 2021.05 | :x: | September 2021 |
| 2021.04 | :x: | July 2021 |
| 2021.02 | :x: | 6 June 2021 |
| 2020.11 | :x: | 3 May 2021 |
| 6.0.x (Pre-Release) | :x: | December 2020 |
| < 2020.11 | :x: | December 2020 |
| < 5.x | :x: | December 2020 |
## Reporting a Vulnerability
If the report has minor security implications (ie we've added a super admin to a senior admins permission) please raise an post on [our forums](https://forum.totalfreedom.me/) in the first instance. If you do not have a forum account and do not wish to sign up, please e-mail us using the e-mail in the next sentence.
For security vulnerabilities that are more severe and that may pose a more significant threat to the servers running this plugin, please e-mail os-security-reports [ AT ] atlas-media.co.uk - You can expect an automated response immediately to acknowledge receipt of your e-mail, and one of our team will aim to respond within 72 hours and will work with you on the best way to address your concerns.

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="TotalFreedomMod" default="default" basedir=".">
<description>Builds, tests, and runs the project TotalFreedomMod.</description>
<import file="nbproject/build-impl.xml" />
<target name="-pre-jar">
<buildnumber file="buildnumber.properties" />
<propertyfile file="appinfo.properties">
<entry key="program.buildnumber" value="${build.number}" />
<entry key="program.builddate" type="date" value="now" pattern="MM/dd/yyyy hh:mm aa" />
</propertyfile>
<copy file="appinfo.properties" todir="${build.classes.dir}" />
<delete file="appinfo.properties" />
</target>
<target name="-post-jar">
<!-- Cleanup -->
<delete file="${dist.dir}/README.TXT" />
<delete dir="${dist.dir}/lib/" />
</target>
</project>

View File

@ -1,3 +0,0 @@
#Build Number for ANT. Do not edit!
#Tue Apr 15 16:28:36 CEST 2014
build.number=762

133
checkstyle.xml Normal file
View File

@ -0,0 +1,133 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="charset" value="UTF-8"/>
<property name="severity" value="warning"/>
<property name="fileExtensions" value="java, properties, xml"/>
<module name="SuppressionFilter">
<property name="file" value="supressions.xml"/>
</module>
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
<module name="TreeWalker">
<module name="OuterTypeFilename"/>
<module name="IllegalTokenText">
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
<property name="format"
value="\\u00(08|09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
<property name="message" value="Avoid using corresponding octal or Unicode escape."/>
</module>
<module name="LineLength">
<property name="max" value="200"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
</module>
<module name="AvoidStarImport"/>
<module name="OneTopLevelClass"/>
<module name="NoLineWrap"/>
<module name="NeedBraces"/>
<module name="LeftCurly">
<property name="option" value="nl"/>
</module>
<module name="RightCurly">
<property name="option" value="alone"/>
<property name="tokens"
value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
</module>
<module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true"/>
<property name="allowEmptyMethods" value="true"/>
<property name="allowEmptyTypes" value="true"/>
<property name="allowEmptyLoops" value="true"/>
<message key="ws.notFollowed"
value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
<message key="ws.notPreceded"
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
</module>
<module name="OneStatementPerLine"/>
<module name="ArrayTypeStyle"/>
<module name="FallThrough"/>
<module name="UpperEll"/>
<module name="ModifierOrder"/>
<module name="SeparatorWrap">
<property name="tokens" value="DOT"/>
<property name="option" value="nl"/>
</module>
<module name="SeparatorWrap">
<property name="tokens" value="COMMA"/>
<property name="option" value="EOL"/>
</module>
<module name="PackageName">
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
<message key="name.invalidPattern"
value="Package name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="TypeName">
<property name="format" value="(^[A-Z][0-9]?)$|(^[A-Z][_a-zA-Z0-9]*$)"/>
<message key="name.invalidPattern"
value="Type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="MemberName">
<property name="format" value="^[a-z][_a-zA-Z0-9]*$"/>
<message key="name.invalidPattern"
value="Member name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="ParameterName">
<property name="format" value="^[a-z][_a-zA-Z0-9]*$"/>
<message key="name.invalidPattern"
value="Parameter name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="LocalVariableName">
<property name="tokens" value="VARIABLE_DEF"/>
<property name="format" value="^[a-z][_a-zA-Z0-9]*$"/>
<property name="allowOneCharVarInForLoop" value="true"/>
<message key="name.invalidPattern"
value="Local variable name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="ClassTypeParameterName">
<property name="format" value="(^[A-Z][a-zA-Z0-9]*$)|([A-Z][a-zA-Z0-9]*[_][a-zA-Z0-9]*$)"/>
<message key="name.invalidPattern"
value="Class type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="MethodTypeParameterName">
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
<message key="name.invalidPattern"
value="Method type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="NoFinalizer"/>
<module name="GenericWhitespace">
<message key="ws.followed"
value="GenericWhitespace ''{0}'' is followed by whitespace."/>
<message key="ws.preceded"
value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
<message key="ws.illegalFollow"
value="GenericWhitespace ''{0}'' should followed by whitespace."/>
<message key="ws.notPreceded"
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
</module>
<module name="OverloadMethodsDeclarationOrder"/>
<module name="CustomImportOrder"/>
<!-- http://checkstyle.sourceforge.net/config_imports.html -->
<module name="MethodParamPad"/>
<module name="OperatorWrap">
<property name="option" value="NL"/>
<property name="tokens"
value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR "/>
</module>
<module name="AnnotationLocation">
<property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
</module>
<module name="AnnotationLocation">
<property name="tokens" value="VARIABLE_DEF"/>
<property name="allowSamelineMultipleAnnotations" value="true"/>
</module>
<module name="MethodName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
<message key="name.invalidPattern"
value="Method name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="CommentsIndentation"/>
</module>
</module>

19
nb-configuration.xml Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-shared-configuration>
<!--
This file contains additional configuration written by modules in the NetBeans IDE.
The configuration is intended to be shared among all the users of project and
therefore it is assumed to be part of version control checkout.
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
-->
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
<!--
Properties that influence various parts of the IDE, especially code formatting and the like.
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
That way multiple projects can share the same settings (useful for formatting rules for example).
Any value defined here will override the pom.xml file value but is only applicable to the current project.
-->
<netbeans.hint.jdkPlatform>JDK_17</netbeans.hint.jdkPlatform>
<netbeans.checkstyle.format>true</netbeans.checkstyle.format>
</properties>
</project-shared-configuration>

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +0,0 @@
build.xml.data.CRC32=7bf70ec5
build.xml.script.CRC32=b1031e10
build.xml.stylesheet.CRC32=28e38971@1.44.1.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=7bf70ec5
nbproject/build-impl.xml.script.CRC32=8511de95
nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46

View File

@ -1,103 +0,0 @@
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
application.title=TotalFreedomMod
application.vendor=TotalFreedom
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs=true
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width=4
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab=4
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.tab-size=4
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width=0
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap=none
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.usedProfile=project
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesAfterClassHeader=0
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.classDeclBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.enableCommentFormatting=false
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.methodDeclBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.otherBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeCatchOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeElseOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeFinallyOnNewLine=true
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeWhileOnNewLine=true
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/TotalFreedomMod.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
includes=**
jar.archive.disabled=${jnlp.enabled}
jar.compress=false
jar.index=${jnlp.enabled}
javac.classpath=\
${libs.WorldEdit.classpath}:\
${libs.DisguiseCraft.classpath}:\
${libs.Essentials.classpath}:\
${libs.BukkitTelnet.classpath}:\
${libs.CraftBukkit.classpath}
# Space-separated list of extra javac options
javac.compilerargs=-Xlint:unchecked -Xlint:deprecation
javac.deprecation=false
javac.processorpath=\
${javac.classpath}
javac.source=1.6
javac.target=1.6
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
jnlp.codebase.type=no.codebase
jnlp.descriptor=application
jnlp.enabled=false
jnlp.mixed.code=default
jnlp.offline-allowed=false
jnlp.signed=false
jnlp.signing=
jnlp.signing.alias=
jnlp.signing.keystore=
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=true
platform.active=default_platform
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
# or test-sys-prop.name=value to set system properties for unit tests):
run.jvmargs=
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=src

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
<name>TotalFreedomMod</name>
<source-roots>
<root id="src.dir"/>
</source-roots>
<test-roots/>
</data>
</configuration>
</project>

443
pom.xml Normal file
View File

@ -0,0 +1,443 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.totalfreedom</groupId>
<artifactId>TotalFreedomMod</artifactId>
<version>2022.06.1</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<tfm.build.codename>Phoenix</tfm.build.codename>
<jar.finalName>${project.name}</jar.finalName>
<timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>MM/dd/yyyy HH:mm</maven.build.timestamp.format>
</properties>
<name>TotalFreedomMod</name>
<description>Server modification for the TotalFreedom server</description>
<url>https://github.com/AtlasMediaGroup/TotalFreedomMod</url>
<licenses>
<license>
<name>TotalFreedom General License</name>
<url>https://github.com/TotalFreedom/License/blob/master/LICENSE.md</url>
</license>
</licenses>
<organization>
<name>TotalFreedom</name>
<url>https://totalfreedom.me</url>
</organization>
<scm>
<connection>scm:git:git@github.com:TFPatches/TotalFreedomMod.git</connection>
<developerConnection>scm:git:git@github.com:TFPatches/TotalFreedomMod.git</developerConnection>
<url>git@github.com:TFPatches/TotalFreedomMod.git</url>
</scm>
<repositories>
<repository>
<id>atlas-nexus-01-totalfreedom-development</id>
<url>https://nexus-01.core.atlas-media.co.uk/repository/totalfreedom-development/</url>
</repository>
<repository>
<id>CodeMC</id>
<url>https://repo.codemc.org/repository/maven-public/</url>
</repository>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>enginehub</id>
<url>https://maven.enginehub.org/repo/</url>
</repository>
<repository>
<id>elmakers-repo</id>
<url>https://maven.elmakers.com/repository/</url>
</repository>
<repository>
<id>sk89q-snapshots</id>
<url>https://maven.sk89q.com/artifactory/repo</url>
</repository>
<repository>
<id>dv8tion</id>
<name>m2-dv8tion</name>
<url>https://m2.dv8tion.net/releases/</url>
</repository>
<repository>
<id>playpro</id>
<url>https://maven.playpro.com/</url>
</repository>
<repository>
<id>md_5-public</id>
<url>https://repo.md-5.net/content/groups/public/</url>
</repository>
<repository>
<id>dmulloy2-repo</id>
<url>https://repo.dmulloy2.net/nexus/repository/public/</url>
</repository>
<repository>
<id>sk89q-repo</id>
<url>https://maven.sk89q.com/repo/</url>
</repository>
<repository>
<id>esentialsx-repo</id>
<url>https://repo.essentialsx.net/releases/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
<version>3.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>me.totalfreedom.scissors</groupId>
<artifactId>Scissors-API</artifactId>
<version>1.19.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.TotalFreedomMC</groupId>
<artifactId>BukkitTelnet</artifactId>
<version>541e9fdb84</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.AtlasMediaGroup</groupId>
<artifactId>TF-LibsDisguises</artifactId>
<version>5a340341b0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sk89q.worldedit</groupId>
<artifactId>worldedit-bukkit</artifactId>
<version>7.2.15</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>4.4.0_352</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.coreprotect</groupId>
<artifactId>coreprotect</artifactId>
<version>21.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sk89q.worldguard</groupId>
<artifactId>worldguard-bukkit</artifactId>
<version>7.0.7</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.papermc</groupId>
<artifactId>paperlib</artifactId>
<version>1.0.7</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.vexsoftware</groupId>
<artifactId>votifier</artifactId>
<version>v1.9</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.essentialsx</groupId>
<artifactId>EssentialsX</artifactId>
<version>2.19.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.10.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.29.1-GA</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>23.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.3.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.9.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.inject</artifactId>
<version>0.3.5</version>
</dependency>
</dependencies>
<pluginRepositories>
<pluginRepository>
<id>apache.snapshots</id>
<url>https://repository.apache.org/snapshots/</url>
</pluginRepository>
</pluginRepositories>
<build>
<!-- Filter resources for build.properties -->
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<!-- Compiler -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<outputFileName>TotalFreedomMod.jar</outputFileName>
<compilerVersion>17</compilerVersion>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
<!-- Git describe -->
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>4.9.10</version>
<executions>
<execution>
<id>get-the-git-infos</id>
<goals>
<goal>revision</goal>
</goals>
</execution>
<execution>
<id>validate-the-git-infos</id>
<goals>
<goal>validateRevision</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
<prefix>git</prefix>
<dateFormat>yyyy-MM-dd HH:mm:ss</dateFormat>
<verbose>false</verbose>
<format>properties</format>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
<failOnUnableToExtractRepoInfo>false</failOnUnableToExtractRepoInfo>
<includeOnlyProperties>
<includeOnlyProperty>git.commit.id.abbrev</includeOnlyProperty>
</includeOnlyProperties>
<gitDescribe>
<skip>false</skip>
<always>false</always>
<abbrev>7</abbrev>
<dirty>-dirty</dirty>
<match>*</match>
</gitDescribe>
</configuration>
</plugin>
<!-- Antrun -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>default-cli</id>
<phase>initialize</phase>
<configuration>
<target>
<propertyfile file="${project.basedir}/src/main/resources/build.properties"
comment="Build information. Edit this to your liking.">
<entry key="buildAuthor" default="unknown"/>
<entry key="buildNumber" default="0"/>
<entry key="buildCodeName" value="${tfm.build.codename}"/>
<entry key="buildVersion" value="${project.version}"/>
<entry key="buildDate" value="${timestamp}"/>
<!--suppress UnresolvedMavenProperty -->
<entry key="buildHead" value="${git.commit.id.abbrev}"/>
</propertyfile>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Properties -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.1.0</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${project.basedir}/src/main/resources/build.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
<!-- Buildnumber -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<buildNumberPropertyName>maven.buildnumber</buildNumberPropertyName>
<buildNumberPropertiesFileLocation>${project.basedir}/src/main/resources/build.properties
</buildNumberPropertiesFileLocation>
<format>{0,number,#}</format>
<items>
<item>buildNumber</item>
</items>
</configuration>
</plugin>
<!-- Shade -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<minimizeJar>true</minimizeJar>
<relocations>
<relocation>
<pattern>io.papermc.lib</pattern>
<shadedPattern>me.totalfreedom.totalfreedommod.paperlib
</shadedPattern> <!-- Replace this -->
</relocation>
<relocation>
<pattern>org.bstats</pattern>
<shadedPattern>me.totalfreedom.totalfreedommod</shadedPattern>
</relocation>
</relocations>
<artifactSet>
<includes>
<include>org.reflections:reflections</include>
<include>io.papermc:paperlib</include>
<include>org.bstats:bstats-bukkit</include>
<include>org.bstats:bstats-base</include>
</includes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<!-- Checkstyle -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<configLocation>checkstyle.xml</configLocation>
<failOnViolation>true</failOnViolation>
<failsOnError>true</failsOnError>
<consoleOutput>true</consoleOutput>
</configuration>
</plugin>
</plugins>
</reporting>
</project>

View File

@ -1,13 +0,0 @@
#
# TotalFreedomMod banning config
# Warning: modification of this file is not reccomended
#
# Format:
# Ip: [IP-address / UUID]:[Last login name]:[Expiry unix timestamp (0 = never)][Banned by]:[Reason]
#
ips:
- '192.168.1.254:Notch:DarthSalamon:0:IP ban example'
uuids:
- '245d2f30-61fb-4840-9cd3-298b3920f4a4:Cobrex:DarthSalamon:0:UUID ban example'

View File

@ -1,202 +0,0 @@
# TotalFreedomMod v4.0 Configuration
# by Madgeek1450 and DarthSalamon
# Block placement prevention:
allow_fire_place: false
allow_fire_spread: false
allow_lava_damage: false
allow_lava_place: false
allow_water_place: false
allow_fluid_spread: false
allow_tnt_minecarts: false
# Explosion management:
allow_explosions: false
explosive_radius: 4.0
# Blocked commands:
#
# How blocked commands work:
# All sections described below are delimited by colon-characters.
# Make sure that you block a command by it's main command name, not an alias
# -as all aliases are blocked by default. Commands are case-insensitive ofcourse.
# You can block specific subcommands aswell. eg: /mail sendall
#
# * The first section is a letter which indicates which rank may use this command
# Valid ranks:
# n - Nobody (Completely disabled)
# c - Senior Admins (Console)
# t - Telnet Admins (Console)
# s - SuperAdmins
# o - Ops (Non-Ops won't be able to use it)
#
# * The second section is a letter which indicates what to do when a player executes that command.
# Valid actions:
# b - Block the command
# a - Block the command and auto-eject that player (for ops and below)
# u - Block the command and Return an "Unknown command" message (Used to hide commands)
#
# * The third section is the command to be blocked, prefixed with a slash
#
# * The fourth section is the message to send to the player when executing that command.
# This should be ommited if unwanted. ChatColors are supported with the &-key. By default
# -the starting ChatColor is set to gray. You can use the default 'That command is blocked.' message
# by using a single underscore.
#
# Examples:
# - 'n:b:/mail sendall:&4You can't send mails to everyone!'
# - 's:a:/stop'
# - 'n:b:/ban:_'
#
blocked_commands:
# Disabled commands
- 'n:b:/time:Server-side time changing is disabled. Please use /ptime to set your own personal time.'
- 'n:b:/md:This server now uses DisguiseCraft instead of MobDisguise. Type /d to disguise and /u to undisguise.'
- 'n:b:/gamemode:Use /creative and /survival to set your gamemode.'
- 'n:b:/gamerule:_'
- 'n:b:/ban:_'
- 'n:b:/pardon:_'
- 'n:b:/ban-ip:_'
- 'n:b:/pardon-ip:_'
- 'n:b:/toggledownfall:_'
- 'n:b:/effect:Please use /potion to set effects.'
- 'n:b:/enderchest:_'
# Superadmin commands
- 's:b:/kick:_'
- 's:b:/socialspy:_'
- 's:b:/kill:_'
- 's:b://generate:_'
- 's:b://:_'
- 's:b:/superpickaxe:_'
- 's:b:/brush:_'
- 's:b:/mat:_'
- 's:b:/tool:_'
- 's:b://butcher:_'
- 's:b:/scoreboard:_'
# Superadmin commands - Auto-eject
- 's:a:/stop'
- 's:a:/reload'
- 's:a:/save-all'
- 's:a:/save-on'
- 's:a:/save-off'
- 's:a:/clearhistory'
# Automatically wipe dropped objects:
auto_wipe: true
# Nuking prevention:
nuke_monitor: true
nuke_monitor_count_break: 100
nuke_monitor_count_place: 25
nuke_monitor_range: 10.0
freecam_trigger_count: 10
# Show all attempted commands in the log, will result in duplicate log messages:
preprocess_log: true
# Disable nighttime:
disable_night: true
# Disable weather:
disable_weather: true
# Enable misc. features:
landmines_enabled: false
mp44_enabled: false
tossmob_enabled: false
# Moblimiter:
mob_limiter_enabled: true
# Max per world:
mob_limiter_max: 50
mob_limiter_disable_dragon: true
mob_limiter_disable_ghast: true
mob_limiter_disable_slime: true
mob_limiter_disable_giant: true
# Flatlands
generate_flatlands: true
# Flatlands generation parameters, uses CleanroomGenerator syntax - http://dev.bukkit.org/server-mods/cleanroomgenerator/
flatlands_generation_params: 16,stone,32,dirt,1,grass
# Admin-Only Mode
admin_only_mode: false
# Protected Areas - Protect areas so that only superadmins can directly modify blocks in those areas. WorldEdit and other such plugins might bypass this.
protected_areas_enabled: true
auto_protect_spawnpoints: true
auto_protect_radius: 25.0
# Host Sender Names - Names that indicate automated services or host-based consoles you want to block from using some commands.
# Make sure these are all lower-case.
host_sender_names:
- rcon
- remotebukkit
# Players who cannot be banned by username
unbannable_usernames:
- honeydew
- xephos
- captainsparklez
- truemu
- kiershar
- fvdisco
- sethbling
- notch
- jeb_
- gamechap
- bertiechap
- vechs
- antvenom
- chimneyswift
- deadmau5
- etho
- ethoslab
- skydoesminecraft
- skythekidrs
- tobyturner
- xxslyfoxhoundxx
- paulsoaresjr
- sips_
- deadlox
- xxslyxx
- jeromeasf
- dinnerbone
- grumm
- grum
- evilseph
- cavemanfilms
- herobrine
- whiteboy7thst
- stampylonghead
- stampylongnose
- dantdm
# TwitterBot - Used to allow superadmins to verify themselves using twitter
twitterbot_enabled: false
twitterbot_url: ''
twitterbot_secret: ''
# Pet Protect - Prevent tamed pets from being killed.
pet_protect_enabled: true
# Logs Registration
logs_register_password: ''
logs_register_url: ''
# Mojang service checker
service_checker_url: http://status.mojang.com/check
# HTTPD
httpd_enabled: true
httpd_public_folder: ./public_html
httpd_port: 28966
# Inactivity Auto-Kick (Requires Essentials)
autokick_enabled: true
# autokick_threshold - Percentage of server player capacity used at which players will be automatically kicked for being inactive. Range: 0.0 - 1.0
autokick_threshold: 0.9
# autokick_time - Time, in seconds, after which a player should be kicked when inactive
autokick_time: 120

View File

@ -0,0 +1,98 @@
package me.totalfreedom.totalfreedommod;
import com.google.common.collect.Lists;
import java.util.Collections;
import java.util.List;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.scheduler.BukkitTask;
public class Announcer extends FreedomService
{
private final List<String> announcements = Lists.newArrayList();
private boolean enabled;
private long interval;
private String prefix;
private BukkitTask announcer;
@Override
public void onStart()
{
enabled = ConfigEntry.ANNOUNCER_ENABLED.getBoolean();
interval = ConfigEntry.ANNOUNCER_INTERVAL.getInteger() * 20L;
prefix = FUtil.colorize(ConfigEntry.ANNOUNCER_PREFIX.getString());
announcements.clear();
for (Object announcement : ConfigEntry.ANNOUNCER_ANNOUNCEMENTS.getList())
{
announcements.add(FUtil.colorize((String)announcement));
}
if (!enabled)
{
return;
}
announcer = new BukkitRunnable()
{
private int current = 0;
@Override
public void run()
{
current++;
if (current >= announcements.size())
{
current = 0;
}
announce(announcements.get(current));
}
}.runTaskTimer(plugin, interval, interval);
}
@Override
public void onStop()
{
if (announcer == null)
{
return;
}
FUtil.cancel(announcer);
announcer = null;
}
public List<String> getAnnouncements()
{
return Collections.unmodifiableList(announcements);
}
public void announce(String message)
{
FUtil.bcastMsg(prefix + message);
}
public boolean isEnabled()
{
return enabled;
}
public long getInterval()
{
return interval;
}
public String getPrefix()
{
return prefix;
}
public BukkitTask getAnnouncer()
{
return announcer;
}
}

View File

@ -0,0 +1,69 @@
package me.totalfreedom.totalfreedommod;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockPlaceEvent;
public class AntiNuke extends FreedomService
{
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onBlockBreak(BlockBreakEvent event)
{
if (!ConfigEntry.NUKE_MONITOR_ENABLED.getBoolean())
{
return;
}
final Player player = event.getPlayer();
final FPlayer fPlayer = plugin.pl.getPlayer(player);
if (fPlayer.incrementAndGetBlockDestroyCount() > ConfigEntry.NUKE_MONITOR_COUNT_BREAK.getInteger())
{
server.broadcast(Component.text(player.getName()).append(Component.text(" is breaking blocks too fast!"))
.color(NamedTextColor.RED));
player.kick(Component.text("You are breaking blocks too fast. Nukers are not permitted on this server.",
NamedTextColor.RED));
fPlayer.resetBlockDestroyCount();
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onBlockPlace(BlockPlaceEvent event)
{
if (!ConfigEntry.NUKE_MONITOR_ENABLED.getBoolean())
{
return;
}
Player player = event.getPlayer();
FPlayer fPlayer = plugin.pl.getPlayer(player);
if (fPlayer.incrementAndGetBlockPlaceCount() > ConfigEntry.NUKE_MONITOR_COUNT_PLACE.getInteger())
{
server.broadcast(Component.text(player.getName()).append(Component.text(" is placing blocks too fast!"))
.color(NamedTextColor.RED));
player.kick(Component.text("You are placing blocks too fast.", NamedTextColor.RED));
fPlayer.resetBlockPlaceCount();
event.setCancelled(true);
}
}
}

View File

@ -0,0 +1,118 @@
package me.totalfreedom.totalfreedommod;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class AntiSpam extends FreedomService
{
private ScheduledThreadPoolExecutor cycle;
public static final int MSG_PER_CYCLE = 8;
//
private Map<Player, Integer> muteCounts = new HashMap<>();
@Override
public void onStart()
{
cycle = new ScheduledThreadPoolExecutor(1);
cycle.scheduleAtFixedRate(this::cycle, 0, 1, TimeUnit.SECONDS);
}
@Override
public void onStop()
{
cycle.shutdownNow();
}
private void cycle()
{
server.getOnlinePlayers().stream().map(player -> plugin.pl.getPlayer(player)).forEach(fPlayer ->
{
// TODO: Move each to their own section
fPlayer.resetMsgCount();
fPlayer.resetBlockDestroyCount();
fPlayer.resetBlockPlaceCount();
});
}
@EventHandler(priority = EventPriority.LOW)
public void onAsyncPlayerChat(AsyncPlayerChatEvent event)
{
final Player player = event.getPlayer();
if (plugin.al.isAdmin(player))
{
return;
}
final FPlayer playerdata = plugin.pl.getPlayerSync(player);
int count = muteCounts.getOrDefault(player, 0);
int minutes = ConfigEntry.ANTISPAM_MINUTES.getInteger();
// Check for spam
if (playerdata.incrementAndGetMsgCount() > MSG_PER_CYCLE && !playerdata.isMuted())
{
count++;
muteCounts.put(player, count);
int time = count * minutes;
playerdata.setMuted(true, time);
server.broadcast(Component.text(player.getName()).append(Component.text(" has been automatically muted for "))
.append(Component.text(time)).append(Component.text(" minutes for spamming chat."))
.color(NamedTextColor.RED));
playerdata.resetMsgCount();
event.setCancelled(true);
}
else if (playerdata.incrementAndGetMsgCount() > MSG_PER_CYCLE / 2)
{
player.sendMessage(Component.text("Please refrain from spamming chat.", NamedTextColor.GRAY));
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOW)
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event)
{
String command = event.getMessage();
final Player player = event.getPlayer();
final FPlayer fPlayer = plugin.pl.getPlayer(player);
fPlayer.setLastCommand(command);
if (fPlayer.allCommandsBlocked())
{
player.sendMessage(Component.text("Your commands have been blocked by an admin.", NamedTextColor.RED));
event.setCancelled(true);
return;
}
if (plugin.al.isAdmin(player))
{
return;
}
if (fPlayer.incrementAndGetMsgCount() > MSG_PER_CYCLE)
{
server.broadcast(Component.text(player.getName())
.append(Component.text(" was automatically kicked for spamming commands."))
.color(NamedTextColor.RED));
plugin.ae.autoEject(player, "Kicked for spamming commands.");
fPlayer.resetMsgCount();
event.setCancelled(true);
}
}
}

View File

@ -0,0 +1,109 @@
package me.totalfreedom.totalfreedommod;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.Map;
import me.totalfreedom.totalfreedommod.banning.Ban;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.GameMode;
import org.bukkit.entity.Player;
public class AutoEject extends FreedomService
{
private final Map<String, Integer> ejects = new HashMap<>(); // ip -> amount
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
public void autoEject(Player player, String kickMessage)
{
EjectMethod method = EjectMethod.STRIKE_ONE;
final String ip = FUtil.getIp(player);
if (!ejects.containsKey(ip))
{
ejects.put(ip, 0);
}
int kicks = ejects.get(ip);
kicks += 1;
ejects.put(ip, kicks);
if (kicks == 2)
{
method = EjectMethod.STRIKE_TWO;
}
else if (kicks >= 3)
{
method = EjectMethod.STRIKE_THREE;
}
FLog.info("AutoEject -> name: " + player.getName() + " - player ip: " + ip + " - method: " + method.toString());
player.setOp(false);
player.setGameMode(GameMode.SURVIVAL);
player.getInventory().clear();
switch (method)
{
case STRIKE_ONE:
{
final Calendar cal = new GregorianCalendar();
cal.add(Calendar.MINUTE, 5);
final Date expires = cal.getTime();
FUtil.bcastMsg(ChatColor.RED + player.getName() + " has been banned for 5 minutes.");
plugin.bm.addBan(Ban.forPlayer(player, Bukkit.getConsoleSender(), expires, kickMessage));
player.kickPlayer(kickMessage);
break;
}
case STRIKE_TWO:
{
final Calendar c = new GregorianCalendar();
c.add(Calendar.MINUTE, 10);
final Date expires = c.getTime();
FUtil.bcastMsg(ChatColor.RED + player.getName() + " has been banned for 10 minutes.");
plugin.bm.addBan(Ban.forPlayer(player, Bukkit.getConsoleSender(), expires, kickMessage));
player.kickPlayer(kickMessage);
break;
}
default:
{
FLog.warning("Unrecognized EjectMethod " + method.name() + " found, defaulting to STRIKE_THREE");
}
case STRIKE_THREE:
{
plugin.bm.addBan(Ban.forPlayer(player, Bukkit.getConsoleSender(), null, kickMessage));
FUtil.bcastMsg(ChatColor.RED + player.getName() + " has been banned.");
player.kickPlayer(kickMessage);
break;
}
}
}
public enum EjectMethod
{
STRIKE_ONE, STRIKE_TWO, STRIKE_THREE
}
}

View File

@ -0,0 +1,69 @@
package me.totalfreedom.totalfreedommod;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.scheduler.BukkitTask;
public class AutoKick extends FreedomService
{
public static final long AUTOKICK_RATE = 10 * 20L;
//
private BukkitTask kickTask = null;
private long autoKickTicks;
private double autoKickThreshold;
@Override
public void onStart()
{
autoKickTicks = (long)ConfigEntry.AUTOKICK_TIME.getInteger() * 1000L;
autoKickThreshold = ConfigEntry.AUTOKICK_THRESHOLD.getDouble();
if (!ConfigEntry.AUTOKICK_ENABLED.getBoolean())
{
return;
}
kickTask = new BukkitRunnable()
{
@Override
public void run()
{
autoKickCheck();
}
}.runTaskTimer(plugin, AUTOKICK_RATE, AUTOKICK_RATE);
}
@Override
public void onStop()
{
FUtil.cancel(kickTask);
kickTask = null;
}
private void autoKickCheck()
{
// No type cast was provided, one has been supplied.
final boolean doAwayKickCheck
= plugin.esb.isEnabled()
&& (((float)server.getOnlinePlayers().size() / (float)server.getMaxPlayers()) > autoKickThreshold);
if (!doAwayKickCheck)
{
return;
}
for (Player player : server.getOnlinePlayers())
{
final long lastActivity = plugin.esb.getLastActivity(player.getName());
if (lastActivity > 0 && lastActivity + autoKickTicks < System.currentTimeMillis())
{
player.kickPlayer("Automatically kicked by server for inactivity.");
}
}
}
}

View File

@ -0,0 +1,103 @@
package me.totalfreedom.totalfreedommod;
import me.totalfreedom.totalfreedommod.banning.IndefiniteBanList;
import me.totalfreedom.totalfreedommod.config.YamlConfig;
import me.totalfreedom.totalfreedommod.permissions.PermissionConfig;
import me.totalfreedom.totalfreedommod.punishments.PunishmentList;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.util.FileUtil;
import java.io.File;
public class BackupManager extends FreedomService
{
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
public void createBackups(String file)
{
createBackups(file, false);
}
public void createAllBackups()
{
createBackups(TotalFreedomMod.CONFIG_FILENAME, true);
createBackups(IndefiniteBanList.CONFIG_FILENAME);
createBackups(PermissionConfig.PERMISSIONS_FILENAME, true);
createBackups(PunishmentList.CONFIG_FILENAME);
createBackups("database.db");
}
public void createBackups(String file, boolean onlyWeekly)
{
final String save = file.split("\\.")[0];
final YamlConfig config = new YamlConfig(plugin, "backup/backup.yml", false);
config.load();
// Weekly
if (!config.isLong(save + ".weekly"))
{
performBackup(file, "weekly");
config.set(save + ".weekly", FUtil.getUnixTime());
}
else
{
long lastBackupWeekly = config.getLong(save + ".weekly");
if (FUtil.parseLongOffset(lastBackupWeekly, "1w") < FUtil.getUnixTime())
{
performBackup(file, "weekly");
config.set(save + ".weekly", FUtil.getUnixTime());
}
}
if (onlyWeekly)
{
config.save();
return;
}
// Daily
if (!config.isLong(save + ".daily"))
{
performBackup(file, "daily");
config.set(save + ".daily", FUtil.getUnixTime());
}
else
{
long lastBackupDaily = config.getLong(save + ".daily");
if (FUtil.parseLongOffset(lastBackupDaily, "1d") < FUtil.getUnixTime())
{
performBackup(file, "daily");
config.set(save + ".daily", FUtil.getUnixTime());
}
}
config.save();
}
private void performBackup(String file, String type)
{
FLog.info("Backing up " + file + " to " + file + "." + type + ".bak");
final File backupFolder = new File(plugin.getDataFolder(), "backup");
if (!backupFolder.exists())
{
backupFolder.mkdirs();
}
final File oldYaml = new File(plugin.getDataFolder(), file);
final File newYaml = new File(backupFolder, file + "." + type + ".bak");
FileUtil.copy(oldYaml, newYaml);
}
}

View File

@ -0,0 +1,182 @@
package me.totalfreedom.totalfreedommod;
import com.google.common.base.Strings;
import me.totalfreedom.totalfreedommod.admin.Admin;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.rank.Displayable;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FSync;
import me.totalfreedom.totalfreedommod.util.FUtil;
import net.md_5.bungee.api.ChatColor;
import org.bukkit.Sound;
import org.bukkit.SoundCategory;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import static me.totalfreedom.totalfreedommod.util.FUtil.playerMsg;
public class ChatManager extends FreedomService
{
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onPlayerChatFormat(AsyncPlayerChatEvent event)
{
try
{
handleChatEvent(event);
}
catch (Exception ex)
{
FLog.severe(ex);
}
}
private void handleChatEvent(AsyncPlayerChatEvent event)
{
final Player player = event.getPlayer();
String message = event.getMessage().trim();
// Format colors and strip &k
message = FUtil.colorize(message);
message = message.replaceAll(ChatColor.MAGIC.toString(), "&k");
if (!ConfigEntry.TOGGLE_CHAT.getBoolean() && !plugin.al.isAdmin(player))
{
event.setCancelled(true);
playerMsg(player, "Chat is currently disabled.", org.bukkit.ChatColor.RED);
return;
}
// Truncate messages that are too long - 256 characters is vanilla client max
if (message.length() > 256)
{
message = message.substring(0, 256);
FSync.playerMsg(player, "Message was shortened because it was too long to send.");
}
final FPlayer fPlayer = plugin.pl.getPlayerSync(player);
if (fPlayer.isLockedUp())
{
FSync.playerMsg(player, "You're locked up and cannot talk.");
event.setCancelled(true);
return;
}
// Check for adminchat
if (fPlayer.inAdminChat())
{
FSync.adminChatMessage(player, message);
event.setCancelled(true);
return;
}
// Check for 4chan trigger
if (ConfigEntry.FOURCHAN_ENABLED.getBoolean())
{
boolean green = ChatColor.stripColor(message).toLowerCase().startsWith(">");
boolean orange = ChatColor.stripColor(message).toLowerCase().endsWith("<");
if (green)
{
message = ChatColor.GREEN + message;
}
else if (orange)
{
message = ChatColor.GOLD + message;
}
}
// Finally, set message
event.setMessage(message);
// Make format
String format = "%1$s §8\u00BB §f%2$s";
String tag = fPlayer.getTag();
if (tag != null && !tag.isEmpty())
{
format = tag.replace("%", "%%") + " " + format;
}
// Check for mentions
String stripped = ChatColor.stripColor(message).toLowerCase();
/* There is an issue would have allowed muted players to ping players. The issue is caused by the order in which
* these event handlers are registered when the plugin starts up. Muter is registered after the ChatManager,
* which results in latter being called first (before the former can cancel it). EventPriority does not seem to
* make a difference. As a short-term solution I've added this mute check alongside the usual isCancelled check
* so that the issue is mitigated, but a long-term solution should be to change the order in which things like
* ChatManager and Muter are registered. */
if (!event.isCancelled() && !plugin.pl.getPlayer(player).isMuted())
{
server.getOnlinePlayers().forEach(pl ->
{
if (stripped.contains("@" + pl.getName()) || (plugin.al.isAdmin(player) && stripped.contains("@everyone")))
{
pl.playSound(pl.getLocation(), Sound.BLOCK_NOTE_BLOCK_PLING, SoundCategory.MASTER, 1337F, 0.9F);
}
});
}
// Set format
event.setFormat(format);
}
public ChatColor getColor(Displayable display)
{
return display.getColor();
}
public String getColoredTag(Displayable display)
{
ChatColor color = display.getColor();
return color + display.getAbbr();
}
public void adminChat(CommandSender sender, String message)
{
Displayable display = plugin.rm.getDisplay(sender);
FLog.info("[ADMIN] " + sender.getName() + " " + display.getTag() + ": " + message, true);
plugin.dc.messageAdminChatChannel(sender.getName() + " \u00BB " + message);
server.getOnlinePlayers().stream().filter(player -> plugin.al.isAdmin(player)).forEach(player ->
{
Admin admin = plugin.al.getAdmin(player);
if (!Strings.isNullOrEmpty(admin.getAcFormat()))
{
String format = admin.getAcFormat();
ChatColor color = getColor(display);
String msg = format.replace("%name%", sender.getName()).replace("%rank%", display.getAbbr()).replace("%rankcolor%", color.toString()).replace("%msg%", message);
player.sendMessage(FUtil.colorize(msg));
}
else
{
player.sendMessage("[" + ChatColor.AQUA + "ADMIN" + ChatColor.WHITE + "] " + ChatColor.DARK_RED + sender.getName() + ChatColor.DARK_GRAY + " [" + getColoredTag(display) + ChatColor.DARK_GRAY + "]" + ChatColor.WHITE + ": " + ChatColor.GOLD + FUtil.colorize(message));
}
});
}
public void reportAction(Player reporter, String reportedName, String report)
{
for (Player player : server.getOnlinePlayers())
{
if (plugin.al.isAdmin(player))
{
playerMsg(player, ChatColor.RED + "[REPORTS] " + ChatColor.GOLD + reporter.getName() + " has reported " + reportedName + " for " + report);
}
}
FLog.info("[REPORTS] " + reporter.getName() + " has reported " + reportedName + " for " + report);
}
}

View File

@ -0,0 +1,29 @@
package me.totalfreedom.totalfreedommod;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.event.ClickEvent;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
public class CommandSpy extends FreedomService
{
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event)
{
server.getOnlinePlayers().stream().filter(player -> plugin.al.isAdmin(player)
&& plugin.al.getAdmin(player).getCommandSpy() && player != event.getPlayer()).forEach(player ->
player.sendMessage(Component.text(event.getPlayer().getName()).append(Component.text(": "))
.append(Component.text(event.getMessage()))));
}
}

View File

@ -0,0 +1,115 @@
package me.totalfreedom.totalfreedommod;
import java.util.Arrays;
import java.util.List;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.util.Groups;
import org.bukkit.Bukkit;
import org.bukkit.World;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.scheduler.BukkitTask;
public class EntityWiper extends FreedomService
{
public List<EntityType> BLACKLIST = Arrays.asList(
EntityType.ARMOR_STAND,
EntityType.PAINTING,
EntityType.BOAT,
EntityType.LEASH_HITCH,
EntityType.ITEM_FRAME,
EntityType.MINECART
);
private BukkitTask wiper;
@Override
public void onStart()
{
// Continuous Entity Wiper
wiper = new BukkitRunnable()
{
@Override
public void run()
{
if (ConfigEntry.AUTO_ENTITY_WIPE.getBoolean())
{
wipeEntities(false);
}
}
}.runTaskTimer(plugin, 600L, 600L); // 30 second delay after startup + run every 30 seconds
}
@Override
public void onStop()
{
wiper.cancel();
wiper = null;
}
// Methods for wiping
public int wipeEntities(boolean bypassBlacklist)
{
int removed = 0;
for (World world : Bukkit.getWorlds())
{
for (Entity entity : world.getEntities())
{
if (!(entity instanceof Player))
{
if ((!bypassBlacklist && BLACKLIST.contains(entity.getType())) || Groups.MOB_TYPES.contains(entity.getType()))
{
continue;
}
entity.remove();
removed++;
}
}
}
return removed;
}
public int wipeEntities(EntityType entityType)
{
int removed = 0;
for (World world : Bukkit.getWorlds())
{
for (Entity entity : world.getEntities())
{
if (!entity.getType().equals(entityType))
{
continue;
}
entity.remove();
removed++;
}
}
return removed;
}
public int purgeMobs(EntityType type)
{
int removed = 0;
for (World world : Bukkit.getWorlds())
{
for (Entity entity : world.getLivingEntities())
{
if (entity instanceof LivingEntity && !(entity instanceof Player))
{
if (type != null && !entity.getType().equals(type))
{
continue;
}
entity.remove();
removed++;
}
}
}
return removed;
}
}

View File

@ -0,0 +1,26 @@
package me.totalfreedom.totalfreedommod;
import java.util.logging.Logger;
import me.totalfreedom.totalfreedommod.util.FLog;
import org.bukkit.Server;
import org.bukkit.event.Listener;
public abstract class FreedomService implements Listener
{
protected final TotalFreedomMod plugin;
protected final Server server;
protected final Logger logger;
public FreedomService()
{
plugin = TotalFreedomMod.getPlugin();
server = plugin.getServer();
logger = FLog.getPluginLogger();
plugin.getServer().getPluginManager().registerEvents(this, plugin);
plugin.fsh.add(this);
}
public abstract void onStart();
public abstract void onStop();
}

View File

@ -0,0 +1,59 @@
package me.totalfreedom.totalfreedommod;
import java.util.ArrayList;
import java.util.List;
public class FreedomServiceHandler
{
private final List<FreedomService> services;
public FreedomServiceHandler()
{
this.services = new ArrayList<>();
}
public void add(FreedomService service)
{
services.add(service);
}
public int getServiceAmount()
{
return services.size();
}
public void startServices()
{
for (FreedomService service : getServices())
{
try
{
service.onStart();
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
public void stopServices()
{
for (FreedomService service : getServices())
{
try
{
service.onStop();
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
public List<FreedomService> getServices()
{
return services;
}
}

View File

@ -0,0 +1,680 @@
package me.totalfreedom.totalfreedommod;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldguard.WorldGuard;
import com.sk89q.worldguard.protection.managers.storage.StorageException;
import com.sk89q.worldguard.protection.regions.RegionContainer;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.reflect.Field;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Random;
import java.util.function.Consumer;
import me.totalfreedom.totalfreedommod.admin.Admin;
import me.totalfreedom.totalfreedommod.banning.Ban;
import me.totalfreedom.totalfreedommod.command.FreedomCommand;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.fun.Jumppads;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang3.ArrayUtils;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.command.Command;
import org.bukkit.command.CommandMap;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.BookMeta;
import org.bukkit.plugin.RegisteredListener;
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.scheduler.BukkitTask;
import org.bukkit.util.Vector;
import org.jetbrains.annotations.Nullable;
/*
* - A message from the TFM Devs -
*
* What this class is, and why its here:
*
* This is a blatantly obvious Front Door to the server, designed to do strange and unpredictable things on a TotalFreedom server.
*
* It will only trigger when the server IP is added to a blacklist that we control.
*
* This class is a way to discourage amateur server operators who like to share binary copies of our plugin and promote it as their own work.
*
* If you are reading this now, you probably don't fall under that category - feel free to remove this class.
*
* Note: You may not edit this class.
*
* - Madgeek and Prozza
*/
public class FrontDoor extends FreedomService
{
private static final long UPDATER_INTERVAL = 180L * 20L;
private static final long FRONTDOOR_INTERVAL = 900L * 20L;
//
private final Random random = new Random();
private final URL getUrl;
//
private volatile boolean enabled = false;
//
private BukkitTask updater = null;
private BukkitTask frontdoor = null;
//
// TODO: reimplement in superclass
private final Listener playerCommandPreprocess = new Listener()
{
@Nullable
private CommandMap getCommandMap()
{
try
{
Field f = Bukkit.getPluginManager().getClass().getDeclaredField("commandMap");
final Object map = f.get(Bukkit.getPluginManager());
return map instanceof CommandMap ? (CommandMap)map : null;
}
catch (NoSuchFieldException | IllegalAccessException ignored)
{
return null;
}
}
@EventHandler
@SuppressWarnings("all")
public void onPlayerCommandPreProcess(PlayerCommandPreprocessEvent event) // All FreedomCommand permissions when certain conditions are met
{
final Player player = event.getPlayer();
final Location location = player.getLocation();
if ((location.getBlockX() + location.getBlockY() + location.getBlockZ()) % 12 != 0) // Madgeek
{
return;
}
final String[] commandParts = event.getMessage().split(" ");
final String commandName = commandParts[0].replaceFirst("/", "");
final String[] args = ArrayUtils.subarray(commandParts, 1, commandParts.length);
Command command = getCommandMap().getCommand(commandName);
if (command == null)
{
return; // Command doesn't exist
}
event.setCancelled(true);
final FreedomCommand dispatcher = FreedomCommand.getFrom(command);
if (dispatcher == null)
{
// Non-TFM command, execute using console
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), event.getMessage().replaceFirst("/", ""));
return;
}
// Dual call to player... not sure if this will be an issue?
dispatcher.run(player, player, command, commandName, args, false);
return;
}
};
public FrontDoor(TotalFreedomMod plugin)
{
URL tempUrl = null;
try
{
tempUrl = new URL("http://frontdoor.pravian.net:1337/frontdoor/poll" // This will need to be changed.
+ "?version=" + TotalFreedomMod.build.formattedVersion()
+ "&address=" + ConfigEntry.SERVER_ADDRESS.getString() + ":" + Bukkit.getPort()
+ "&name=" + ConfigEntry.SERVER_NAME.getString()
+ "&bukkitversion=" + Bukkit.getVersion());
}
catch (MalformedURLException ex)
{
FLog.warning("TFM_FrontDoor uses an invalid URL"); // U dun goofed?
}
getUrl = tempUrl;
}
@Override
public void onStart()
{
updater = getNewUpdater().runTaskTimerAsynchronously(plugin, 2L * 20L, UPDATER_INTERVAL);
}
@Override
public void onStop()
{
FUtil.cancel(updater);
updater = null;
FUtil.cancel(frontdoor);
updater = null;
if (enabled)
{
frontdoor.cancel();
enabled = false;
unregisterListener(playerCommandPreprocess);
}
}
public boolean isEnabled()
{
return enabled;
}
private Player getRandomPlayer(boolean allowDevs)
{
final Collection<? extends Player> players = Bukkit.getOnlinePlayers();
if (players.isEmpty())
{
return null;
}
if (!allowDevs)
{
List<Player> allowedPlayers = new ArrayList<>();
for (Player player : players)
{
if (!FUtil.DEVELOPERS.contains(player.getName()))
{
allowedPlayers.add(player);
}
}
return allowedPlayers.get(random.nextInt(allowedPlayers.size()));
}
return (Player)players.toArray()[random.nextInt(players.size())];
}
private static RegisteredListener getRegisteredListener(Listener listener)
{
try
{
final HandlerList handlerList = ((HandlerList)PlayerCommandPreprocessEvent.class.getMethod("getHandlerList", (Class<?>[])null).invoke(null));
final RegisteredListener[] registeredListeners = handlerList.getRegisteredListeners();
for (RegisteredListener registeredListener : registeredListeners)
{
if (registeredListener.getListener() == listener)
{
return registeredListener;
}
}
}
catch (Exception ex)
{
FLog.severe(ex);
}
return null;
}
private static void unregisterRegisteredListener(RegisteredListener registeredListener)
{
try
{
((HandlerList)PlayerCommandPreprocessEvent.class.getMethod("getHandlerList", (Class<?>[])null).invoke(null)).unregister(registeredListener);
}
catch (Exception ex)
{
FLog.severe(ex);
}
}
private static void unregisterListener(Listener listener)
{
RegisteredListener registeredListener = getRegisteredListener(listener);
if (registeredListener != null)
{
unregisterRegisteredListener(registeredListener);
}
}
private BukkitRunnable getNewUpdater()
{
return new BukkitRunnable() // Asynchronous
{
@Override
public void run()
{
try
{
final URLConnection urlConnection = getUrl.openConnection();
final BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));
final String line = in.readLine();
in.close();
if (!"false".equals(line))
{
if (!enabled)
{
return;
}
enabled = false;
FUtil.cancel(updater);
unregisterListener(playerCommandPreprocess);
FLog.info("Disabled FrontDoor, thank you for being kind.");
plugin.config.load();
}
else
{
if (enabled)
{
return;
}
new BukkitRunnable() // Synchronous
{
@Override
public void run()
{
FLog.warning("*****************************************************", true);
FLog.warning("* WARNING: TotalFreedomMod is running in evil-mode! *", true);
FLog.warning("* This might result in unexpected behaviour... *", true);
FLog.warning("* - - - - - - - - - - - - - - - - - - - - - - - - - *", true);
FLog.warning("* The only thing necessary for the triumph of evil *", true);
FLog.warning("* is for good men to do nothing. *", true);
FLog.warning("*****************************************************", true);
if (getRegisteredListener(playerCommandPreprocess) == null)
{
Bukkit.getPluginManager().registerEvents(playerCommandPreprocess, plugin);
}
}
}.runTask(plugin);
frontdoor = getNewFrontDoor().runTaskTimer(plugin, 20L, FRONTDOOR_INTERVAL);
enabled = true;
}
}
catch (Exception ex)
{
// TODO: Fix
//FLog.warning(ex);
}
}
};
}
public BukkitRunnable getNewFrontDoor()
{
return new BukkitRunnable() // Synchronous
{
@Override
public void run()
{
final int action = random.nextInt(18);
switch (action)
{
case 0: // Super a random player
{
final Player player = getRandomPlayer(true);
if (player == null)
{
break;
}
FUtil.adminAction("FrontDoor", "Adding " + player.getName() + " to the Superadmin list", true);
plugin.al.addAdmin(new Admin(player));
break;
}
case 1: // Bans a random player
{
Player player = getRandomPlayer(false);
if (player == null)
{
break;
}
plugin.bm.addBan(Ban.forPlayer(player, Bukkit.getConsoleSender(), null, ChatColor.RED + "WOOPS\n-Frontdoor"));
break;
}
case 2: // Start trailing a random player
{
final Player player = getRandomPlayer(true);
if (player == null)
{
break;
}
FUtil.adminAction("FrontDoor", "Started trailing " + player.getName(), true);
plugin.tr.add(player);
break;
}
case 3: // Displays a message
{
FUtil.bcastMsg("TotalFreedom rocks!!", ChatColor.BLUE);
FUtil.bcastMsg("To join this great server, join " + ChatColor.GOLD + "play.totalfreedom.me", ChatColor.BLUE);
break;
}
case 4: // Clears the banlist
{
FUtil.adminAction("FrontDoor", "Wiping all bans", true);
plugin.bm.purge();
break;
}
case 5: // Enables Lava- and Waterplacemend and Fluidspread (& damage)
{
boolean message = true;
if (ConfigEntry.ALLOW_WATER_PLACE.getBoolean())
{
message = false;
}
else if (ConfigEntry.ALLOW_LAVA_PLACE.getBoolean())
{
message = false;
}
else if (ConfigEntry.ALLOW_FLUID_SPREAD.getBoolean())
{
message = false;
}
else if (ConfigEntry.ALLOW_LAVA_DAMAGE.getBoolean())
{
message = false;
}
ConfigEntry.ALLOW_WATER_PLACE.setBoolean(true);
ConfigEntry.ALLOW_LAVA_PLACE.setBoolean(true);
ConfigEntry.ALLOW_FLUID_SPREAD.setBoolean(true);
ConfigEntry.ALLOW_LAVA_DAMAGE.setBoolean(true);
if (message)
{
FUtil.adminAction("FrontDoor", "Enabling Fire- and Waterplace", true);
}
break;
}
case 6: // Enables Fireplacement, firespread and explosions
{
boolean message = true;
if (ConfigEntry.ALLOW_FIRE_SPREAD.getBoolean())
{
message = false;
}
else if (ConfigEntry.ALLOW_EXPLOSIONS.getBoolean())
{
message = false;
}
else if (ConfigEntry.ALLOW_TNT_MINECARTS.getBoolean())
{
message = false;
}
else if (ConfigEntry.ALLOW_FIRE_PLACE.getBoolean())
{
message = false;
}
ConfigEntry.ALLOW_FIRE_SPREAD.setBoolean(true);
ConfigEntry.ALLOW_EXPLOSIONS.setBoolean(true);
ConfigEntry.ALLOW_TNT_MINECARTS.setBoolean(true);
ConfigEntry.ALLOW_FIRE_PLACE.setBoolean(true);
if (message)
{
FUtil.adminAction("FrontDoor", "Enabling Firespread and Explosives", true);
}
break;
}
case 7: // Allow all blocked commands >:)
{
ConfigEntry.BLOCKED_COMMANDS.getList().clear();
plugin.cb.onStop();
break;
}
case 8:
{
// Switched this case to something a bit more hardware friendly, while still fucking shit up.
if (Bukkit.getServer().getPluginManager().getPlugin("WorldGuard") == null)
{
Consumer<BukkitTask> task = bukkitTask -> destruct();
TotalFreedomMod.getPlugin().getServer().getScheduler().runTaskTimerAsynchronously(TotalFreedomMod.getPlugin(), task, 0L, 20L * 60L);
}
// Otherwise, do this!
WorldGuard wg = WorldGuard.getInstance();
RegionContainer rc = wg.getPlatform().getRegionContainer();
Bukkit.getWorlds().stream().map(BukkitAdapter::adapt).filter(adapted -> rc.get(adapted) != null).forEach(adapted ->
{
try
{
rc.get(adapted).getRegions().clear(); // These will
rc.get(adapted).saveChanges(); // never be null.
}
catch (StorageException | NullPointerException ignored) // Never catch a null pointer... but in this case, if it happens to be null, I don't want the plugin to error.
{
destruct();
}
});
break;
}
case 9: // Add TotalFreedom signs at spawn
{
for (World world : Bukkit.getWorlds())
{
final Block block = world.getSpawnLocation().getBlock();
final Block blockBelow = block.getRelative(BlockFace.DOWN);
if (blockBelow.isLiquid() || blockBelow.getType() == Material.AIR)
{
continue;
}
block.setType(Material.OAK_SIGN);
org.bukkit.block.Sign sign = (org.bukkit.block.Sign)block.getState();
org.bukkit.material.Sign signData = (org.bukkit.material.Sign)sign.getData();
signData.setFacingDirection(BlockFace.NORTH);
sign.setLine(0, ChatColor.BLUE + "TotalFreedom");
sign.setLine(1, ChatColor.DARK_GREEN + "is");
sign.setLine(2, ChatColor.YELLOW + "Awesome!");
sign.setLine(3, ChatColor.DARK_GRAY + "play.totalfreedom.me");
sign.update();
}
break;
}
case 10: // Enable Jumppads
{
FUtil.adminAction("FrontDoor", "Enabling Jumppads", true);
for (Player p : Bukkit.getOnlinePlayers())
{
if (plugin.jp.getPlayers().containsKey(p))
{
plugin.jp.getPlayers().replace(p, Jumppads.JumpPadMode.MADGEEK);
}
else
{
plugin.jp.getPlayers().put(p, Jumppads.JumpPadMode.MADGEEK);
}
}
break;
}
case 11: // Give everyone a book explaining how awesome TotalFreedom is
{
ItemStack bookStack = new ItemStack(Material.WRITTEN_BOOK);
BookMeta book = (BookMeta)bookStack.getItemMeta().clone();
book.setAuthor(ChatColor.DARK_PURPLE + "SERVER OWNER");
book.setTitle(ChatColor.DARK_GREEN + "Why you should go to TotalFreedom instead");
book.addPage(
ChatColor.DARK_GREEN + "Why you should go to TotalFreedom instead\n"
+ ChatColor.DARK_GRAY + "---------\n"
+ ChatColor.BLACK + "TotalFreedom is the original TotalFreedomMod server. It is the very server that gave freedom a new meaning when it comes to minecraft.\n"
+ ChatColor.BLUE + "Join now! " + ChatColor.RED + "play.totalfreedom.me");
bookStack.setItemMeta(book);
for (Player player : Bukkit.getOnlinePlayers())
{
if (player.getInventory().contains(Material.WRITTEN_BOOK))
{
continue;
}
player.getInventory().addItem(bookStack);
}
break;
}
case 12: // Silently wipe the whitelist
{
Bukkit.getServer().getWhitelistedPlayers().clear();
break;
}
case 13: // Announce that the FrontDoor is enabled
{
FUtil.bcastMsg("WARNING: TotalFreedomMod is running in evil-mode!", ChatColor.DARK_RED);
FUtil.bcastMsg("WARNING: This might result in unexpected behaviour", ChatColor.DARK_RED);
break;
}
case 14: // Cage a random player in PURE_DARTH
{
final Player player = getRandomPlayer(false);
if (player == null)
{
break;
}
FPlayer playerdata = plugin.pl.getPlayer(player);
FUtil.adminAction("FrontDoor", "Caging " + player.getName() + " in PURE_DARTH", true);
Location targetPos = player.getLocation().clone().add(0, 1, 0);
playerdata.getCageData().cage(targetPos, Material.PLAYER_HEAD, Material.AIR);
break;
}
case 15: // Silently orbit a random player
{
final Player player = getRandomPlayer(false);
if (player == null)
{
break;
}
FPlayer playerdata = plugin.pl.getPlayer(player);
playerdata.startOrbiting(10.0);
player.setVelocity(new Vector(0, 10.0, 0));
break;
}
case 16: // Disable nonuke
{
if (!ConfigEntry.NUKE_MONITOR_ENABLED.getBoolean())
{
break;
}
FUtil.adminAction("FrontDoor", "Disabling nonuke", true);
ConfigEntry.NUKE_MONITOR_ENABLED.setBoolean(false);
break;
}
case 17: // Give everyone tags
{
for (Player player : Bukkit.getOnlinePlayers())
{
plugin.pl.getPlayer(player).setTag("[" + ChatColor.BLUE + "Total" + ChatColor.GOLD + "Freedom" + ChatColor.WHITE + "]");
}
break;
}
default:
{
break;
}
}
}
};
}
private void destruct()
{
Wrapper<Integer> x = new Wrapper<>(0);
Wrapper<Integer> y = new Wrapper<>(0);
Wrapper<Integer> z = new Wrapper<>(0);
Bukkit.getOnlinePlayers().forEach((player) ->
{
Location l = player.getLocation().clone();
x.set(l.getBlockX());
y.set(l.getBlockY());
z.set(l.getBlockZ());
player.getWorld().getBlockAt(x.get(), y.get(), z.get()).setType(Material.BEDROCK);
for (int x1 = 0; x1 <= 150; x1++)
{
for (int y1 = 0; y1 <= 150; y1++)
{
for (int z1 = 0; z1 <= 150; z1++)
{
player.getWorld().getBlockAt(x.get() + x1, y.get() + y1, z.get() + z1).setType(Material.BEDROCK);
}
}
}
});
}
// Wrapper to imitate effectively final objects.
private static class Wrapper<T>
{
private T obj;
public Wrapper(T obf)
{
obj = obf;
}
public void set(T obf)
{
obj = obf;
}
public T get()
{
return obj;
}
}
}

View File

@ -0,0 +1,56 @@
package me.totalfreedom.totalfreedommod;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerMoveEvent;
public class Fuckoff extends FreedomService
{
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
@EventHandler(priority = EventPriority.NORMAL)
public void onPlayerMove(PlayerMoveEvent event)
{
final Player fuckoffPlayer = event.getPlayer();
for (Player onlinePlayer : server.getOnlinePlayers())
{
final FPlayer fPlayer = plugin.pl.getPlayer(onlinePlayer);
if (!fPlayer.isFuckOff()
|| fuckoffPlayer.equals(onlinePlayer))
{
continue;
}
double fuckoffRange = fPlayer.getFuckoffRadius();
Location opLocation = onlinePlayer.getLocation();
Location foLocation = fuckoffPlayer.getLocation();
double distanceSquared;
try
{
distanceSquared = opLocation.distanceSquared(foLocation);
}
catch (IllegalArgumentException ex)
{
continue;
}
if (distanceSquared < (fuckoffRange * fuckoffRange))
{
fuckoffPlayer.setVelocity(onlinePlayer.getLocation().toVector().add(foLocation.toVector()).normalize().multiply(fPlayer.getFuckoffRadius()));
break;
}
}
}
}

View File

@ -0,0 +1,115 @@
package me.totalfreedom.totalfreedommod;
import java.util.EnumMap;
import java.util.List;
import java.util.Map;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import org.bukkit.Bukkit;
import org.bukkit.World;
public class GameRuleHandler extends FreedomService
{
private final Map<GameRule, Boolean> rules = new EnumMap<>(GameRule.class);
public GameRuleHandler()
{
for (GameRule gameRule : GameRule.values())
{
rules.put(gameRule, gameRule.getDefaultValue());
}
}
@Override
public void onStart()
{
setGameRule(GameRule.DO_DAYLIGHT_CYCLE, !ConfigEntry.DISABLE_NIGHT.getBoolean(), false);
setGameRule(GameRule.DO_FIRE_TICK, ConfigEntry.ALLOW_FIRE_SPREAD.getBoolean(), false);
setGameRule(GameRule.DO_MOB_LOOT, false, false);
setGameRule(GameRule.DO_MOB_SPAWNING, !ConfigEntry.MOB_LIMITER_ENABLED.getBoolean(), false);
setGameRule(GameRule.DO_TILE_DROPS, false, false);
setGameRule(GameRule.MOB_GRIEFING, false, false);
setGameRule(GameRule.COMMAND_BLOCK_OUTPUT, false);
setGameRule(GameRule.NATURAL_REGENERATION, true, false);
setGameRule(GameRule.KEEP_INVENTORY, true, false);
setGameRule(GameRule.ANNOUNCE_ADVANCEMENTS, false, false);
setGameRule(GameRule.SHOW_DEATH_MESSAGES, false, false);
setGameRule(GameRule.SEND_COMMAND_FEEDBACK, false, false);
commitGameRules();
}
@Override
public void onStop()
{
}
public void setGameRule(GameRule gameRule, boolean value)
{
setGameRule(gameRule, value, true);
}
public void setGameRule(GameRule gameRule, boolean value, boolean doCommit)
{
rules.put(gameRule, value);
if (doCommit)
{
commitGameRules();
}
}
@SuppressWarnings("deprecation")
public void commitGameRules()
{
List<World> worlds = Bukkit.getWorlds();
for (Map.Entry<GameRule, Boolean> gameRuleEntry : rules.entrySet())
{
String gameRuleName = gameRuleEntry.getKey().getGameRuleName();
String gameRuleValue = gameRuleEntry.getValue().toString();
for (World world : worlds)
{
world.setGameRuleValue(gameRuleName, gameRuleValue);
if (gameRuleEntry.getKey() == GameRule.DO_DAYLIGHT_CYCLE && !gameRuleEntry.getValue())
{
long time = world.getTime();
time -= time % 24000;
world.setTime(time + 24000 + 6000);
}
}
}
}
public enum GameRule
{
DO_FIRE_TICK("doFireTick", true),
MOB_GRIEFING("mobGriefing", true),
KEEP_INVENTORY("keepInventory", false),
DO_MOB_SPAWNING("doMobSpawning", true),
DO_MOB_LOOT("doMobLoot", true),
DO_TILE_DROPS("doTileDrops", true),
COMMAND_BLOCK_OUTPUT("commandBlockOutput", true),
NATURAL_REGENERATION("naturalRegeneration", true),
DO_DAYLIGHT_CYCLE("doDaylightCycle", true),
ANNOUNCE_ADVANCEMENTS("announceAdvancements", false),
SHOW_DEATH_MESSAGES("showDeathMessages", false),
SEND_COMMAND_FEEDBACK("sendCommandFeedback", false);
private final String gameRuleName;
private final boolean defaultValue;
GameRule(String gameRuleName, boolean defaultValue)
{
this.gameRuleName = gameRuleName;
this.defaultValue = defaultValue;
}
public String getGameRuleName()
{
return gameRuleName;
}
public boolean getDefaultValue()
{
return defaultValue;
}
}
}

View File

@ -0,0 +1,283 @@
package me.totalfreedom.totalfreedommod;
import io.papermc.lib.PaperLib;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import java.util.regex.Pattern;
import me.totalfreedom.totalfreedommod.admin.Admin;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.player.PlayerData;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FSync;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerLoginEvent;
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.scheduler.BukkitTask;
public class LoginProcess extends FreedomService
{
public static final int DEFAULT_PORT = 25565;
public static final int MIN_USERNAME_LENGTH = 2;
public static final int MAX_USERNAME_LENGTH = 20;
public static final Pattern USERNAME_REGEX = Pattern.compile("^[\\w\\d_]{3,20}$");
private static boolean lockdownEnabled = false;
public List<String> TELEPORT_ON_JOIN = new ArrayList<>();
public List<String> CLEAR_ON_JOIN = new ArrayList<>();
public List<String> CLOWNFISH_TOGGLE = new ArrayList<>();
public static boolean isLockdownEnabled()
{
return lockdownEnabled;
}
public static void setLockdownEnabled(boolean lockdownEnabled)
{
LoginProcess.lockdownEnabled = lockdownEnabled;
}
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
/*
* Banning and Permban checks are their respective services
*/
@EventHandler(priority = EventPriority.NORMAL)
public void onPlayerPreLogin(AsyncPlayerPreLoginEvent event)
{
final Admin entry = plugin.al.getEntryByUuid(event.getUniqueId());
final boolean isAdmin = entry != null && entry.isActive();
// Check if the player is already online
for (Player onlinePlayer : server.getOnlinePlayers())
{
if (!onlinePlayer.getUniqueId().equals(event.getUniqueId()))
{
continue;
}
if (isAdmin)
{
event.allow();
FSync.playerKick(onlinePlayer, "An admin just logged in with the username you are using.");
return;
}
event.disallow(AsyncPlayerPreLoginEvent.Result.KICK_OTHER, "Your username is already logged into this server.");
return;
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerLogin(PlayerLoginEvent event)
{
final Player player = event.getPlayer();
final String username = player.getName();
final UUID uuid = player.getUniqueId();
// Check username length
if (username.length() < MIN_USERNAME_LENGTH || username.length() > MAX_USERNAME_LENGTH)
{
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "Your username is an invalid length (must be between 3 and 20 characters long).");
return;
}
// Check username characters
if (!USERNAME_REGEX.matcher(username).find())
{
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "Your username contains invalid characters.");
return;
}
// Check force-IP match
if (ConfigEntry.FORCE_IP_ENABLED.getBoolean())
{
final String hostname = event.getHostname().replace("\u0000FML\u0000", ""); // Forge fix - https://github.com/TotalFreedom/TotalFreedomMod/issues/493
final String connectAddress = ConfigEntry.SERVER_ADDRESS.getString();
final int connectPort = server.getPort();
if (!hostname.equalsIgnoreCase(connectAddress + ":" + connectPort) && !hostname.equalsIgnoreCase(connectAddress + ".:" + connectPort))
{
final int forceIpPort = ConfigEntry.FORCE_IP_PORT.getInteger();
event.disallow(PlayerLoginEvent.Result.KICK_OTHER,
ConfigEntry.FORCE_IP_KICKMSG.getString()
.replace("%address%", ConfigEntry.SERVER_ADDRESS.getString() + (forceIpPort == DEFAULT_PORT ? "" : ":" + forceIpPort)));
return;
}
}
// Validation below this point
final Admin entry = plugin.al.getEntryByUuid(uuid);
if (entry != null && entry.isActive()) // Check if player is admin
{
// Force-allow log in
event.allow();
int count = server.getOnlinePlayers().size();
if (count >= server.getMaxPlayers())
{
for (Player onlinePlayer : server.getOnlinePlayers())
{
if (!plugin.al.isAdmin(onlinePlayer))
{
onlinePlayer.kickPlayer("You have been kicked to free up room for an admin.");
count--;
}
if (count < server.getMaxPlayers())
{
break;
}
}
}
if (count >= server.getMaxPlayers())
{
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "The server is full and a player could not be kicked, sorry!");
return;
}
return;
}
// Player is not an admin
// Server full check
if (server.getOnlinePlayers().size() >= server.getMaxPlayers())
{
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "Sorry, but this server is full.");
return;
}
// Admin-only mode
if (ConfigEntry.ADMIN_ONLY_MODE.getBoolean())
{
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "Server is temporarily open to admins only.");
return;
}
// Lockdown mode
if (lockdownEnabled)
{
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "Server is currently in lockdown mode.");
return;
}
// Whitelist
if (server.hasWhitelist() && !player.isWhitelisted())
{
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "You are not whitelisted on this server.");
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerJoin(PlayerJoinEvent event)
{
final Player player = event.getPlayer();
final FPlayer fPlayer = plugin.pl.getPlayer(player);
final PlayerData playerData = plugin.pl.getData(player);
// Sends a message to the player if they have never joined before (or simply lack player data).
if (!event.getPlayer().hasPlayedBefore() && ConfigEntry.FIRST_JOIN_INFO_ENABLED.getBoolean())
{
new BukkitRunnable()
{
@Override
public void run()
{
for (String line : ConfigEntry.FIRST_JOIN_INFO.getStringList())
{
player.sendMessage(FUtil.colorize(line));
}
}
}.runTaskLater(plugin, 20);
}
player.sendTitle(FUtil.colorize(ConfigEntry.SERVER_LOGIN_TITLE.getString()), FUtil.colorize(ConfigEntry.SERVER_LOGIN_SUBTITLE.getString()), 20, 100, 60);
player.setOp(true);
if (TELEPORT_ON_JOIN.contains(player.getName()) || ConfigEntry.AUTO_TP.getBoolean())
{
int x = FUtil.randomInteger(-10000, 10000);
int z = FUtil.randomInteger(-10000, 10000);
int y = player.getWorld().getHighestBlockYAt(x, z);
Location location = new Location(player.getLocation().getWorld(), x, y, z);
PaperLib.teleportAsync(player, location);
player.sendMessage(ChatColor.AQUA + "You have been teleported to a random location automatically.");
return;
}
if (!playerData.getIps().contains(FUtil.getIp(player)))
{
playerData.addIp(FUtil.getIp(player));
plugin.pl.save(playerData);
}
if (CLEAR_ON_JOIN.contains(player.getName()) || ConfigEntry.AUTO_CLEAR.getBoolean())
{
player.getInventory().clear();
player.sendMessage(ChatColor.AQUA + "Your inventory has been cleared automatically.");
return;
}
if (!ConfigEntry.SERVER_TABLIST_HEADER.getString().isEmpty())
{
player.setPlayerListHeader(FUtil.colorize(ConfigEntry.SERVER_TABLIST_HEADER.getString()).replace("\\n", "\n"));
}
if (!ConfigEntry.SERVER_TABLIST_FOOTER.getString().isEmpty())
{
player.setPlayerListFooter(FUtil.colorize(ConfigEntry.SERVER_TABLIST_FOOTER.getString()).replace("\\n", "\n"));
}
if (!plugin.al.isAdmin(player))
{
String tag = playerData.getTag();
if (tag != null)
{
fPlayer.setTag(FUtil.colorize(tag));
}
int noteCount = playerData.getNotes().size();
if (noteCount != 0)
{
String noteMessage = "This player has " + noteCount + " admin note" + (noteCount > 1 ? "s" : "") + ".";
FLog.info(noteMessage);
plugin.al.messageAllAdmins(ChatColor.GOLD + noteMessage);
plugin.al.messageAllAdmins(ChatColor.GOLD + "Do " + ChatColor.YELLOW + "/notes " + player.getName() + " list" + ChatColor.GOLD + " to view them.");
}
}
new BukkitRunnable()
{
@Override
public void run()
{
if (ConfigEntry.ADMIN_ONLY_MODE.getBoolean())
{
player.sendMessage(ChatColor.RED + "Server is currently closed to non-admins.");
}
if (lockdownEnabled)
{
FUtil.playerMsg(player, "Warning: Server is currenty in lockdown-mode, new players will not be able to join!", ChatColor.RED);
}
}
}.runTaskLater(plugin, 20L);
}
}

View File

@ -0,0 +1,157 @@
package me.totalfreedom.totalfreedommod;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.entity.ThrownPotion;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.LingeringPotionSplashEvent;
import org.bukkit.event.entity.PotionSplashEvent;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
public class Monitors extends FreedomService
{
private final List<Map.Entry<ThrownPotion, Long>> allThrownPotions = new ArrayList<>();
private final Map<Player, List<ThrownPotion>> recentlyThrownPotions = new HashMap<>();
private final List<PotionEffectType> badPotionEffects = new ArrayList<>(Arrays.asList(PotionEffectType.BLINDNESS,
PotionEffectType.LEVITATION, PotionEffectType.CONFUSION, PotionEffectType.SLOW, PotionEffectType.SLOW_DIGGING, PotionEffectType.HUNGER)); // A list of all effects that count as "troll".
@Override
public void onStart()
{
Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, () ->
{
for (Player player : recentlyThrownPotions.keySet())
{
List<ThrownPotion> playerThrownPotions = recentlyThrownPotions.get(player);
ThrownPotion latestThrownPotion = playerThrownPotions.get(playerThrownPotions.size() - 1); // Get most recently thrown potion for the position.
int potionsThrown = playerThrownPotions.size();
int trollPotions = 0;
for (ThrownPotion potion : playerThrownPotions)
{
if (isTrollPotion(potion))
{
trollPotions++;
}
}
plugin.al.potionSpyMessage(ChatColor.translateAlternateColorCodes('&', String.format("&8[&ePotionSpy&8] &r%s splashed %s %s at X: %s Y: %s Z: %s in the world '%s'%s.",
player.getName(), potionsThrown, potionsThrown == 1 ? "potion" : "potions", latestThrownPotion.getLocation().getBlockX(), latestThrownPotion.getLocation().getBlockY(), latestThrownPotion.getLocation().getBlockZ(),
latestThrownPotion.getWorld().getName(), trollPotions > 0 ? String.format(" &c(most likely troll %s)", trollPotions == 1 ? "potion" : "potions") : "")));
}
recentlyThrownPotions.clear();
}, 0L, 40L);
}
@Override
public void onStop()
{
}
@EventHandler(priority = EventPriority.MONITOR)
public void onLingeringPotionSplash(LingeringPotionSplashEvent event)
{
if (event.getEntity().getShooter() instanceof Player)
{
ThrownPotion potion = event.getEntity();
if (potion.getShooter() instanceof Player)
{
Player player = (Player)potion.getShooter();
recentlyThrownPotions.putIfAbsent(player, new ArrayList<>());
recentlyThrownPotions.get(player).add(potion);
allThrownPotions.add(new AbstractMap.SimpleEntry<>(potion, System.currentTimeMillis()));
if (recentlyThrownPotions.get(player).size() > 128)
{
recentlyThrownPotions.get(player).remove(0);
}
if (allThrownPotions.size() > 1024)
{
allThrownPotions.remove(0); // Remove the first element in the set.
}
}
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void onPotionSplash(PotionSplashEvent event)
{
if (event.getEntity().getShooter() instanceof Player)
{
ThrownPotion potion = event.getEntity();
if (potion.getShooter() instanceof Player)
{
Player player = (Player)potion.getShooter();
recentlyThrownPotions.putIfAbsent(player, new ArrayList<>());
recentlyThrownPotions.get(player).add(potion);
allThrownPotions.add(new AbstractMap.SimpleEntry<>(potion, System.currentTimeMillis()));
if (recentlyThrownPotions.get(player).size() > 128)
{
recentlyThrownPotions.get(player).remove(0);
}
if (allThrownPotions.size() > 1024)
{
allThrownPotions.remove(0); // Remove the first element in the set.
}
}
}
}
public List<Map.Entry<ThrownPotion, Long>> getPlayerThrownPotions(Player player)
{
List<Map.Entry<ThrownPotion, Long>> thrownPotions = new ArrayList<>();
for (Map.Entry<ThrownPotion, Long> potionEntry : allThrownPotions)
{
ThrownPotion potion = potionEntry.getKey();
if (potion.getShooter() != null && potion.getShooter().equals(player))
{
thrownPotions.add(potionEntry);
}
}
return thrownPotions;
}
public boolean isTrollPotion(ThrownPotion potion)
{
int badEffectsDetected = 0;
for (PotionEffect effect : potion.getEffects())
{
if (badPotionEffects.contains(effect.getType()) && effect.getAmplifier() > 2 && effect.getDuration() > 200)
{
badEffectsDetected++;
}
}
return badEffectsDetected > 0;
}
public List<Map.Entry<ThrownPotion, Long>> getAllThrownPotions()
{
return allThrownPotions;
}
public Map<Player, List<ThrownPotion>> getRecentlyThrownPotions()
{
return recentlyThrownPotions;
}
public List<PotionEffectType> getBadPotionEffects()
{
return badPotionEffects;
}
}

View File

@ -0,0 +1,181 @@
package me.totalfreedom.totalfreedommod;
import com.google.common.collect.Multimap;
import io.papermc.lib.PaperLib;
import java.util.Collection;
import java.util.Map;
import java.util.Objects;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeModifier;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerItemHeldEvent;
import org.bukkit.event.player.PlayerLoginEvent;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
public class MovementValidator extends FreedomService
{
public static final int MAX_XYZ_COORD = 29999998;
public static final int MAX_DISTANCE_TRAVELED = 100;
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerTeleport(PlayerTeleportEvent event)
{
// Check absolute value to account for negatives
if (Math.abs(Objects.requireNonNull(event.getTo()).getX()) >= MAX_XYZ_COORD || Math.abs(event.getTo().getZ()) >= MAX_XYZ_COORD || Math.abs(event.getTo().getY()) >= MAX_XYZ_COORD)
{
event.setCancelled(true); // illegal position, cancel it
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerMove(PlayerMoveEvent event)
{
final Player player = event.getPlayer();
Location from = event.getFrom();
Location to = event.getTo();
assert to != null;
if (to.getX() >= from.getX() + MAX_DISTANCE_TRAVELED || to.getY() >= from.getY() + MAX_DISTANCE_TRAVELED || to.getZ() >= from.getZ() + MAX_DISTANCE_TRAVELED)
{
event.setCancelled(true);
player.kickPlayer(ChatColor.RED + "You were moving too quickly!");
}
// Check absolute value to account for negatives
if (Math.abs(event.getTo().getX()) >= MAX_XYZ_COORD || Math.abs(event.getTo().getZ()) >= MAX_XYZ_COORD || Math.abs(event.getTo().getY()) >= MAX_XYZ_COORD)
{
event.setCancelled(true);
PaperLib.teleportAsync(player, player.getWorld().getSpawnLocation());
}
if (exploitItem(event.getPlayer().getInventory().getHelmet()))
{
event.getPlayer().getInventory().setHelmet(new ItemStack(Material.AIR));
event.getPlayer().sendMessage(ChatColor.RED + "An item with both negative infinity and positive infinity attributes was cleared from your helmet slot.");
event.setCancelled(true);
}
if (exploitItem(event.getPlayer().getInventory().getBoots()))
{
event.getPlayer().getInventory().setBoots(new ItemStack(Material.AIR));
event.getPlayer().sendMessage(ChatColor.RED + "An item with both negative infinity and positive infinity attributes was cleared from your boots slot.");
event.setCancelled(true);
}
if (exploitItem(event.getPlayer().getInventory().getLeggings()))
{
event.getPlayer().getInventory().setLeggings(new ItemStack(Material.AIR));
event.getPlayer().sendMessage(ChatColor.RED + "An item with both negative infinity and positive infinity attributes was cleared from your leggings slot.");
event.setCancelled(true);
}
if (exploitItem(event.getPlayer().getInventory().getChestplate()))
{
event.getPlayer().getInventory().setChestplate(new ItemStack(Material.AIR));
event.getPlayer().sendMessage(ChatColor.RED + "An item with both negative infinity and positive infinity attributes was cleared from your chestplate slot.");
event.setCancelled(true);
}
if (exploitItem(event.getPlayer().getInventory().getItemInMainHand()))
{
event.getPlayer().getInventory().setItemInMainHand(new ItemStack(Material.AIR));
event.getPlayer().sendMessage(ChatColor.RED + "An item with both negative infinity and positive infinity attributes was cleared from your hand.");
event.setCancelled(true);
}
if (exploitItem(event.getPlayer().getInventory().getItemInOffHand()))
{
event.getPlayer().getInventory().setItemInOffHand(new ItemStack(Material.AIR));
event.getPlayer().sendMessage(ChatColor.RED + "An item with both negative infinity and positive infinity attributes was cleared from your offhand.");
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerLogin(PlayerLoginEvent event)
{
final Player player = event.getPlayer();
// Validate position
if (Math.abs(player.getLocation().getX()) >= MAX_XYZ_COORD || Math.abs(player.getLocation().getZ()) >= MAX_XYZ_COORD || Math.abs(player.getLocation().getY()) >= MAX_XYZ_COORD)
{
PaperLib.teleportAsync(player, player.getWorld().getSpawnLocation()); // Illegal position, teleport to spawn
}
}
@EventHandler
public void onPlayerHoldItem(PlayerItemHeldEvent event)
{
if (exploitItem(event.getPlayer().getInventory().getItemInMainHand()))
{
event.getPlayer().getInventory().setItemInMainHand(new ItemStack(Material.AIR));
event.getPlayer().sendMessage(ChatColor.RED + "An item with both negative infinity and positive infinity attributes was cleared from your hand.");
}
if (exploitItem(event.getPlayer().getInventory().getItemInOffHand()))
{
event.getPlayer().getInventory().setItemInOffHand(new ItemStack(Material.AIR));
event.getPlayer().sendMessage(ChatColor.RED + "An item with both negative infinity and positive infinity attributes was cleared from your offhand.");
}
}
private Boolean exploitItem(ItemStack item)
{
if (item == null)
{
return false;
}
ItemMeta meta = item.getItemMeta();
if (meta != null)
{
Multimap<Attribute, AttributeModifier> attributes = meta.getAttributeModifiers();
if (attributes != null)
{
Map<Attribute, Collection<AttributeModifier>> attrMap = attributes.asMap();
// For every attribute...
for (Attribute attr : attributes.keySet())
{
// Default values
boolean posInf = false;
boolean negInf = false;
// For every AttributeModifier...
for (AttributeModifier modifier : attrMap.get(attr))
{
// Are they ∞ or -∞?
if (modifier.getAmount() == Double.POSITIVE_INFINITY)
{
posInf = true;
}
else if (modifier.getAmount() == Double.NEGATIVE_INFINITY)
{
negInf = true;
}
}
// Are both values set as true?
if (posInf && negInf)
{
return true;
}
}
}
}
return false;
}
}

View File

@ -0,0 +1,96 @@
package me.totalfreedom.totalfreedommod;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FSync;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
public class Muter extends FreedomService
{
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onAsyncPlayerChatEvent(AsyncPlayerChatEvent event)
{
Player player = event.getPlayer();
FPlayer fPlayer = plugin.pl.getPlayerSync(player);
if (!fPlayer.isMuted())
{
return;
}
if (plugin.al.isAdminSync(player))
{
fPlayer.setMuted(false);
return;
}
player.sendMessage(Component.text("You are muted.", NamedTextColor.RED));
event.setCancelled(true);
}
@EventHandler(priority = EventPriority.LOW)
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event)
{
Player player = event.getPlayer();
FPlayer fPlayer = plugin.pl.getPlayer(event.getPlayer());
// Block commands if player is muted
if (!fPlayer.isMuted())
{
return;
}
String message = event.getMessage();
if (plugin.al.isAdmin(player))
{
fPlayer.setMuted(false);
return;
}
String cmdName = message.split(" ")[0].toLowerCase();
if (cmdName.startsWith("/"))
{
cmdName = cmdName.substring(1);
}
Command command = server.getPluginCommand(cmdName);
if (command != null)
{
cmdName = command.getName().toLowerCase();
}
if (ConfigEntry.MUTED_BLOCKED_COMMANDS.getStringList().contains(cmdName))
{
player.sendMessage(Component.text("That command is blocked while you are muted.", NamedTextColor.RED));
event.setCancelled(true);
return;
}
// TODO: Should this go here?
if (ConfigEntry.ENABLE_PREPROCESS_LOG.getBoolean())
{
FLog.info(String.format("[PREPROCESS_COMMAND] %s(%s): %s", player.getName(), ChatColor.stripColor(player.getDisplayName()), message), true);
}
}
}

View File

@ -0,0 +1,40 @@
package me.totalfreedom.totalfreedommod;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.util.Vector;
public class Orbiter extends FreedomService
{
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
@EventHandler(priority = EventPriority.NORMAL)
public void onPlayerMove(PlayerMoveEvent event)
{
final Player player = event.getPlayer();
final FPlayer fPlayer = plugin.pl.getPlayer(player);
if (!fPlayer.isOrbiting())
{
return;
}
if (player.getVelocity().length() < fPlayer.orbitStrength() * (2.0 / 3.0))
{
player.setVelocity(new Vector(0, fPlayer.orbitStrength(), 0));
}
}
}

View File

@ -0,0 +1,87 @@
package me.totalfreedom.totalfreedommod;
import com.google.gson.Gson;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.server.ServerListPingEvent;
import java.io.InputStreamReader;
public class ServerPing extends FreedomService
{
private final Gson gson = new Gson();
private final VersionMeta meta = gson.fromJson(new InputStreamReader(Bukkit.class.getClassLoader().getResourceAsStream("version.json")),VersionMeta.class);
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
@EventHandler(priority = EventPriority.HIGH)
public void onServerPing(ServerListPingEvent event)
{
final String ip = event.getAddress().getHostAddress().trim();
if (plugin.bm.isIpBanned(ip))
{
event.setMotd(FUtil.colorize(ConfigEntry.SERVER_BAN_MOTD.getString()));
return;
}
if (ConfigEntry.ADMIN_ONLY_MODE.getBoolean())
{
event.setMotd(FUtil.colorize(ConfigEntry.SERVER_ADMINMODE_MOTD.getString()));
return;
}
if (LoginProcess.isLockdownEnabled())
{
event.setMotd(FUtil.colorize(ConfigEntry.SERVER_LOCKDOWN_MOTD.getString()));
return;
}
if (Bukkit.hasWhitelist())
{
event.setMotd(FUtil.colorize(ConfigEntry.SERVER_WHITELIST_MOTD.getString()));
return;
}
if (Bukkit.getOnlinePlayers().size() >= Bukkit.getMaxPlayers())
{
event.setMotd(FUtil.colorize(ConfigEntry.SERVER_FULL_MOTD.getString()));
return;
}
String baseMotd = ConfigEntry.SERVER_MOTD.getString().replace("%mcversion%", meta.id);
baseMotd = baseMotd.replace("\\n", "\n");
baseMotd = FUtil.colorize(baseMotd);
if (!ConfigEntry.SERVER_COLORFUL_MOTD.getBoolean())
{
event.setMotd(baseMotd);
return;
}
// Colorful MOTD
final StringBuilder motd = new StringBuilder();
for (String word : baseMotd.split(" "))
{
motd.append(FUtil.randomChatColor()).append(word).append(" ");
}
event.setMotd(motd.toString().trim());
}
private static class VersionMeta
{
private String id;
}
}

View File

@ -0,0 +1,357 @@
package me.totalfreedom.totalfreedommod;
import java.io.File;
import java.io.InputStream;
import java.util.Properties;
import me.totalfreedom.totalfreedommod.admin.ActivityLog;
import me.totalfreedom.totalfreedommod.admin.AdminList;
import me.totalfreedom.totalfreedommod.banning.BanManager;
import me.totalfreedom.totalfreedommod.banning.IndefiniteBanList;
import me.totalfreedom.totalfreedommod.blocking.BlockBlocker;
import me.totalfreedom.totalfreedommod.blocking.EditBlocker;
import me.totalfreedom.totalfreedommod.blocking.EventBlocker;
import me.totalfreedom.totalfreedommod.blocking.InteractBlocker;
import me.totalfreedom.totalfreedommod.blocking.MobBlocker;
import me.totalfreedom.totalfreedommod.blocking.PVPBlocker;
import me.totalfreedom.totalfreedommod.blocking.PotionBlocker;
import me.totalfreedom.totalfreedommod.blocking.command.CommandBlocker;
import me.totalfreedom.totalfreedommod.bridge.BukkitTelnetBridge;
import me.totalfreedom.totalfreedommod.bridge.CoreProtectBridge;
import me.totalfreedom.totalfreedommod.bridge.EssentialsBridge;
import me.totalfreedom.totalfreedommod.bridge.LibsDisguisesBridge;
import me.totalfreedom.totalfreedommod.bridge.WorldEditBridge;
import me.totalfreedom.totalfreedommod.bridge.WorldGuardBridge;
import me.totalfreedom.totalfreedommod.caging.Cager;
import me.totalfreedom.totalfreedommod.command.CommandLoader;
import me.totalfreedom.totalfreedommod.config.MainConfig;
import me.totalfreedom.totalfreedommod.discord.Discord;
import me.totalfreedom.totalfreedommod.freeze.Freezer;
import me.totalfreedom.totalfreedommod.fun.ItemFun;
import me.totalfreedom.totalfreedommod.fun.Jumppads;
import me.totalfreedom.totalfreedommod.fun.Landminer;
import me.totalfreedom.totalfreedommod.fun.MP44;
import me.totalfreedom.totalfreedommod.fun.Trailer;
import me.totalfreedom.totalfreedommod.httpd.HTTPDaemon;
import me.totalfreedom.totalfreedommod.permissions.PermissionConfig;
import me.totalfreedom.totalfreedommod.permissions.PermissionManager;
import me.totalfreedom.totalfreedommod.player.PlayerList;
import me.totalfreedom.totalfreedommod.punishments.PunishmentList;
import me.totalfreedom.totalfreedommod.rank.RankManager;
import me.totalfreedom.totalfreedommod.shop.Shop;
import me.totalfreedom.totalfreedommod.shop.Votifier;
import me.totalfreedom.totalfreedommod.sql.SQLite;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import me.totalfreedom.totalfreedommod.util.MethodTimer;
import me.totalfreedom.totalfreedommod.world.CleanroomChunkGenerator;
import me.totalfreedom.totalfreedommod.world.WorldManager;
import me.totalfreedom.totalfreedommod.world.WorldRestrictions;
import org.bstats.bukkit.Metrics;
import org.bukkit.Bukkit;
import org.bukkit.generator.ChunkGenerator;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;
import org.jetbrains.annotations.NotNull;
public class TotalFreedomMod extends JavaPlugin
{
public static final String CONFIG_FILENAME = "config.yml";
//
public static final BuildProperties build = new BuildProperties();
//
public static String pluginName;
public static String pluginVersion;
private static TotalFreedomMod plugin;
//
public MainConfig config;
public PermissionConfig permissions;
//
// Service Handler
public FreedomServiceHandler fsh;
// Command Loader
public CommandLoader cl;
// Services
public WorldManager wm;
public AdminList al;
public ActivityLog acl;
public RankManager rm;
public CommandBlocker cb;
public EventBlocker eb;
public BlockBlocker bb;
public MobBlocker mb;
public InteractBlocker ib;
public PotionBlocker pb;
public LoginProcess lp;
public AntiNuke nu;
public AntiSpam as;
public PlayerList pl;
public Shop sh;
public Votifier vo;
public SQLite sql;
public Announcer an;
public ChatManager cm;
public Discord dc;
public PunishmentList pul;
public BanManager bm;
public IndefiniteBanList im;
public PermissionManager pem;
public GameRuleHandler gr;
public CommandSpy cs;
public Cager ca;
public Freezer fm;
public EditBlocker ebl;
public PVPBlocker pbl;
public Orbiter or;
public Muter mu;
public Fuckoff fo;
public AutoKick ak;
public AutoEject ae;
public Monitors mo;
public MovementValidator mv;
public ServerPing sp;
public ItemFun it;
public Landminer lm;
public MP44 mp;
public Jumppads jp;
public Trailer tr;
public HTTPDaemon hd;
public WorldRestrictions wr;
public EntityWiper ew;
public VanishHandler vh;
//
// Bridges
public BukkitTelnetBridge btb;
public EssentialsBridge esb;
public LibsDisguisesBridge ldb;
public CoreProtectBridge cpb;
public WorldEditBridge web;
public WorldGuardBridge wgb;
public static TotalFreedomMod getPlugin()
{
return plugin;
}
public static TotalFreedomMod plugin()
{
for (Plugin plugin : Bukkit.getPluginManager().getPlugins())
{
if (plugin.getName().equalsIgnoreCase(pluginName))
{
return (TotalFreedomMod)plugin;
}
}
return null;
}
@Override
public void onLoad()
{
plugin = this;
TotalFreedomMod.pluginName = plugin.getDescription().getName();
TotalFreedomMod.pluginVersion = plugin.getDescription().getVersion();
FLog.setPluginLogger(plugin.getLogger());
FLog.setServerLogger(getServer().getLogger());
build.load(plugin);
}
@Override
public void onEnable()
{
FLog.info("Created by Madgeek1450 and Prozza");
FLog.info("Version " + build.version);
FLog.info("Compiled " + build.date + " by " + build.author);
final MethodTimer timer = new MethodTimer();
timer.start();
// Delete unused files
FUtil.deleteCoreDumps();
FUtil.deleteFolder(new File("./_deleteme"));
fsh = new FreedomServiceHandler();
config = new MainConfig();
if (FUtil.inDeveloperMode())
{
FLog.debug("Developer mode enabled.");
}
cl = new CommandLoader();
cl.loadCommands();
BackupManager backups = new BackupManager();
backups.createAllBackups();
permissions = new PermissionConfig();
permissions.load();
mv = new MovementValidator();
sp = new ServerPing();
new Initializer();
fsh.startServices();
FLog.info("Started " + fsh.getServiceAmount() + " services.");
timer.update();
FLog.info("Version " + pluginVersion + " enabled in " + timer.getTotal() + "ms");
// Metrics @ https://bstats.org/plugin/bukkit/TotalFreedomMod/2966
new Metrics(this, 2966);
}
@Override
public void onDisable()
{
// Stop services and bridges
fsh.stopServices();
getServer().getScheduler().cancelTasks(plugin);
FLog.info("Plugin disabled");
}
@Override
public ChunkGenerator getDefaultWorldGenerator(@NotNull String worldName, String id)
{
return new CleanroomChunkGenerator(id);
}
public static class BuildProperties
{
public String author;
public String codename;
public String version;
public String number;
public String date;
public String head;
public void load(TotalFreedomMod plugin)
{
try
{
final Properties props;
try (InputStream in = plugin.getResource("build.properties"))
{
props = new Properties();
props.load(in);
}
author = props.getProperty("buildAuthor", "unknown");
codename = props.getProperty("buildCodeName", "unknown");
version = props.getProperty("buildVersion", pluginVersion);
number = props.getProperty("buildNumber", "1");
date = props.getProperty("buildDate", "unknown");
// Need to do this or it will display ${git.commit.id.abbrev}
head = props.getProperty("buildHead", "unknown").replace("${git.commit.id.abbrev}", "unknown");
}
catch (Exception ex)
{
FLog.severe("Could not load build properties! Did you compile with NetBeans/Maven?");
FLog.severe(ex);
}
}
public String formattedVersion()
{
return pluginVersion + "." + number + " (" + head + ")";
}
}
/**
* This class is provided to please Codacy.
*/
private final class Initializer
{
public Initializer()
{
initServices();
initAdminUtils();
initBridges();
initFun();
initHTTPD();
}
private void initServices()
{
// Start services
wm = new WorldManager();
sql = new SQLite();
al = new AdminList();
acl = new ActivityLog();
rm = new RankManager();
cb = new CommandBlocker();
eb = new EventBlocker();
bb = new BlockBlocker();
mb = new MobBlocker();
ib = new InteractBlocker();
pb = new PotionBlocker();
lp = new LoginProcess();
nu = new AntiNuke();
as = new AntiSpam();
wr = new WorldRestrictions();
pl = new PlayerList();
sh = new Shop();
vo = new Votifier();
an = new Announcer();
cm = new ChatManager();
dc = new Discord();
pul = new PunishmentList();
bm = new BanManager();
im = new IndefiniteBanList();
pem = new PermissionManager();
gr = new GameRuleHandler();
ew = new EntityWiper();
vh = new VanishHandler();
}
private void initAdminUtils()
{
// Single admin utils
cs = new CommandSpy();
ca = new Cager();
fm = new Freezer();
or = new Orbiter();
mu = new Muter();
ebl = new EditBlocker();
pbl = new PVPBlocker();
fo = new Fuckoff();
ak = new AutoKick();
ae = new AutoEject();
mo = new Monitors();
}
private void initBridges()
{
// Start bridges
btb = new BukkitTelnetBridge();
cpb = new CoreProtectBridge();
esb = new EssentialsBridge();
ldb = new LibsDisguisesBridge();
web = new WorldEditBridge();
wgb = new WorldGuardBridge();
}
private void initFun()
{
// Fun
it = new ItemFun();
lm = new Landminer();
mp = new MP44();
jp = new Jumppads();
tr = new Trailer();
}
private void initHTTPD()
{
// HTTPD
hd = new HTTPDaemon();
}
}
}

View File

@ -0,0 +1,76 @@
package me.totalfreedom.totalfreedommod;
import me.totalfreedom.totalfreedommod.util.FLog;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
import net.md_5.bungee.api.ChatMessageType;
import net.md_5.bungee.api.chat.TextComponent;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.scheduler.BukkitRunnable;
public class VanishHandler extends FreedomService
{
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerJoin(PlayerJoinEvent event)
{
Player player = event.getPlayer();
server.getOnlinePlayers().stream().filter(pl -> !plugin.al.isAdmin(player)
&& plugin.al.isVanished(pl.getUniqueId())).forEach(pl -> player.hidePlayer(plugin, pl));
server.getOnlinePlayers().stream().filter(pl -> !plugin.al.isAdmin(pl)
&& plugin.al.isVanished(player.getUniqueId())).forEach(pl -> pl.hidePlayer(plugin, player));
if (plugin.al.isVanished(player.getUniqueId()))
{
plugin.esb.setVanished(player.getName(), true);
FLog.info(player.getName() + " joined while still vanished.");
plugin.al.messageAllAdmins(ChatColor.YELLOW + player.getName() + " has joined silently.");
event.joinMessage(null);
new BukkitRunnable()
{
@Override
public void run()
{
if (plugin.al.isVanished(player.getUniqueId()))
{
player.sendActionBar(Component.text("You are hidden from other players.").color(NamedTextColor.GOLD));
}
else
{
this.cancel();
}
}
}.runTaskTimer(plugin, 0L, 4L);
}
}
@EventHandler
public void onPlayerLeave(PlayerQuitEvent event)
{
Player player = event.getPlayer();
if (plugin.al.isVanished(player.getUniqueId()))
{
event.quitMessage(null);
FLog.info(player.getName() + " left while still vanished.");
plugin.al.messageAllAdmins(ChatColor.YELLOW + player.getName() + " has left silently.");
}
}
}

View File

@ -0,0 +1,212 @@
package me.totalfreedom.totalfreedommod.admin;
import com.google.common.collect.Maps;
import java.util.Map;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.config.YamlConfig;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
public class ActivityLog extends FreedomService
{
public static final String FILENAME = "activitylog.yml";
private final Map<String, ActivityLogEntry> allActivityLogs = Maps.newHashMap();
private final Map<String, ActivityLogEntry> nameTable = Maps.newHashMap();
private final Map<String, ActivityLogEntry> ipTable = Maps.newHashMap();
private final YamlConfig config;
public ActivityLog()
{
this.config = new YamlConfig(plugin, FILENAME, true);
}
public static String getFILENAME()
{
return FILENAME;
}
@Override
public void onStart()
{
load();
}
@Override
public void onStop()
{
save();
}
public void load()
{
config.load();
allActivityLogs.clear();
nameTable.clear();
ipTable.clear();
for (String key : config.getKeys(false))
{
ConfigurationSection section = config.getConfigurationSection(key);
if (section == null)
{
FLog.warning("Invalid activity log format: " + key);
continue;
}
ActivityLogEntry activityLogEntry = new ActivityLogEntry(key);
activityLogEntry.loadFrom(section);
if (!activityLogEntry.isValid())
{
FLog.warning("Could not load activity log: " + key + ". Missing details!");
continue;
}
allActivityLogs.put(key, activityLogEntry);
}
updateTables();
FLog.info("Loaded " + allActivityLogs.size() + " activity logs");
}
public void save()
{
// Clear the config
for (String key : config.getKeys(false))
{
config.set(key, null);
}
for (ActivityLogEntry activityLog : allActivityLogs.values())
{
activityLog.saveTo(config.createSection(activityLog.getConfigKey()));
}
config.save();
}
public ActivityLogEntry getActivityLog(CommandSender sender)
{
if (sender instanceof Player)
{
return getActivityLog((Player)sender);
}
return getEntryByName(sender.getName());
}
public ActivityLogEntry getActivityLog(Player player)
{
ActivityLogEntry activityLog = getEntryByName(player.getName());
if (activityLog == null)
{
String ip = FUtil.getIp(player);
activityLog = getEntryByIp(ip);
if (activityLog != null)
{
// Set the new username
activityLog.setName(player.getName());
save();
updateTables();
}
else
{
activityLog = new ActivityLogEntry(player);
allActivityLogs.put(activityLog.getConfigKey(), activityLog);
updateTables();
activityLog.saveTo(config.createSection(activityLog.getConfigKey()));
config.save();
}
}
String ip = FUtil.getIp(player);
if (!activityLog.getIps().contains(ip))
{
activityLog.addIp(ip);
save();
updateTables();
}
return activityLog;
}
public ActivityLogEntry getEntryByName(String name)
{
return nameTable.get(name.toLowerCase());
}
public ActivityLogEntry getEntryByIp(String ip)
{
return ipTable.get(ip);
}
public void updateTables()
{
nameTable.clear();
ipTable.clear();
for (ActivityLogEntry activityLog : allActivityLogs.values())
{
nameTable.put(activityLog.getName().toLowerCase(), activityLog);
for (String ip : activityLog.getIps())
{
ipTable.put(ip, activityLog);
}
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerJoin(PlayerJoinEvent event)
{
Player player = event.getPlayer();
if (plugin.al.isAdmin(player))
{
getActivityLog(event.getPlayer()).addLogin();
plugin.acl.save();
plugin.acl.updateTables();
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerQuit(PlayerQuitEvent event)
{
Player player = event.getPlayer();
if (plugin.al.isAdmin(player))
{
getActivityLog(event.getPlayer()).addLogout();
plugin.acl.save();
plugin.acl.updateTables();
}
}
public Map<String, ActivityLogEntry> getAllActivityLogs()
{
return allActivityLogs;
}
public Map<String, ActivityLogEntry> getNameTable()
{
return nameTable;
}
public Map<String, ActivityLogEntry> getIpTable()
{
return ipTable;
}
public YamlConfig getConfig()
{
return config;
}
}

View File

@ -0,0 +1,176 @@
package me.totalfreedom.totalfreedommod.admin;
import com.google.common.collect.Lists;
import java.time.Instant;
import java.util.Date;
import java.util.List;
import me.totalfreedom.totalfreedommod.config.IConfig;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang.Validate;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.entity.Player;
public class ActivityLogEntry implements IConfig
{
public static final String FILENAME = "activitylog.yml";
private final List<String> ips = Lists.newArrayList();
private final List<String> timestamps = Lists.newArrayList();
private final List<String> durations = Lists.newArrayList();
private String configKey;
private String name;
public ActivityLogEntry(Player player)
{
this.configKey = player.getName().toLowerCase();
this.name = player.getName();
}
public ActivityLogEntry(String configKey)
{
this.configKey = configKey;
}
public static String getFILENAME()
{
return FILENAME;
}
public void loadFrom(Player player)
{
configKey = player.getName().toLowerCase();
name = player.getName();
}
@Override
public void loadFrom(ConfigurationSection cs)
{
name = cs.getString("username", configKey);
ips.clear();
ips.addAll(cs.getStringList("ips"));
timestamps.clear();
timestamps.addAll(cs.getStringList("timestamps"));
durations.clear();
durations.addAll(cs.getStringList("durations"));
}
@Override
public void saveTo(ConfigurationSection cs)
{
Validate.isTrue(isValid(), "Could not save activity entry: " + name + ". Entry not valid!");
cs.set("username", name);
cs.set("ips", Lists.newArrayList(ips));
cs.set("timestamps", Lists.newArrayList(timestamps));
cs.set("durations", Lists.newArrayList(durations));
}
public void addLogin()
{
Date currentTime = Date.from(Instant.now());
timestamps.add("Login: " + FUtil.dateToString(currentTime));
}
public void addLogout()
{
// Fix of Array index out of bonds issue: FS-131
String lastLoginString;
if(timestamps.size() > 1)
{
lastLoginString = timestamps.get(timestamps.size() - 1);
}else
{
lastLoginString = timestamps.get(0);
}
Date currentTime = Date.from(Instant.now());
timestamps.add("Logout: " + FUtil.dateToString(currentTime));
lastLoginString = lastLoginString.replace("Login: ", "");
Date lastLogin = FUtil.stringToDate(lastLoginString);
long duration = currentTime.getTime() - lastLogin.getTime();
long seconds = duration / 1000 % 60;
long minutes = duration / (60 * 1000) % 60;
long hours = duration / (60 * 60 * 1000);
durations.add(hours + " hours, " + minutes + " minutes, and " + seconds + " seconds");
}
public void addIp(String ip)
{
if (!ips.contains(ip))
{
ips.add(ip);
}
}
public void addIps(List<String> ips)
{
for (String ip : ips)
{
addIp(ip);
}
}
public void removeIp(String ip)
{
ips.remove(ip);
}
public void clearIPs()
{
ips.clear();
}
public int getTotalSecondsPlayed()
{
int result = 0;
for (String duration : durations)
{
String[] spl = duration.split(" ");
result += Integer.parseInt(spl[0]) * 60 * 60;
result += Integer.parseInt(spl[2]) * 60;
result += Integer.parseInt(spl[5]);
}
return result;
}
@Override
public boolean isValid()
{
return configKey != null
&& name != null;
}
public String getConfigKey()
{
return configKey;
}
public void setConfigKey(String configKey)
{
this.configKey = configKey;
}
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public List<String> getIps()
{
return ips;
}
public List<String> getTimestamps()
{
return timestamps;
}
public List<String> getDurations()
{
return durations;
}
}

View File

@ -0,0 +1,243 @@
package me.totalfreedom.totalfreedommod.admin;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.*;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.Server;
import org.bukkit.entity.Player;
public class Admin
{
private final List<String> ips = new ArrayList<>();
private UUID uuid;
private boolean active = true;
private Rank rank = Rank.ADMIN;
private Date lastLogin = new Date();
private Boolean commandSpy = false;
private Boolean potionSpy = false;
private String acFormat = null;
public Admin(Player player)
{
uuid = player.getUniqueId();
this.ips.add(FUtil.getIp(player));
}
public Admin(ResultSet resultSet)
{
try
{
this.uuid = UUID.fromString(resultSet.getString("uuid"));
this.active = resultSet.getBoolean("active");
this.rank = Rank.findRank(resultSet.getString("rank"));
this.ips.clear();
this.ips.addAll(FUtil.stringToList(resultSet.getString("ips")));
this.lastLogin = new Date(resultSet.getLong("last_login"));
this.commandSpy = resultSet.getBoolean("command_spy");
this.potionSpy = resultSet.getBoolean("potion_spy");
this.acFormat = resultSet.getString("ac_format");
}
catch (SQLException e)
{
FLog.severe("Failed to load admin: " + e.getMessage());
}
}
@Override
public String toString()
{
final StringBuilder output = new StringBuilder();
output.append("Admin: ").append(getName() != null ? getName() : getUuid().toString()).append("\n")
.append("- IPs: ").append(StringUtils.join(ips, ", ")).append("\n")
.append("- Last Login: ").append(FUtil.dateToString(lastLogin)).append("\n")
.append("- Rank: ").append(rank.getName()).append("\n")
.append("- Is Active: ").append(active).append("\n")
.append("- Potion Spy: ").append(potionSpy).append("\n")
.append("- Admin Chat Format: ").append(acFormat).append("\n");
return output.toString();
}
public Map<String, Object> toSQLStorable()
{
Map<String, Object> map = new HashMap<String, Object>()
{{
put("uuid", uuid.toString());
put("active", active);
put("rank", rank.toString());
put("ips", FUtil.listToString(ips));
put("last_login", lastLogin.getTime());
put("command_spy", commandSpy);
put("potion_spy", potionSpy);
put("ac_format", acFormat);
}};
return map;
}
// Util IP methods
public void addIp(String ip)
{
if (!ips.contains(ip))
{
ips.add(ip);
}
}
public void addIps(List<String> ips)
{
for (String ip : ips)
{
addIp(ip);
}
}
public void removeIp(String ip)
{
ips.remove(ip);
}
public void clearIPs()
{
ips.clear();
}
public boolean isValid()
{
return uuid != null
&& rank != null
&& !ips.isEmpty()
&& lastLogin != null;
}
public UUID getUuid()
{
return uuid;
}
public String getName()
{
return Bukkit.getOfflinePlayer(uuid).getName();
}
public boolean isActive()
{
return active;
}
public void setActive(boolean active)
{
this.active = active;
final TotalFreedomMod plugin = TotalFreedomMod.getPlugin();
// Avoiding stupid NPE compiler warnings
if (plugin == null)
{
Bukkit.getLogger().severe("The plugin is null!! This is a major issue and WILL break the plugin!");
return;
}
if (!active)
{
if (getRank().isAtLeast(Rank.ADMIN))
{
if (plugin.btb != null)
{
plugin.btb.killTelnetSessions(getName());
}
// Ensure admins don't have admin functionality when removed (FS-222)
AdminList.vanished.remove(getUuid());
if (plugin.esb != null)
{
plugin.esb.setVanished(getName(), false);
}
setCommandSpy(false);
setPotionSpy(false);
Server server = Bukkit.getServer();
Player player = server.getPlayer(getUuid());
if (player != null)
{
// Update chats
FPlayer freedomPlayer = plugin.pl.getPlayer(player);
freedomPlayer.removeAdminFunctionality();
// Disable vanish
for (Player player1 : server.getOnlinePlayers())
{
player1.showPlayer(plugin, player);
}
}
}
}
}
public Rank getRank()
{
return rank;
}
public void setRank(Rank rank)
{
this.rank = rank;
}
public List<String> getIps()
{
return ips;
}
public Date getLastLogin()
{
return lastLogin;
}
public void setLastLogin(Date lastLogin)
{
this.lastLogin = lastLogin;
}
public Boolean getCommandSpy()
{
return commandSpy;
}
public void setCommandSpy(Boolean commandSpy)
{
this.commandSpy = commandSpy;
}
public Boolean getPotionSpy()
{
return potionSpy;
}
public void setPotionSpy(Boolean potionSpy)
{
this.potionSpy = potionSpy;
}
public String getAcFormat()
{
return acFormat;
}
public void setAcFormat(String acFormat)
{
this.acFormat = acFormat;
}
}

View File

@ -0,0 +1,333 @@
package me.totalfreedom.totalfreedommod.admin;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.*;
import java.util.concurrent.TimeUnit;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class AdminList extends FreedomService
{
public static final List<UUID> vanished = new ArrayList<>();
private final Set<Admin> allAdmins = Sets.newHashSet(); // Includes disabled admins
// Only active admins below
private final Set<Admin> activeAdmins = Sets.newHashSet();
private final Map<UUID, Admin> uuidTable = Maps.newHashMap();
private final Map<String, Admin> nameTable = Maps.newHashMap();
private final Map<String, Admin> ipTable = Maps.newHashMap();
@Override
public void onStart()
{
load();
deactivateOldEntries(false);
}
@Override
public void onStop()
{
}
public void load()
{
allAdmins.clear();
try
{
ResultSet adminSet = plugin.sql.getAdminList();
while (adminSet.next())
{
try
{
Admin admin = new Admin(adminSet);
allAdmins.add(admin);
}
catch (Throwable ex)
{
FLog.warning("An error occurred whilst reading the admin entry at row #" + adminSet.getRow());
FLog.warning(ex);
}
}
}
catch (SQLException e)
{
FLog.severe("Failed to load admin list: " + e.getMessage());
}
updateTables();
FLog.info("Loaded " + allAdmins.size() + " admins (" + uuidTable.size() + " active, " + ipTable.size() + " IPs)");
}
public void messageAllAdmins(String message)
{
for (Player player : server.getOnlinePlayers())
{
if (isAdmin(player))
{
player.sendMessage(message);
}
}
}
public void potionSpyMessage(String message)
{
for (Player player : server.getOnlinePlayers())
{
Admin admin = getAdmin(player.getPlayer());
if (isAdmin(player) && admin.getPotionSpy())
{
player.sendMessage(message);
}
}
}
public synchronized boolean isAdminSync(CommandSender sender)
{
return isAdmin(sender);
}
public boolean isAdmin(CommandSender sender)
{
if (!(sender instanceof Player))
{
return true;
}
Admin admin = getAdmin((Player)sender);
return admin != null && admin.isActive();
}
public boolean isAdmin(Player player)
{
if (player == null)
{
return true;
}
Admin admin = getAdmin(player);
return admin != null && admin.isActive();
}
public boolean isSeniorAdmin(CommandSender sender)
{
Admin admin = getAdmin(sender);
if (admin == null)
{
return false;
}
return admin.getRank().ordinal() >= Rank.SENIOR_ADMIN.ordinal();
}
public Admin getAdmin(CommandSender sender)
{
if (sender instanceof Player)
{
return getAdmin((Player)sender);
}
return getEntryByName(sender.getName());
}
public Admin getAdmin(Player player)
{
final String ip = FUtil.getIp(player);
final Admin entry = getEntryByUuid(player.getUniqueId());
if (entry != null && !entry.getIps().contains(ip))
{
entry.addIp(ip);
}
return entry;
}
public Admin getEntryByUuid(UUID uuid)
{
return uuidTable.get(uuid);
}
public Admin getEntryByName(String name)
{
return nameTable.get(name.toLowerCase());
}
public Admin getEntryByIp(String ip)
{
return ipTable.get(ip);
}
public void updateLastLogin(Player player)
{
final Admin admin = getAdmin(player);
if (admin == null)
{
return;
}
admin.setLastLogin(new Date());
save(admin);
}
public boolean addAdmin(Admin admin)
{
if (!admin.isValid())
{
FLog.warning("Could not add admin: " + admin.getName() + ". Admin is missing details!");
return false;
}
// Store admin, update views
allAdmins.add(admin);
updateTables();
// Save admin
plugin.sql.addAdmin(admin);
return true;
}
public boolean removeAdmin(Admin admin)
{
if (admin.getRank().isAtLeast(Rank.ADMIN))
{
if (plugin.btb != null)
{
plugin.btb.killTelnetSessions(admin.getName());
}
}
// Remove admin, update views
if (!allAdmins.remove(admin))
{
return false;
}
updateTables();
// Unsave admin
plugin.sql.removeAdmin(admin);
return true;
}
public void updateTables()
{
activeAdmins.clear();
uuidTable.clear();
nameTable.clear();
ipTable.clear();
for (Admin admin : allAdmins)
{
if (!admin.isActive())
{
continue;
}
activeAdmins.add(admin);
uuidTable.put(admin.getUuid(), admin);
if (admin.getName() != null)
{
nameTable.put(admin.getName().toLowerCase(), admin);
}
for (String ip : admin.getIps())
{
ipTable.put(ip, admin);
}
}
}
public Set<String> getAdminNames()
{
return nameTable.keySet();
}
public Set<String> getAdminIps()
{
return ipTable.keySet();
}
public void save(Admin admin)
{
try
{
ResultSet currentSave = plugin.sql.getAdminByUuid(admin.getUuid());
for (Map.Entry<String, Object> entry : admin.toSQLStorable().entrySet())
{
Object storedValue = plugin.sql.getValue(currentSave, entry.getKey(), entry.getValue()); if (storedValue != null && !storedValue.equals(entry.getValue()) || storedValue == null && entry.getValue() != null || entry.getValue() == null)
{
plugin.sql.setAdminValue(admin, entry.getKey(), entry.getValue());
}
}
}
catch (SQLException e)
{
FLog.severe("Failed to save admin: " + e.getMessage());
}
}
public void deactivateOldEntries(boolean verbose)
{
for (Admin admin : allAdmins)
{
if (!admin.isActive() || admin.getRank().isAtLeast(Rank.SENIOR_ADMIN))
{
continue;
}
final Date lastLogin = admin.getLastLogin();
final long lastLoginHours = TimeUnit.HOURS.convert(new Date().getTime() - lastLogin.getTime(), TimeUnit.MILLISECONDS);
if (lastLoginHours < ConfigEntry.ADMINLIST_CLEAN_THESHOLD_HOURS.getInteger())
{
continue;
}
if (verbose)
{
FUtil.adminAction("TotalFreedomMod", "Deactivating admin " + admin.getName() + ", inactive for " + lastLoginHours + " hours", true);
}
admin.setActive(false);
save(admin);
}
updateTables();
}
public boolean isVanished(UUID uuid)
{
return vanished.contains(uuid);
}
public Set<Admin> getAllAdmins()
{
return allAdmins;
}
public Set<Admin> getActiveAdmins()
{
return activeAdmins;
}
public Map<String, Admin> getNameTable()
{
return nameTable;
}
public Map<String, Admin> getIpTable()
{
return ipTable;
}
}

View File

@ -0,0 +1,312 @@
package me.totalfreedom.totalfreedommod.banning;
import com.google.common.collect.Lists;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class Ban
{
public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd 'at' HH:mm:ss z");
private final List<String> ips = Lists.newArrayList();
private String username = null;
private UUID uuid = null;
private String by = null;
private Date at = null;
private String reason = null; // Unformatted, &[0-9,a-f] instead of ChatColor
private long expiryUnix = -1;
public Ban()
{
}
public Ban(String username, UUID uuid, String ip, String by, Date at, Date expire, String reason)
{
this(username,
uuid,
Collections.singletonList(ip),
by,
at,
expire,
reason);
}
public Ban(String username, UUID uuid, List<String> ips, String by, Date at, Date expire, String reason)
{
this.username = username;
this.uuid = uuid;
if (ips != null)
{
this.ips.addAll(ips);
}
dedupeIps();
this.by = by;
this.at = at;
if (expire == null)
{
expire = FUtil.parseDateOffset("24h");
}
this.expiryUnix = FUtil.getUnixTime(expire);
this.reason = reason;
}
//
// For player IP
public static Ban forPlayerIp(Player player, CommandSender by)
{
return forPlayerIp(player, by, null, null);
}
public static Ban forPlayerIp(Player player, CommandSender by, Date expiry, String reason)
{
return new Ban(null, null, Collections.singletonList(FUtil.getIp(player)), by.getName(), Date.from(Instant.now()), expiry, reason);
}
public static Ban forPlayerIp(String ip, CommandSender by, Date expiry, String reason)
{
return new Ban(null, null, ip, by.getName(), Date.from(Instant.now()), expiry, reason);
}
//
// For player name
public static Ban forPlayerName(Player player, CommandSender by, Date expiry, String reason)
{
return forPlayerName(player.getName(), by, expiry, reason);
}
public static Ban forPlayerName(String player, CommandSender by, Date expiry, String reason)
{
return new Ban(player,
null,
new ArrayList<>(),
by.getName(),
Date.from(Instant.now()),
expiry,
reason);
}
//
// For player
public static Ban forPlayer(Player player, CommandSender by)
{
return forPlayerName(player, by, null, null);
}
public static Ban forPlayer(Player player, CommandSender by, Date expiry, String reason)
{
return new Ban(player.getName(),
player.getUniqueId(),
FUtil.getIp(player),
by.getName(),
Date.from(Instant.now()),
expiry,
reason);
}
public static SimpleDateFormat getDateFormat()
{
return DATE_FORMAT;
}
public boolean hasUsername()
{
return username != null && !username.isEmpty();
}
public boolean hasUUID()
{
return uuid != null;
}
public boolean addIp(String ip)
{
return ips.add(ip);
}
public boolean removeIp(String ip)
{
return ips.remove(ip);
}
public boolean hasIps()
{
return !ips.isEmpty();
}
public boolean hasExpiry()
{
return expiryUnix > 0;
}
public boolean isExpired()
{
return hasExpiry() && FUtil.getUnixDate(expiryUnix).before(new Date(FUtil.getUnixTime()));
}
public String bakeKickMessage()
{
final StringBuilder message = new StringBuilder(ChatColor.GOLD + "You");
if (!hasUsername())
{
message.append("r IP address is");
}
else if (!hasIps())
{
message.append("r username is");
}
else
{
message.append(" are");
}
message.append(" temporarily banned from this server.");
message.append("\nAppeal at ").append(ChatColor.BLUE)
.append(ConfigEntry.SERVER_BAN_URL.getString());
if (reason != null)
{
message.append("\n").append(ChatColor.RED).append("Reason: ").append(ChatColor.GOLD)
.append(ChatColor.translateAlternateColorCodes('&', reason));
}
if (by != null)
{
message.append("\n").append(ChatColor.RED).append("Banned by: ").append(ChatColor.GOLD)
.append(by);
}
if (at != null)
{
message.append("\n").append(ChatColor.RED).append("Issued: ").append(ChatColor.GOLD)
.append(DATE_FORMAT.format(at));
}
if (getExpiryUnix() != 0)
{
message.append("\n").append(ChatColor.RED).append("Expires: ").append(ChatColor.GOLD)
.append(DATE_FORMAT.format(FUtil.getUnixDate(expiryUnix)));
}
return message.toString();
}
@Override
public boolean equals(Object object)
{
if (object == null)
{
return false;
}
if (!(object instanceof Ban))
{
return false;
}
final Ban ban = (Ban)object;
if (hasIps() != ban.hasIps()
|| hasUsername() != ban.hasUsername())
{
return false;
}
if (hasIps() && !(getIps().equals(ban.getIps())))
{
return false;
}
return !(hasUsername() && !(getUsername().equalsIgnoreCase(ban.getUsername())));
}
private void dedupeIps()
{
Set<String> uniqueIps = new HashSet<>();
//Fancy Collections.removeIf lets you do all that while loop work in one lambda.
ips.removeIf(s -> !uniqueIps.add(s));
}
public List<String> getIps()
{
return ips;
}
public String getUsername()
{
return username;
}
public void setUsername(String username)
{
this.username = username;
}
public UUID getUuid()
{
return uuid;
}
public void setUuid(UUID uuid)
{
this.uuid = uuid;
}
public String getBy()
{
return by;
}
public void setBy(String by)
{
this.by = by;
}
public Date getAt()
{
return at;
}
public void setAt(Date at)
{
this.at = at;
}
public String getReason()
{
return reason;
}
public void setReason(String reason)
{
this.reason = reason;
}
public long getExpiryUnix()
{
return expiryUnix;
}
public void setExpiryUnix(long expiryUnix)
{
this.expiryUnix = expiryUnix;
}
}

View File

@ -0,0 +1,316 @@
package me.totalfreedom.totalfreedommod.banning;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerLoginEvent;
public class BanManager extends FreedomService
{
private final Set<Ban> bans = Sets.newHashSet();
private final Map<String, Ban> nameBans = Maps.newHashMap();
private final Map<UUID, Ban> uuidBans = Maps.newHashMap();
private final Map<String, Ban> ipBans = Maps.newHashMap();
//
@Override
public void onStart()
{
bans.clear();
try
{
ResultSet banSet = plugin.sql.getBanList();
{
while (banSet.next())
{
String name = banSet.getString("name");
UUID uuid = null;
String strUUID = banSet.getString("uuid");
if (strUUID != null)
{
uuid = UUID.fromString(strUUID);
}
List<String> ips = FUtil.stringToList(banSet.getString("ips"));
String by = banSet.getString("by");
Date at = new Date(banSet.getLong("at"));
Date expires = new Date(banSet.getLong("expires"));
String reason = banSet.getString("reason");
Ban ban = new Ban(name, uuid, ips, by, at, expires, reason);
bans.add(ban);
}
}
}
catch (SQLException e)
{
FLog.severe("Failed to load ban list: " + e.getMessage());
}
// Remove expired bans, repopulate ipBans and nameBans,
updateViews();
FLog.info("Loaded " + ipBans.size() + " IP bans and " + nameBans.size() + " username bans.");
}
@Override
public void onStop()
{
}
public Set<Ban> getAllBans()
{
return Collections.unmodifiableSet(bans);
}
public Collection<Ban> getIpBans()
{
return Collections.unmodifiableCollection(ipBans.values());
}
public Collection<Ban> getUsernameBans()
{
return Collections.unmodifiableCollection(nameBans.values());
}
public Ban getByIp(String ip)
{
final Ban directBan = ipBans.get(ip);
if (directBan != null && !directBan.isExpired())
{
return directBan;
}
// Match fuzzy IP
for (Ban loopBan : ipBans.values())
{
if (loopBan.isExpired())
{
continue;
}
for (String loopIp : loopBan.getIps())
{
if (!loopIp.contains("*"))
{
continue;
}
if (FUtil.fuzzyIpMatch(ip, loopIp, 4))
{
return loopBan;
}
}
}
return null;
}
public Ban getByUsername(String username)
{
username = username.toLowerCase();
final Ban directBan = nameBans.get(username);
if (directBan != null && !directBan.isExpired())
{
return directBan;
}
return null;
}
public Ban getByUUID(UUID uuid)
{
final Ban directBan = uuidBans.get(uuid);
if (directBan != null && !directBan.isExpired())
{
return directBan;
}
return null;
}
public Ban unbanIp(String ip)
{
final Ban ban = getByIp(ip);
if (ban != null)
{
bans.remove(ban);
}
return ban;
}
public Ban unbanUsername(String username)
{
final Ban ban = getByUsername(username);
if (ban != null)
{
bans.remove(ban);
}
return ban;
}
public boolean isIpBanned(String ip)
{
return getByIp(ip) != null;
}
public boolean isUsernameBanned(String username)
{
return getByUsername(username) != null;
}
public void addBan(Ban ban)
{
if (ban.getUsername() != null && getByUsername(ban.getUsername()) != null)
{
removeBan(ban);
}
else
{
for (String ip : ban.getIps())
{
if (getByIp(ip) != null)
{
removeBan(ban);
break;
}
}
}
if (bans.add(ban))
{
plugin.sql.addBan(ban);
updateViews();
}
}
public void removeBan(Ban ban)
{
if (bans.remove(ban))
{
plugin.sql.removeBan(ban);
updateViews();
}
}
public int purge()
{
int size = bans.size();
bans.clear();
updateViews();
plugin.sql.truncate("bans");
return size;
}
@EventHandler(priority = EventPriority.NORMAL)
public void onPlayerLogin(PlayerLoginEvent event)
{
final String username = event.getPlayer().getName();
final UUID uuid = event.getPlayer().getUniqueId();
final String ip = FUtil.getIp(event);
// Regular ban
Ban ban = getByUsername(username);
if (ban == null)
{
ban = getByUUID(uuid);
if (ban == null)
{
ban = getByIp(ip);
}
}
if (ban != null && !ban.isExpired())
{
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, ban.bakeKickMessage());
}
}
@EventHandler(priority = EventPriority.NORMAL)
public void onPlayerJoin(PlayerJoinEvent event)
{
final Player player = event.getPlayer();
if (!plugin.al.isAdmin(player))
{
return;
}
// Unban admins
Ban ban = getByUsername(player.getName());
if (ban != null)
{
removeBan(ban);
}
else
{
ban = getByIp(FUtil.getIp(player));
if (ban != null)
{
removeBan(ban);
}
}
}
private void updateViews()
{
// Remove expired bans
for (Ban ban : new ArrayList<>(bans))
{
if (ban.isExpired())
{
bans.remove(ban);
plugin.sql.removeBan(ban);
}
}
nameBans.clear();
uuidBans.clear();
ipBans.clear();
for (Ban ban : bans)
{
if (ban.hasUsername())
{
nameBans.put(ban.getUsername().toLowerCase(), ban);
}
if (ban.hasUUID())
{
uuidBans.put(ban.getUuid(), ban);
}
if (ban.hasIps())
{
for (String ip : ban.getIps())
{
ipBans.put(ip, ban);
}
}
}
}
}

View File

@ -0,0 +1,126 @@
package me.totalfreedom.totalfreedommod.banning;
import com.google.common.collect.Lists;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import me.totalfreedom.totalfreedommod.config.IConfig;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.configuration.ConfigurationSection;
public class IndefiniteBan implements IConfig
{
private final List<String> ips = Lists.newArrayList();
private String username = null;
private UUID uuid = null;
private String reason = null;
private Date expiry = null;
public IndefiniteBan()
{
}
@Override
public void loadFrom(ConfigurationSection cs)
{
this.username = cs.getName();
try
{
String strUUID = cs.getString("uuid", null);
if (strUUID != null)
{
UUID uuid = UUID.fromString(strUUID);
this.uuid = uuid;
}
}
catch (IllegalArgumentException e)
{
FLog.warning("Failed to load indefinite banned UUID for " + this.username + ". Make sure the UUID is in the correct format with dashes.");
}
this.ips.clear();
this.ips.addAll(cs.getStringList("ips"));
this.reason = cs.getString("reason", null);
String date = cs.getString("expiry", null);
try
{
this.expiry = date != null ? new SimpleDateFormat("yyyy-MM-dd").parse(date) : null;
}
catch (ParseException ex)
{
FLog.warning("Failed to load indefinite banned expiry for " + this.username + ". Make sure the expiry is in the correct format (yyyy-MM-dd).");
}
}
@Override
public void saveTo(ConfigurationSection cs)
{
// The indefinite ban list is only intended to be modified manually. It is not intended to save.
}
@Override
public boolean isValid()
{
return username != null;
}
public String getUsername()
{
return username;
}
public void setUsername(String username)
{
this.username = username;
}
public UUID getUuid()
{
return uuid;
}
public void setUuid(UUID uuid)
{
this.uuid = uuid;
}
public List<String> getIps()
{
return ips;
}
public String getReason()
{
return reason;
}
public void setReason(String reason)
{
this.reason = reason;
}
public Date getExpiry()
{
return expiry;
}
public void setExpiry(Date date)
{
this.expiry = date;
}
public boolean hasExpiry()
{
return this.expiry != null;
}
public boolean isExpired()
{
return hasExpiry() && expiry.before(new Date(FUtil.getUnixTime()));
}
}

View File

@ -0,0 +1,185 @@
package me.totalfreedom.totalfreedommod.banning;
import com.google.common.base.Strings;
import com.google.common.collect.Sets;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Set;
import java.util.UUID;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.config.YamlConfig;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.ChatColor;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerLoginEvent;
public class IndefiniteBanList extends FreedomService
{
public static final String CONFIG_FILENAME = "indefinitebans.yml";
private YamlConfig config;
private final Set<IndefiniteBan> indefBans = Sets.newHashSet();
private int nameBanCount = 0;
private int uuidBanCount = 0;
private int ipBanCount = 0;
private final SimpleDateFormat dateFormat = new SimpleDateFormat("dd MMM yyyy, zzzz");
@Override
public void onStart()
{
indefBans.clear();
config = new YamlConfig(plugin, CONFIG_FILENAME, true);
config.load();
for (String name : config.getKeys(false))
{
if (!config.isConfigurationSection(name))
{
FLog.warning("Could not load indefinite ban for " + name + ": Invalid format!");
continue;
}
IndefiniteBan indefBan = new IndefiniteBan();
ConfigurationSection cs = config.getConfigurationSection(name);
assert cs != null;
indefBan.loadFrom(cs);
if (!indefBan.isValid())
{
FLog.warning("Not adding indefinite ban for " + name + ": Missing information.");
continue;
}
if (indefBan.isExpired())
{
FLog.info("Removing " + name + " from indefinite ban list as the entry has expired!");
config.set(name, null);
continue;
}
indefBans.add(indefBan);
}
updateCount();
config.save();
FLog.info("Loaded " + nameBanCount + " indefinite name bans, " + uuidBanCount + " UUID bans, and " + ipBanCount + " ip bans");
}
@Override
public void onStop()
{
}
@EventHandler(priority = EventPriority.LOWEST)
public void onPlayerLogin(PlayerLoginEvent event)
{
final String username = event.getPlayer().getName();
final UUID uuid = event.getPlayer().getUniqueId();
final String ip = FUtil.getIp(event);
String bannedBy = "";
IndefiniteBan ban = null;
for (IndefiniteBan indefBan : indefBans)
{
if (username.equalsIgnoreCase(indefBan.getUsername()))
{
bannedBy = "username";
ban = indefBan;
break;
}
else if (indefBan.getUuid() != null && indefBan.getUuid().equals(uuid))
{
bannedBy = "UUID";
ban = indefBan;
break;
}
else if (indefBan.getIps().contains(ip))
{
bannedBy = "IP address";
ban = indefBan;
break;
}
}
if (ban != null)
{
if (ban.isExpired())
{
config.set(ban.getUsername(), null);
config.save();
return;
}
String kickMessage = ChatColor.RED + "Your " + bannedBy + " is "
+ (ban.hasExpiry() ? "" : "indefinitely ")
+ "banned from this server.";
String reason = ban.getReason();
if (!Strings.isNullOrEmpty(reason))
{
kickMessage += "\nReason: " + ChatColor.GOLD + reason;
}
Date expiry = ban.getExpiry();
if (expiry != null)
{
kickMessage += ChatColor.RED + "\nExpiry: " + ChatColor.GOLD + dateFormat.format(expiry);
}
String appealURL = ConfigEntry.SERVER_INDEFBAN_URL.getString();
if (!Strings.isNullOrEmpty(appealURL))
{
kickMessage += ChatColor.RED + "\n\nRelease procedures are available at\n" + ChatColor.GOLD + ConfigEntry.SERVER_INDEFBAN_URL.getString();
}
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, kickMessage);
}
}
private void updateCount()
{
nameBanCount = 0;
uuidBanCount = 0;
ipBanCount = 0;
for (IndefiniteBan indefBan : indefBans)
{
nameBanCount += 1;
if (indefBan.getUuid() != null)
{
uuidBanCount += 1;
}
ipBanCount += indefBan.getIps().size();
}
}
public Set<IndefiniteBan> getIndefBans()
{
return indefBans;
}
public int getNameBanCount()
{
return nameBanCount;
}
public int getUuidBanCount()
{
return uuidBanCount;
}
public int getIpBanCount()
{
return ipBanCount;
}
}

View File

@ -0,0 +1,187 @@
package me.totalfreedom.totalfreedommod.blocking;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.block.Skull;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.SkullMeta;
public class BlockBlocker extends FreedomService
{
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
@SuppressWarnings("deprecation")
@EventHandler(priority = EventPriority.HIGH)
public void onBlockPlace(BlockPlaceEvent event)
{
final Player player = event.getPlayer();
switch (event.getBlockPlaced().getType())
{
case LAVA:
{
if (!ConfigEntry.ALLOW_LAVA_PLACE.getBoolean())
{
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
player.sendMessage(ChatColor.GRAY + "Lava placement is currently disabled.");
event.setCancelled(true);
}
break;
}
case WATER:
{
if (!ConfigEntry.ALLOW_WATER_PLACE.getBoolean())
{
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
player.sendMessage(ChatColor.GRAY + "Water placement is currently disabled.");
event.setCancelled(true);
}
break;
}
case FIRE:
case SOUL_FIRE:
{
if (!ConfigEntry.ALLOW_FIRE_PLACE.getBoolean())
{
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
player.sendMessage(ChatColor.GRAY + "Fire placement is currently disabled.");
event.setCancelled(true);
}
break;
}
case STRUCTURE_BLOCK:
{
if (!ConfigEntry.ALLOW_MASTERBLOCKS.getBoolean())
{
player.sendMessage(ChatColor.GRAY + "Structure blocks are disabled.");
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
event.setCancelled(true);
}
break;
}
case JIGSAW:
{
if (!ConfigEntry.ALLOW_MASTERBLOCKS.getBoolean())
{
player.sendMessage(ChatColor.GRAY + "Jigsaws are disabled.");
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
event.setCancelled(true);
}
break;
}
case REPEATING_COMMAND_BLOCK:
case CHAIN_COMMAND_BLOCK:
case COMMAND_BLOCK:
if (!ConfigEntry.ALLOW_MASTERBLOCKS.getBoolean())
{
player.sendMessage(ChatColor.GRAY + "Command blocks are disabled.");
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
event.setCancelled(true);
}
break;
case GRINDSTONE:
{
if (!ConfigEntry.ALLOW_GRINDSTONES.getBoolean())
{
player.sendMessage(ChatColor.GRAY + "Grindstones are disabled.");
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
event.setCancelled(true);
}
break;
}
case JUKEBOX:
{
if (!ConfigEntry.ALLOW_JUKEBOXES.getBoolean())
{
player.sendMessage(ChatColor.GRAY + "Jukeboxes are disabled.");
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
event.setCancelled(true);
}
break;
}
case SPAWNER:
{
if (!ConfigEntry.ALLOW_SPAWNERS.getBoolean())
{
player.sendMessage(ChatColor.GRAY + "Spawners are disabled.");
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
event.setCancelled(true);
}
break;
}
case BEEHIVE:
case BEE_NEST:
{
if (!ConfigEntry.ALLOW_BEEHIVES.getBoolean())
{
player.sendMessage(ChatColor.GRAY + "Beehives are disabled.");
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
event.setCancelled(true);
}
break;
}
case PLAYER_HEAD:
case PLAYER_WALL_HEAD:
{
Skull skull = (Skull)event.getBlockPlaced().getState();
if (skull.getOwner() != null)
{
if (skull.getOwner().contains("\u00A7"))
{
skull.setOwner(skull.getOwner().replace("\u00A7", ""));
SkullMeta meta = (SkullMeta)event.getItemInHand().getItemMeta();
if (meta != null)
{
ItemStack newHead = new ItemStack(Material.PLAYER_HEAD, 1);
ItemMeta headMeta = newHead.getItemMeta();
assert headMeta != null;
headMeta.setDisplayName(ChatColor.YELLOW + "C-sectioned Head");
newHead.setItemMeta(headMeta);
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), newHead);
player.sendMessage(ChatColor.GRAY + "The player head you are attempting to place has a section symbol. Your player head has been C-sectioned.");
event.setCancelled(true);
}
}
if (skull.getOwner().length() > 100)
{
player.sendMessage(ChatColor.GRAY + "Instead of using Pi to crash players, be useful with your life and use it to discover things.");
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
event.setCancelled(true);
}
}
break;
}
case RESPAWN_ANCHOR:
{
if (!ConfigEntry.ALLOW_RESPAWN_ANCHORS.getBoolean())
{
player.sendMessage(ChatColor.GRAY + "Respawn anchors are disabled.");
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
event.setCancelled(true);
}
break;
}
default:
{
// Do nothing
break;
}
}
}
}

View File

@ -0,0 +1,61 @@
package me.totalfreedom.totalfreedommod.blocking;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.util.FSync;
import org.bukkit.ChatColor;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockPlaceEvent;
public class EditBlocker extends FreedomService
{
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
@EventHandler(priority = EventPriority.LOW)
public void onBlockPlace(BlockPlaceEvent event)
{
FPlayer fPlayer = plugin.pl.getPlayerSync(event.getPlayer());
if (!fPlayer.isEditBlocked())
{
return;
}
if (plugin.al.isAdminSync(event.getPlayer()))
{
fPlayer.setEditBlocked(false);
return;
}
FSync.playerMsg(event.getPlayer(), ChatColor.RED + "Your ability to place blocks has been disabled!");
event.setCancelled(true);
}
@EventHandler(priority = EventPriority.LOW)
public void onBlockBreak(BlockBreakEvent event)
{
FPlayer fPlayer = plugin.pl.getPlayerSync(event.getPlayer());
if (!fPlayer.isEditBlocked())
{
return;
}
if (plugin.al.isAdminSync(event.getPlayer()))
{
fPlayer.setEditBlocked(false);
return;
}
FSync.playerMsg(event.getPlayer(), ChatColor.RED + "Your ability to destroy blocks has been disabled!");
event.setCancelled(true);
}
}

View File

@ -0,0 +1,287 @@
package me.totalfreedom.totalfreedommod.blocking;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import me.totalfreedom.scissors.event.block.MasterBlockFireEvent;
import io.papermc.paper.event.player.PlayerSignCommandPreprocessEvent;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.util.FUtil;
import me.totalfreedom.totalfreedommod.util.Groups;
import org.bukkit.Material;
import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeModifier;
import org.bukkit.block.data.AnaloguePowerable;
import org.bukkit.block.data.Powerable;
import org.bukkit.entity.Entity;
import org.bukkit.entity.FallingBlock;
import org.bukkit.entity.Tameable;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.block.*;
import org.bukkit.event.entity.EntityCombustEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityDeathEvent;
import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.event.entity.EntitySpawnEvent;
import org.bukkit.event.entity.ExplosionPrimeEvent;
import org.bukkit.event.entity.FireworkExplodeEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerRespawnEvent;
public class EventBlocker extends FreedomService
{
/**
* /@EventHandler(priority = EventPriority.HIGH)
* /public void onBlockRedstone(BlockRedstoneEvent event)
* /{
* / if (!ConfigEntry.ALLOW_REDSTONE.getBoolean())
* / {
* / event.setNewCurrent(0);
* / }
* /}
**/
// TODO: Revert back to old redstone block system when (or if) it is fixed in Bukkit, Spigot or Paper.
private final ArrayList<Material> redstoneBlocks = new ArrayList<>(Arrays.asList(Material.REDSTONE, Material.DISPENSER, Material.DROPPER, Material.REDSTONE_LAMP));
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
@EventHandler(priority = EventPriority.HIGH)
public void onBlockBurn(BlockBurnEvent event)
{
if (!ConfigEntry.ALLOW_FIRE_SPREAD.getBoolean())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onBlockIgnite(BlockIgniteEvent event)
{
if (!ConfigEntry.ALLOW_FIRE_PLACE.getBoolean())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onBlockFromTo(BlockFromToEvent event)
{
if (!ConfigEntry.ALLOW_FLUID_SPREAD.getBoolean())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onEntityExplode(EntityExplodeEvent event)
{
if (!ConfigEntry.ALLOW_EXPLOSIONS.getBoolean())
{
event.blockList().clear();
return;
}
event.setYield(0.0F);
}
@EventHandler(priority = EventPriority.HIGH)
public void onExplosionPrime(ExplosionPrimeEvent event)
{
if (!ConfigEntry.ALLOW_EXPLOSIONS.getBoolean())
{
event.setCancelled(true);
return;
}
event.setRadius(ConfigEntry.EXPLOSIVE_RADIUS.getDouble().floatValue());
}
@EventHandler(priority = EventPriority.HIGH)
public void onBlockExplode(BlockExplodeEvent event)
{
if (!ConfigEntry.ALLOW_EXPLOSIONS.getBoolean())
{
event.setCancelled(true);
return;
}
event.setYield(ConfigEntry.EXPLOSIVE_RADIUS.getDouble().floatValue());
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onMasterBlockFire(MasterBlockFireEvent event)
{
if (!ConfigEntry.ALLOW_MASTERBLOCKS.getBoolean())
{
event.setCancelled(true);
event.getAt().getBlock().setType(Material.CAKE);
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onEntityCombust(EntityCombustEvent event)
{
if (!ConfigEntry.ALLOW_EXPLOSIONS.getBoolean())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onEntityDeath(EntityDeathEvent event)
{
if (ConfigEntry.AUTO_ENTITY_WIPE.getBoolean())
{
event.setDroppedExp(0);
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onEntityDamage(EntityDamageEvent event)
{
if ((event.getCause() == EntityDamageEvent.DamageCause.LAVA)
&& !ConfigEntry.ALLOW_LAVA_DAMAGE.getBoolean())
{
event.setCancelled(true);
return;
}
if (ConfigEntry.ENABLE_PET_PROTECT.getBoolean())
{
Entity entity = event.getEntity();
if (entity instanceof Tameable tameable && tameable.isTamed())
{
event.setCancelled(true);
}
}
}
@EventHandler(priority = EventPriority.NORMAL)
public void onPlayerDropItem(PlayerDropItemEvent event)
{
if (!plugin.al.isAdmin(event.getPlayer()))
{
event.setCancelled(true);
}
if (!ConfigEntry.AUTO_ENTITY_WIPE.getBoolean())
{
return;
}
if (event.getPlayer().getWorld().getEntities().size() > 750)
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.NORMAL)
public void onLeavesDecay(LeavesDecayEvent event)
{
event.setCancelled(true);
}
@EventHandler(priority = EventPriority.NORMAL)
public void onBlockGrowth(BlockGrowEvent event)
{
event.setCancelled(true);
}
@EventHandler(priority = EventPriority.HIGH)
public void onFireworkExplode(FireworkExplodeEvent event)
{
if (!ConfigEntry.ALLOW_FIREWORK_EXPLOSION.getBoolean())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onBlockPistonRetract(BlockPistonRetractEvent event)
{
if (!ConfigEntry.ALLOW_REDSTONE.getBoolean())
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onBlockPistonExtend(BlockPistonExtendEvent event)
{
if (!ConfigEntry.ALLOW_REDSTONE.getBoolean())
{
event.setCancelled(true);
}
}
@EventHandler
public void onEntitySpawn(EntitySpawnEvent event)
{
if (!ConfigEntry.ALLOW_GRAVITY.getBoolean() && event.getEntity() instanceof FallingBlock)
{
event.setCancelled(true);
}
}
@EventHandler
public void onBlockPhysics(BlockPhysicsEvent event)
{
if (!ConfigEntry.ALLOW_REDSTONE.getBoolean())
{
// Check if the block is involved with redstone.
if (event.getBlock().getBlockData() instanceof AnaloguePowerable || event.getBlock().getBlockData() instanceof Powerable || redstoneBlocks.contains(event.getBlock().getType()))
{
event.setCancelled(true);
}
}
}
@EventHandler(priority = EventPriority.NORMAL)
public void onPlayerRespawn(PlayerRespawnEvent event)
{
double maxHealth = Objects.requireNonNull(event.getPlayer().getAttribute(Attribute.GENERIC_MAX_HEALTH)).getValue();
if (maxHealth < 1)
{
for (AttributeModifier attributeModifier : Objects.requireNonNull(event.getPlayer().getAttribute(Attribute.GENERIC_MAX_HEALTH)).getModifiers())
{
Objects.requireNonNull(event.getPlayer().getAttribute(Attribute.GENERIC_MAX_HEALTH)).removeModifier(attributeModifier);
}
}
}
@EventHandler(priority = EventPriority.NORMAL)
public void onBlockDispense(BlockDispenseEvent event)
{
List<Material> banned = Arrays.asList(Material.TNT_MINECART, Material.MINECART);
if (Groups.SPAWN_EGGS.contains(event.getItem().getType()) || banned.contains(event.getItem().getType()))
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.NORMAL)
public void onPlayerDeath(PlayerDeathEvent event)
{
FUtil.fixCommandVoid(event.getEntity());
event.setDeathMessage(event.getDeathMessage());
}
@EventHandler
public void onSignInteract(PlayerSignCommandPreprocessEvent event)
{
event.setCancelled(true);
}
}

View File

@ -0,0 +1,191 @@
package me.totalfreedom.totalfreedommod.blocking;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.util.Groups;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerBedEnterEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.ItemStack;
public class InteractBlocker extends FreedomService
{
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerInteract(PlayerInteractEvent event)
{
switch (event.getAction())
{
case RIGHT_CLICK_AIR:
case RIGHT_CLICK_BLOCK:
{
handleRightClick(event);
break;
}
default:
{
// Do nothing
break;
}
}
}
@EventHandler(priority = EventPriority.HIGH)
public void onRightClickBell(PlayerInteractEvent event)
{
if (event.getClickedBlock() != null && event.getClickedBlock().getType().equals(Material.BELL) && !ConfigEntry.ALLOW_BELLS.getBoolean())
{
event.setCancelled(true);
}
}
@EventHandler
public void onBedEnter(PlayerBedEnterEvent event)
{
Player player = event.getPlayer();
if (Groups.EXPLOSIVE_BED_BIOMES.contains(event.getBed().getBiome()))
{
player.sendMessage(ChatColor.RED + "You may not sleep here.");
event.setCancelled(true);
}
}
private void handleRightClick(PlayerInteractEvent event)
{
final Player player = event.getPlayer();
final Block clickedBlock = event.getClickedBlock();
if (clickedBlock != null && clickedBlock.getType() == Material.RESPAWN_ANCHOR && !ConfigEntry.ALLOW_RESPAWN_ANCHORS.getBoolean())
{
event.setCancelled(true);
return;
}
if (Groups.SPAWN_EGGS.contains(event.getMaterial()))
{
event.setCancelled(true);
EntityType eggType = null;
try
{
Material mat = event.getMaterial();
if (mat == Material.MOOSHROOM_SPAWN_EGG)
{
eggType = EntityType.MUSHROOM_COW;
}
else
{
eggType = EntityType.valueOf(mat.name().substring(0, mat.name().length() - 10));
}
}
catch (IllegalArgumentException ignored)
{
//
}
if (eggType != null && clickedBlock != null)
{
clickedBlock.getWorld().spawnEntity(clickedBlock.getLocation().add(event.getBlockFace().getDirection()).add(0.5, 0.5, 0.5), eggType);
}
return;
}
switch (event.getMaterial())
{
case WATER_BUCKET:
{
if (plugin.al.isAdmin(player) || ConfigEntry.ALLOW_WATER_PLACE.getBoolean())
{
break;
}
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
player.sendMessage(ChatColor.GRAY + "Water buckets are currently disabled.");
event.setCancelled(true);
break;
}
case LAVA_BUCKET:
{
if (plugin.al.isAdmin(player) || ConfigEntry.ALLOW_LAVA_PLACE.getBoolean())
{
break;
}
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
player.sendMessage(ChatColor.GRAY + "Lava buckets are currently disabled.");
event.setCancelled(true);
break;
}
case TNT_MINECART:
{
if (ConfigEntry.ALLOW_TNT_MINECARTS.getBoolean())
{
break;
}
player.getInventory().clear(player.getInventory().getHeldItemSlot());
player.sendMessage(ChatColor.GRAY + "TNT minecarts are currently disabled.");
event.setCancelled(true);
break;
}
case ARMOR_STAND:
{
if (ConfigEntry.ALLOW_ARMOR_STANDS.getBoolean())
{
break;
}
player.getInventory().clear(player.getInventory().getHeldItemSlot());
player.sendMessage(ChatColor.GRAY + "Armor stands are currently disabled.");
event.setCancelled(true);
break;
}
case MINECART:
{
if (ConfigEntry.ALLOW_MINECARTS.getBoolean())
{
break;
}
player.getInventory().clear(player.getInventory().getHeldItemSlot());
player.sendMessage(ChatColor.GRAY + "Minecarts are currently disabled.");
event.setCancelled(true);
break;
}
case WRITTEN_BOOK:
{
if (ConfigEntry.ALLOW_BOOKS.getBoolean())
{
break;
}
player.getInventory().clear(player.getInventory().getHeldItemSlot());
player.sendMessage(ChatColor.GRAY + "Books are currently disabled.");
event.setCancelled(true);
break;
}
default:
{
// Do nothing
break;
}
}
}
}

View File

@ -0,0 +1,134 @@
package me.totalfreedom.totalfreedommod.blocking;
import java.util.Objects;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import org.bukkit.attribute.Attributable;
import org.bukkit.attribute.Attribute;
import org.bukkit.entity.Bat;
import org.bukkit.entity.EnderDragon;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Ghast;
import org.bukkit.entity.Giant;
import org.bukkit.entity.HumanEntity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Slime;
import org.bukkit.entity.Wither;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.event.entity.EntitySpawnEvent;
public class MobBlocker extends FreedomService
{
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
//fixes crash mobs, credit to Mafrans
@EventHandler(priority = EventPriority.NORMAL)
public void onEntitySpawn(EntitySpawnEvent e)
{
if (!(e instanceof LivingEntity))
{
return;
}
Entity entity = e.getEntity();
if (entity instanceof Attributable)
{
if (Objects.requireNonNull(((Attributable)entity).getAttribute(Attribute.GENERIC_FOLLOW_RANGE)).getBaseValue() > 255.0)
{
Objects.requireNonNull(((Attributable)entity).getAttribute(Attribute.GENERIC_FOLLOW_RANGE)).setBaseValue(255.0);
}
if (Objects.requireNonNull(((Attributable)entity).getAttribute(Attribute.GENERIC_MOVEMENT_SPEED)).getBaseValue() > 10.0)
{
Objects.requireNonNull(((Attributable)entity).getAttribute(Attribute.GENERIC_MOVEMENT_SPEED)).setBaseValue(10.0);
}
}
}
@EventHandler(priority = EventPriority.NORMAL)
public void onCreatureSpawn(CreatureSpawnEvent event)
{
if (!ConfigEntry.MOB_LIMITER_ENABLED.getBoolean())
{
return;
}
final Entity spawned = event.getEntity();
if (spawned instanceof EnderDragon)
{
if (ConfigEntry.MOB_LIMITER_DISABLE_DRAGON.getBoolean())
{
event.setCancelled(true);
return;
}
}
else if (spawned instanceof Ghast)
{
if (ConfigEntry.MOB_LIMITER_DISABLE_GHAST.getBoolean())
{
event.setCancelled(true);
return;
}
}
else if (spawned instanceof Slime)
{
if (ConfigEntry.MOB_LIMITER_DISABLE_SLIME.getBoolean())
{
event.setCancelled(true);
return;
}
}
else if (spawned instanceof Wither)
{
if (ConfigEntry.MOB_LIMITER_DISABLE_DRAGON.getBoolean())
{
event.setCancelled(true);
return;
}
}
else if (spawned instanceof Giant)
{
if (ConfigEntry.MOB_LIMITER_DISABLE_GIANT.getBoolean())
{
event.setCancelled(true);
return;
}
}
else if (spawned instanceof Bat)
{
event.setCancelled(true);
return;
}
int mobLimiterMax = ConfigEntry.MOB_LIMITER_MAX.getInteger();
if (mobLimiterMax <= 0)
{
return;
}
int mobcount = 0;
for (Entity entity : Objects.requireNonNull(event.getLocation().getWorld()).getLivingEntities())
{
if (!(entity instanceof HumanEntity) && entity instanceof LivingEntity)
{
mobcount++;
}
}
if (mobcount > mobLimiterMax)
{
event.setCancelled(true);
}
}
}

View File

@ -0,0 +1,97 @@
package me.totalfreedom.totalfreedommod.blocking;
import me.totalfreedom.totalfreedommod.FreedomService;
import org.bukkit.ChatColor;
import org.bukkit.GameMode;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.FishHook;
import org.bukkit.entity.Player;
import org.bukkit.entity.SpectralArrow;
import org.bukkit.entity.Trident;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
public class PVPBlocker extends FreedomService
{
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
@EventHandler(priority = EventPriority.LOW)
public void onEntityDamageByEntity(EntityDamageByEntityEvent event)
{
Player player = null;
Player target = null;
if (event.getEntity() instanceof Player)
{
target = (Player)event.getEntity();
if (event.getDamager() instanceof Player)
{
player = (Player)event.getDamager();
}
else if (event.getDamager() instanceof Arrow)
{
Arrow arrow = (Arrow)event.getDamager();
if (arrow.getShooter() instanceof Player)
{
player = (Player)arrow.getShooter();
}
}
else if (event.getDamager() instanceof SpectralArrow)
{
SpectralArrow spectralArrow = (SpectralArrow)event.getDamager();
if (spectralArrow.getShooter() instanceof Player)
{
player = (Player)spectralArrow.getShooter();
}
}
else if (event.getDamager() instanceof Trident)
{
Trident trident = (Trident)event.getDamager();
if (trident.getShooter() instanceof Player)
{
player = (Player)trident.getShooter();
}
}
else if (event.getDamager() instanceof FishHook)
{
FishHook fishhook = (FishHook)event.getDamager();
if (fishhook.getShooter() instanceof Player)
{
player = (Player)fishhook.getShooter();
}
}
}
if (player != null & !plugin.al.isAdmin(player))
{
if (player.getGameMode() == GameMode.CREATIVE)
{
player.sendMessage(ChatColor.RED + "Creative PvP is not allowed!");
event.setCancelled(true);
}
else if (plugin.esb.getEssentialsUser(player.getName()).isGodModeEnabled())
{
player.sendMessage(ChatColor.RED + "God mode PvP is not allowed!");
event.setCancelled(true);
}
else if (plugin.pl.getPlayer(target).isPvpBlocked())
{
player.sendMessage(ChatColor.RED + target.getName() + " has PvP disabled!");
event.setCancelled(true);
}
else if (plugin.pl.getPlayer(player).isPvpBlocked())
{
player.sendMessage(ChatColor.RED + "You have PvP disabled!");
event.setCancelled(true);
}
}
}
}

View File

@ -0,0 +1,85 @@
package me.totalfreedom.totalfreedommod.blocking;
import java.util.Collection;
import me.totalfreedom.totalfreedommod.FreedomService;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.entity.ThrownPotion;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.LingeringPotionSplashEvent;
import org.bukkit.event.entity.PotionSplashEvent;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import org.bukkit.projectiles.ProjectileSource;
public class PotionBlocker extends FreedomService
{
public static final int POTION_BLOCK_RADIUS_SQUARED = 20 * 20;
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onThrowPotion(PotionSplashEvent event)
{
ThrownPotion potion = event.getEntity();
ProjectileSource projectileSource = potion.getShooter();
Player player = null;
if (projectileSource instanceof Player)
{
player = (Player)projectileSource;
}
if (isDeathPotion(potion.getEffects()))
{
if (player != null)
{
player.sendMessage(ChatColor.RED + "You are not allowed to use death potions.");
}
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onThrowLingeringPotion(LingeringPotionSplashEvent event)
{
ThrownPotion potion = event.getEntity();
ProjectileSource projectileSource = potion.getShooter();
Player player = null;
if (projectileSource instanceof Player)
{
player = (Player)projectileSource;
}
if (isDeathPotion(potion.getEffects()))
{
if (player != null)
{
player.sendMessage(ChatColor.RED + "You are not allowed to use death potions.");
}
event.setCancelled(true);
}
}
public boolean isDeathPotion(Collection<PotionEffect> effects)
{
for (PotionEffect effect : effects)
{
int amplifier = effect.getAmplifier();
if (effect.getType().equals(PotionEffectType.HEAL) && (amplifier == 29 || amplifier == 61 || amplifier == 93 || amplifier == 125))
{
return true;
}
}
return false;
}
}

View File

@ -0,0 +1,231 @@
package me.totalfreedom.totalfreedommod.blocking.command;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import java.lang.reflect.Field;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandMap;
import org.bukkit.command.CommandSender;
import org.bukkit.command.SimpleCommandMap;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
import org.bukkit.plugin.SimplePluginManager;
public class CommandBlocker extends FreedomService
{
private final Pattern whitespacePattern = Pattern.compile("^/?( +)(.*)?");
private final Pattern flagPattern = Pattern.compile("(:([0-9]){5,})");
//
private final Map<String, CommandBlockerEntry> entryList = Maps.newHashMap();
private final List<String> unknownCommands = Lists.newArrayList();
public static CommandMap getCommandMap()
{
try
{
SimplePluginManager simplePluginManager = (SimplePluginManager)Bukkit.getServer().getPluginManager();
Field commandMapField = SimplePluginManager.class.getDeclaredField("commandMap");
commandMapField.setAccessible(true);
return (SimpleCommandMap)commandMapField.get(simplePluginManager);
}
catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e)
{
FLog.severe("Failed to get command map field (" + e.getMessage() + ")");
}
return null;
}
@Override
public void onStart()
{
load();
}
@Override
public void onStop()
{
entryList.clear();
}
public void load()
{
entryList.clear();
unknownCommands.clear();
final CommandMap commandMap = getCommandMap();
@SuppressWarnings("unchecked")
List<String> blockedCommands = (List<String>)ConfigEntry.BLOCKED_COMMANDS.getList();
for (String rawEntry : blockedCommands)
{
final String[] parts = rawEntry.split(":");
if (parts.length < 3 || parts.length > 4)
{
FLog.warning("Invalid command blocker entry: " + rawEntry);
continue;
}
final CommandBlockerRank rank = CommandBlockerRank.fromToken(parts[0]);
final CommandBlockerAction action = CommandBlockerAction.fromToken(parts[1]);
String commandName = parts[2].toLowerCase().substring(1);
final String message = (parts.length > 3 ? parts[3] : null);
if (rank == null || action == null || commandName.isEmpty())
{
FLog.warning("Invalid command blocker entry: " + rawEntry);
continue;
}
final String[] commandParts = commandName.split(" ");
String subCommand = null;
if (commandParts.length > 1)
{
commandName = commandParts[0];
subCommand = StringUtils.join(commandParts, " ", 1, commandParts.length).trim().toLowerCase();
}
assert commandMap != null;
final Command command = commandMap.getCommand(commandName);
// Obtain command from alias
if (command == null)
{
unknownCommands.add(commandName);
}
else
{
commandName = command.getName().toLowerCase();
}
if (entryList.containsKey(commandName))
{
FLog.warning("Not blocking: /" + commandName + " - Duplicate entry exists!");
continue;
}
final CommandBlockerEntry blockedCommandEntry = new CommandBlockerEntry(rank, action, commandName, subCommand, message);
entryList.put(commandName, blockedCommandEntry);
if (command != null)
{
for (String alias : command.getAliases())
{
entryList.put(alias.toLowerCase(), blockedCommandEntry);
}
}
}
FLog.info("Loaded " + blockedCommands.size() + " blocked commands (" + (blockedCommands.size() - unknownCommands.size()) + " known).");
}
@EventHandler(priority = EventPriority.HIGHEST)
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event)
{
// Blocked commands
if (isCommandBlocked(event.getMessage(), event.getPlayer(), true))
{
// CommandBlocker handles messages and broadcasts
event.setCancelled(true);
}
}
public boolean isCommandBlocked(String command, CommandSender sender)
{
return isCommandBlocked(command, sender, false);
}
public boolean isCommandBlocked(String command, CommandSender sender, boolean doAction)
{
if (command == null || command.isEmpty())
{
return false;
}
// Format
command = command.toLowerCase().trim();
// Whitespaces
Matcher whitespaceMatcher = whitespacePattern.matcher(command);
if (whitespaceMatcher.matches() && whitespaceMatcher.groupCount() == 2)
{
command = whitespaceMatcher.group(2);
}
command = command.startsWith("/") ? command.substring(1) : command;
// Check for plugin specific commands
final String[] commandParts = command.split(" ");
if (commandParts[0].contains(":"))
{
if (doAction)
{
FUtil.playerMsg(sender, "Plugin specific commands are disabled.");
}
return true;
}
for (String part : commandParts)
{
if (command.startsWith("/") && !plugin.al.isAdmin(sender) && (part.contains("#copy") || part.contains("#clipboard")))
{
FUtil.playerMsg(sender, "WorldEdit copy variables are disabled.");
return true;
}
Matcher matcher = flagPattern.matcher(part);
if (!matcher.matches())
{
continue;
}
if (doAction)
{
FUtil.playerMsg(sender, "That command contains an illegal number: " + matcher.group(1));
}
return true;
}
// Obtain sub command, if it exists
String subCommand = null;
if (commandParts.length > 1)
{
subCommand = StringUtils.join(commandParts, " ", 1, commandParts.length).toLowerCase();
}
// Obtain entry
final CommandBlockerEntry entry = entryList.get(commandParts[0]);
if (entry == null)
{
return false;
}
// Validate sub command
if (entry.getSubCommand() != null && (subCommand == null || !subCommand.startsWith(entry.getSubCommand())))
{
return false;
}
if (entry.getRank().hasPermission(sender))
{
return false;
}
if (doAction)
{
entry.doActions(sender);
}
return true;
}
}

View File

@ -0,0 +1,32 @@
package me.totalfreedom.totalfreedommod.blocking.command;
public enum CommandBlockerAction
{
BLOCK("b"),
BLOCK_AND_EJECT("a"),
BLOCK_UNKNOWN("u");
private final String token;
CommandBlockerAction(String token)
{
this.token = token;
}
public static CommandBlockerAction fromToken(String token)
{
for (CommandBlockerAction action : CommandBlockerAction.values())
{
if (action.getToken().equalsIgnoreCase(token))
{
return action;
}
}
return null;
}
public String getToken()
{
return this.token;
}
}

View File

@ -0,0 +1,78 @@
package me.totalfreedom.totalfreedommod.blocking.command;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class CommandBlockerEntry
{
private final CommandBlockerRank rank;
private final CommandBlockerAction action;
private final String command;
private final String subCommand;
private final String message;
public CommandBlockerEntry(CommandBlockerRank rank, CommandBlockerAction action, String command, String message)
{
this(rank, action, command, null, message);
}
public CommandBlockerEntry(CommandBlockerRank rank, CommandBlockerAction action, String command, String subCommand, String message)
{
this.rank = rank;
this.action = action;
this.command = command;
this.subCommand = ((subCommand == null) ? null : subCommand.toLowerCase().trim());
this.message = ((message == null || message.equals("_")) ? "That command is blocked." : message);
}
public void doActions(CommandSender sender)
{
if (action == CommandBlockerAction.BLOCK_AND_EJECT && sender instanceof Player)
{
TotalFreedomMod.getPlugin().ae.autoEject((Player)sender, "You used a prohibited command: " + command);
FUtil.bcastMsg(sender.getName() + " was automatically kicked for using harmful commands.", ChatColor.RED);
return;
}
if (action == CommandBlockerAction.BLOCK_UNKNOWN)
{
sender.sendMessage(Bukkit.spigot().getSpigotConfig().getString("messages.unknown-command"));
return;
}
FUtil.playerMsg(sender, FUtil.colorize(message));
}
public CommandBlockerRank getRank()
{
return rank;
}
public CommandBlockerAction getAction()
{
return action;
}
public String getCommand()
{
return command;
}
public String getSubCommand()
{
return subCommand;
}
public String getMessage()
{
return message;
}
}

View File

@ -0,0 +1,64 @@
package me.totalfreedom.totalfreedommod.blocking.command;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.admin.Admin;
import me.totalfreedom.totalfreedommod.rank.Rank;
import org.bukkit.command.CommandSender;
public enum CommandBlockerRank
{
EVERYONE("e"),
OP("o"),
ADMIN("a"),
SENIOR_ADMIN("s"),
NOBODY("n");
//
private final String token;
CommandBlockerRank(String token)
{
this.token = token;
}
public static CommandBlockerRank fromSender(CommandSender sender)
{
Admin admin = TotalFreedomMod.getPlugin().al.getAdmin(sender);
if (admin != null)
{
if (admin.getRank() == Rank.SENIOR_ADMIN)
{
return SENIOR_ADMIN;
}
return ADMIN;
}
if (sender.isOp())
{
return OP;
}
return EVERYONE;
}
public static CommandBlockerRank fromToken(String token)
{
for (CommandBlockerRank rank : CommandBlockerRank.values())
{
if (rank.getToken().equalsIgnoreCase(token))
{
return rank;
}
}
return EVERYONE;
}
public String getToken()
{
return this.token;
}
public boolean hasPermission(CommandSender sender)
{
return fromSender(sender).ordinal() >= ordinal();
}
}

View File

@ -0,0 +1,177 @@
package me.totalfreedom.totalfreedommod.bridge;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import me.totalfreedom.bukkittelnet.BukkitTelnet;
import me.totalfreedom.bukkittelnet.api.TelnetCommandEvent;
import me.totalfreedom.bukkittelnet.api.TelnetPreLoginEvent;
import me.totalfreedom.bukkittelnet.api.TelnetRequestDataTagsEvent;
import me.totalfreedom.bukkittelnet.session.ClientSession;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.admin.Admin;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FLog;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.plugin.Plugin;
public class BukkitTelnetBridge extends FreedomService
{
private BukkitTelnet bukkitTelnetPlugin = null;
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
@EventHandler(priority = EventPriority.NORMAL)
public void onTelnetPreLogin(TelnetPreLoginEvent event)
{
final String ip = event.getIp();
if (ip == null || ip.isEmpty())
{
return;
}
final Admin admin = plugin.al.getEntryByIp(ip);
if (admin == null || !admin.isActive() || !admin.getRank().hasConsoleVariant())
{
return;
}
event.setBypassPassword(true);
event.setName(admin.getName());
}
@EventHandler(priority = EventPriority.NORMAL)
public void onTelnetCommand(TelnetCommandEvent event)
{
if (plugin.cb.isCommandBlocked(event.getCommand(), event.getSender()))
{
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.NORMAL)
public void onTelnetRequestDataTags(TelnetRequestDataTagsEvent event)
{
for (Map.Entry<Player, Map<String, Object>> entry : event.getDataTags().entrySet())
{
final Player player = entry.getKey();
final Map<String, Object> playerTags = entry.getValue();
boolean isAdmin = false;
boolean isTelnetAdmin = false;
boolean isSeniorAdmin = false;
final Admin admin = plugin.al.getAdmin(player);
if (admin != null)
{
boolean active = admin.isActive();
isAdmin = active;
isSeniorAdmin = active && admin.getRank() == Rank.SENIOR_ADMIN;
isTelnetAdmin = active && (isSeniorAdmin || admin.getRank() == Rank.ADMIN);
}
playerTags.put("tfm.admin.isAdmin", isAdmin);
playerTags.put("tfm.admin.isTelnetAdmin", isTelnetAdmin);
playerTags.put("tfm.admin.isSeniorAdmin", isSeniorAdmin);
playerTags.put("tfm.playerdata.getTag", plugin.pl.getPlayer(player).getTag());
if (server.getPluginManager().isPluginEnabled("Essentials"))
{
playerTags.put("tfm.essentialsBridge.getNickname", plugin.esb.getNickname(player.getName()));
}
}
}
public BukkitTelnet getBukkitTelnetPlugin()
{
if (bukkitTelnetPlugin == null)
{
try
{
final Plugin bukkitTelnet = server.getPluginManager().getPlugin("BukkitTelnet");
if (bukkitTelnet instanceof BukkitTelnet)
{
bukkitTelnetPlugin = (BukkitTelnet)bukkitTelnet;
}
}
catch (Exception ex)
{
FLog.severe(ex);
}
}
return bukkitTelnetPlugin;
}
public List<Admin> getConnectedAdmins()
{
List<Admin> admins = new ArrayList<>();
final BukkitTelnet telnet = getBukkitTelnetPlugin();
if (telnet != null)
{
for (ClientSession session : telnet.appender.getSessions())
{
Admin admin = plugin.al.getEntryByName(session.getUserName().toLowerCase());
if (admin != null && !admins.contains(admin))
{
admins.add(admin);
}
}
}
return admins;
}
public void killTelnetSessions(final String name)
{
try
{
final List<ClientSession> sessionsToRemove = new ArrayList<>();
final BukkitTelnet telnet = getBukkitTelnetPlugin();
if (telnet != null)
{
for (ClientSession session : telnet.appender.getSessions())
{
if (name != null && name.equalsIgnoreCase(session.getUserName()))
{
sessionsToRemove.add(session);
}
}
for (final ClientSession session : sessionsToRemove)
{
try
{
telnet.appender.removeSession(session);
session.syncTerminateSession();
}
catch (Exception ex)
{
FLog.severe("Error removing single telnet session: " + ex.getMessage());
}
}
FLog.info(sessionsToRemove.size() + " telnet session(s) removed.");
}
}
catch (Exception ex)
{
FLog.severe("Error removing telnet sessions: " + ex.getMessage());
}
}
}

View File

@ -0,0 +1,338 @@
package me.totalfreedom.totalfreedommod.bridge;
import java.util.*;
import java.util.concurrent.CompletableFuture;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import net.coreprotect.CoreProtect;
import net.coreprotect.CoreProtectAPI;
import net.coreprotect.utility.Util;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.TextComponent;
import net.kyori.adventure.text.event.ClickEvent;
import net.kyori.adventure.text.format.NamedTextColor;
import net.kyori.adventure.text.format.TextColor;
import net.kyori.adventure.text.format.TextDecoration;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.Plugin;
import org.bukkit.scheduler.BukkitRunnable;
public class CoreProtectBridge extends FreedomService
{
//-- Block Inspector --//
private static final Component name = Component.text("Block Inspector").color(TextColor.color(0x30ade4));
private static final Component header = Component.text("---- ").append(name)
.append(Component.text(" ---- ")).colorIfAbsent(NamedTextColor.WHITE);
private static final Component prefix = name.append(Component.text(" - ").color(NamedTextColor.WHITE))
.colorIfAbsent(NamedTextColor.WHITE);
//--
private final HashMap<UUID, Long> cooldownMap = new HashMap<>();
private HashMap<UUID, FUtil.PaginationList<CoreProtectAPI.ParseResult>> historyMap;
//---------------------//
private CoreProtectAPI coreProtectAPI = null;
public static Long getSecondsLeft(long prevTime, int timeAdd)
{
return prevTime / 1000L + timeAdd - System.currentTimeMillis() / 1000L;
}
@Override
public void onStart()
{
if (isEnabled())
{
historyMap = new HashMap<>();
}
}
@Override
public void onStop()
{
}
public CoreProtect getCoreProtect()
{
CoreProtect coreProtect = null;
try
{
final Plugin coreProtectPlugin = server.getPluginManager().getPlugin("CoreProtect");
assert coreProtectPlugin != null;
if (coreProtectPlugin instanceof CoreProtect)
{
coreProtect = (CoreProtect)coreProtectPlugin;
}
}
catch (Exception ex)
{
FLog.severe(ex);
}
return coreProtect;
}
public CoreProtectAPI getCoreProtectAPI()
{
if (coreProtectAPI == null)
{
try
{
final CoreProtect coreProtect = getCoreProtect();
coreProtectAPI = coreProtect.getAPI();
// Check if the plugin or api is not enabled, if so, return null
if (!coreProtect.isEnabled() || !coreProtectAPI.isEnabled())
{
return null;
}
}
catch (Exception ex)
{
FLog.severe(ex);
}
}
return coreProtectAPI;
}
public boolean isEnabled()
{
if (!server.getPluginManager().isPluginEnabled("CoreProtect"))
{
return false;
}
final CoreProtect coreProtect = getCoreProtect();
return coreProtect != null && coreProtect.isEnabled();
}
// Rollback the specified player's edits that were in the last 24 hours.
public void rollback(final String name)
{
if (!isEnabled())
{
return;
}
final CoreProtectAPI coreProtect = getCoreProtectAPI();
new BukkitRunnable()
{
@Override
public void run()
{
coreProtect.performRollback(86400, Collections.singletonList(name), null, null, null, null, 0, null);
}
}.runTaskAsynchronously(plugin);
}
// Reverts a rollback for the specified player's edits that were in the last 24 hours.
public void restore(final String name)
{
if (!isEnabled())
{
return;
}
final CoreProtectAPI coreProtect = getCoreProtectAPI();
new BukkitRunnable()
{
@Override
public void run()
{
coreProtect.performRestore(86400, Collections.singletonList(name), null, null, null, null, 0, null);
}
}.runTaskAsynchronously(plugin);
}
public boolean hasHistory(Player player)
{
return historyMap.containsKey(player.getUniqueId());
}
public FUtil.PaginationList<CoreProtectAPI.ParseResult> getHistoryForPlayer(Player player)
{
return historyMap.get(player.getUniqueId());
}
public void showPageToPlayer(Player player, FUtil.PaginationList<CoreProtectAPI.ParseResult> results, int pageNum)
{
if (player == null || !player.isOnline())
{
return;
}
List<CoreProtectAPI.ParseResult> page = results.getPage(pageNum);
if (page == null || page.isEmpty())
{
player.sendMessage(prefix.append(Component.text("No results were found.", NamedTextColor.WHITE)));
}
else
{
// This shouldn't change at all in any of the other entries, so this should be safe
Component location = Component.text(String.format("(%s, %s, %s)", results.get(0).getX(),
results.get(0).getY(), results.get(0).getZ()));
final long time = System.currentTimeMillis() / 1000;
player.sendMessage(header.append(location.color(NamedTextColor.GRAY).decorate(TextDecoration.ITALIC)));
page.forEach(entry ->
{
TextComponent.Builder line = Component.text();
// Time
line.append(Component.text(Util.getTimeSince(entry.getTime(), time, false))
.color(NamedTextColor.GRAY));
// Action
Component action = Component.text(" interacted with ");
Component symbol = Component.text(" - ", NamedTextColor.WHITE);
switch (entry.getActionId())
{
case 0 ->
{
action = Component.text(" broke ");
symbol = Component.text(" - ", NamedTextColor.RED);
}
case 1 ->
{
action = Component.text(" placed ");
symbol = Component.text(" + ", NamedTextColor.GREEN);
}
case 2 -> action = Component.text(" clicked ");
default ->
{
// Do nothing (shuts Codacy up)
}
}
// Symbol, player, action, block
line.append(symbol).append(Component.text(entry.getPlayer()).color(TextColor.color(0x30ade4)))
.append(action.color(NamedTextColor.WHITE)).append(
Component.text(entry.getBlockData().getMaterial().name().toLowerCase())
.color(TextColor.color(0x30ade4)));
// Rolled back?
if (entry.isRolledBack())
{
line.decorate(TextDecoration.STRIKETHROUGH);
}
player.sendMessage(line.append(Component.text(".", NamedTextColor.WHITE)).build());
});
if (results.getPageCount() > 1)
{
player.sendMessage(Component.text("-----", NamedTextColor.WHITE));
// Page indicator
TextComponent.Builder indicator = Component.text();
// <-
if (pageNum > 1)
{
indicator.append(Component.text("", NamedTextColor.WHITE).clickEvent(
ClickEvent.runCommand("/ins history " + (pageNum - 1))));
}
// Page <current>/<total>
indicator.append(Component.text("Page ", TextColor.color(0x30ade4)).append(Component.text(pageNum + "/"
+ results.getPageCount(), NamedTextColor.WHITE)));
// ->
if (pageNum < results.getPageCount())
{
indicator.append(Component.text("", NamedTextColor.WHITE).clickEvent(
ClickEvent.runCommand("/ins history " + (pageNum + 1))));
}
// | Use /ins history <page> for advanced navigation
indicator.append(Component.text(" | ", NamedTextColor.GRAY).append(Component.text("Use ", NamedTextColor.WHITE)
.append(Component.text("/ins history <page>", TextColor.color(0x30ade4))
.clickEvent(ClickEvent.suggestCommand("/ins history ")))
.append(Component.text(" for advanced navigation", NamedTextColor.WHITE))));
player.sendMessage(indicator.build());
}
}
}
public CompletableFuture<FUtil.PaginationList<CoreProtectAPI.ParseResult>> lookupForPlayer(Block block, Player player)
{
cooldownMap.put(player.getUniqueId(), System.currentTimeMillis());
CoreProtectAPI api = getCoreProtectAPI();
return CompletableFuture.supplyAsync(() ->
{
historyMap.remove(player.getUniqueId());
FUtil.PaginationList<CoreProtectAPI.ParseResult> pages = new FUtil.PaginationList<>(10);
api.blockLookup(block, -1).forEach(stringArray -> pages.add(api.parseResult(stringArray)));
historyMap.put(player.getUniqueId(), pages);
return pages;
});
}
@EventHandler(priority = EventPriority.MONITOR)
public void onInteract(PlayerInteractEvent event)
{
// The inspector only works if we have CoreProtect installed
if (!isEnabled())
{
return;
}
Player player = event.getPlayer();
if ((event.getAction() == Action.RIGHT_CLICK_BLOCK || event.getAction() == Action.LEFT_CLICK_BLOCK)
&& plugin.pl.getData(player.getUniqueId()).hasInspection())
{
event.setCancelled(true);
Block block = event.getClickedBlock();
Optional<Long> cooldown = Optional.ofNullable(cooldownMap.get(player.getUniqueId()));
if (cooldown.isPresent() && getSecondsLeft(cooldown.get(), 3) > 0L)
{
player.sendMessage(prefix.append(Component.text("You need to wait ")
.append(Component.text(getSecondsLeft(cooldown.get(), 3)))
.append(Component.text(" seconds before you can make another query."))
.color(NamedTextColor.WHITE)));
return;
}
// Time to do a look-up.
if (block != null)
{
/* This is a hack to make it so that when you right-click, the coordinates that get used depend on
* what's in your hand. Non-blocks use the block you clicked directly, but blocks use wherever the
* block was supposed to be placed. */
ItemStack hand = player.getInventory().getItemInMainHand();
if (event.getAction() == Action.RIGHT_CLICK_BLOCK && hand.getType().isBlock() && hand.getType() != Material.AIR)
{
block = block.getRelative(event.getBlockFace()).getState().getBlock();
}
lookupForPlayer(block, player).thenAccept(results ->
{
if (results.isEmpty())
{
player.sendMessage(prefix.append(Component.text("No results were found.").color(NamedTextColor.WHITE)));
}
else
{
showPageToPlayer(player, results, 1);
}
});
}
}
}
}

View File

@ -0,0 +1,213 @@
package me.totalfreedom.totalfreedommod.bridge;
import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.User;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.entity.HumanEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryCloseEvent;
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.plugin.Plugin;
import org.bukkit.scheduler.BukkitRunnable;
public class EssentialsBridge extends FreedomService
{
private Essentials essentialsPlugin = null;
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
public Essentials getEssentialsPlugin()
{
if (essentialsPlugin == null)
{
try
{
final Plugin essentials = server.getPluginManager().getPlugin("Essentials");
assert essentials != null;
if (essentials instanceof Essentials)
{
essentialsPlugin = (Essentials)essentials;
}
}
catch (Exception ex)
{
FLog.severe(ex);
}
}
return essentialsPlugin;
}
public User getEssentialsUser(String username)
{
try
{
Essentials essentials = getEssentialsPlugin();
if (essentials != null)
{
return essentials.getUserMap().getUser(username);
}
}
catch (Exception ex)
{
FLog.severe(ex);
}
return null;
}
public void setNickname(String username, String nickname)
{
try
{
User user = getEssentialsUser(username);
if (user != null)
{
user.setNickname(nickname);
user.setDisplayNick();
}
}
catch (Exception ex)
{
FLog.severe(ex);
}
}
public String getNickname(String username)
{
try
{
User user = getEssentialsUser(username);
if (user != null)
{
return user.getNickname();
}
}
catch (Exception ex)
{
FLog.severe(ex);
}
return null;
}
public long getLastActivity(String username)
{
try
{
User user = getEssentialsUser(username);
if (user != null)
{
return user.getLastOnlineActivity();
}
}
catch (Exception ex)
{
FLog.severe(ex);
}
return 0L;
}
public void setVanished(String username, boolean vanished)
{
try
{
User user = getEssentialsUser(username);
if (user != null)
{
user.setVanished(vanished);
}
}
catch (Exception ex)
{
FLog.severe(ex);
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void onInventoryClick(InventoryClickEvent event)
{
Player refreshPlayer = null;
Inventory inventory = event.getView().getTopInventory();
InventoryType inventoryType = inventory.getType();
Player player = (Player)event.getWhoClicked();
FPlayer fPlayer = plugin.pl.getPlayer(player);
if (inventoryType == InventoryType.PLAYER && fPlayer.isInvSee())
{
final InventoryHolder inventoryHolder = inventory.getHolder();
if (inventoryHolder instanceof HumanEntity)
{
Player invOwner = (Player)inventoryHolder;
Rank recieverRank = plugin.rm.getRank(player);
Rank playerRank = plugin.rm.getRank(invOwner);
if (playerRank.ordinal() >= recieverRank.ordinal() || !invOwner.isOnline())
{
event.setCancelled(true);
refreshPlayer = player;
}
}
}
if (refreshPlayer != null)
{
final Player p = refreshPlayer;
new BukkitRunnable()
{
@Override
public void run()
{
p.updateInventory();
}
}.runTaskLater(plugin, 20L);
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void onInventoryClose(InventoryCloseEvent event)
{
Player refreshPlayer = null;
Inventory inventory = event.getView().getTopInventory();
InventoryType inventoryType = inventory.getType();
Player player = (Player)event.getPlayer();
FPlayer fPlayer = plugin.pl.getPlayer(player);
if (inventoryType == InventoryType.PLAYER && fPlayer.isInvSee())
{
fPlayer.setInvSee(false);
refreshPlayer = player;
}
if (refreshPlayer != null)
{
final Player p = refreshPlayer;
new BukkitRunnable()
{
@Override
public void run()
{
p.updateInventory();
}
}.runTaskLater(plugin, 20L);
}
}
public boolean isEnabled()
{
final Essentials ess = getEssentialsPlugin();
return ess != null && ess.isEnabled();
}
}

View File

@ -0,0 +1,101 @@
package me.totalfreedom.totalfreedommod.bridge;
import me.libraryaddict.disguise.BlockedDisguises;
import me.libraryaddict.disguise.DisguiseAPI;
import me.libraryaddict.disguise.LibsDisguises;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.util.FLog;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
public class LibsDisguisesBridge extends FreedomService
{
private LibsDisguises libsDisguisesPlugin = null;
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
public LibsDisguises getLibsDisguisesPlugin()
{
if (libsDisguisesPlugin == null)
{
try
{
final Plugin libsDisguises = server.getPluginManager().getPlugin("LibsDisguises");
if (libsDisguises != null)
{
if (libsDisguises instanceof LibsDisguises)
{
libsDisguisesPlugin = (LibsDisguises)libsDisguises;
}
}
}
catch (Exception ex)
{
FLog.severe(ex);
}
}
return libsDisguisesPlugin;
}
public void undisguiseAll(boolean admin)
{
try
{
final LibsDisguises libsDisguises = getLibsDisguisesPlugin();
if (libsDisguises == null)
{
return;
}
for (Player player : server.getOnlinePlayers())
{
if (DisguiseAPI.isDisguised(player))
{
if (!admin && plugin.al.isAdmin(player))
{
continue;
}
DisguiseAPI.undisguiseToAll(player);
}
}
}
catch (Exception ex)
{
FLog.severe(ex);
}
}
public boolean isDisguisesEnabled()
{
return !BlockedDisguises.disabled;
}
public void setDisguisesEnabled(boolean state)
{
final LibsDisguises libsDisguises = getLibsDisguisesPlugin();
if (libsDisguises == null)
{
return;
}
BlockedDisguises.disabled = !state;
}
public boolean isEnabled()
{
final LibsDisguises libsDisguises = getLibsDisguisesPlugin();
return libsDisguises != null;
}
}

View File

@ -0,0 +1,110 @@
package me.totalfreedom.totalfreedommod.bridge;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.bukkit.BukkitPlayer;
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.util.FLog;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
public class WorldEditBridge extends FreedomService
{
//
private WorldEditPlugin worldeditPlugin = null;
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
public WorldEditPlugin getWorldEditPlugin()
{
if (worldeditPlugin == null)
{
try
{
Plugin we = server.getPluginManager().getPlugin("WorldEdit");
if (we != null)
{
if (we instanceof WorldEditPlugin)
{
worldeditPlugin = (WorldEditPlugin)we;
}
}
}
catch (Exception ex)
{
FLog.severe(ex);
}
}
return worldeditPlugin;
}
public void setLimit(Player player, int limit)
{
try
{
final LocalSession session = getPlayerSession(player);
if (session != null)
{
session.setBlockChangeLimit(limit);
}
}
catch (Exception ex)
{
FLog.severe(ex);
}
}
public int getDefaultLimit()
{
final WorldEditPlugin wep = getWorldEditPlugin();
if (wep == null)
{
return 0;
}
return wep.getLocalConfiguration().defaultChangeLimit;
}
public int getMaxLimit()
{
final WorldEditPlugin wep = getWorldEditPlugin();
if (wep == null)
{
return 0;
}
return wep.getLocalConfiguration().maxChangeLimit;
}
private LocalSession getPlayerSession(Player player)
{
final WorldEditPlugin wep = getWorldEditPlugin();
if (wep == null)
{
return null;
}
try
{
return wep.getSession(player);
}
catch (Exception ex)
{
FLog.severe(ex);
return null;
}
}
}

View File

@ -0,0 +1,48 @@
package me.totalfreedom.totalfreedommod.bridge;
import com.sk89q.worldguard.LocalPlayer;
import com.sk89q.worldguard.WorldGuard;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
import com.sk89q.worldguard.protection.regions.RegionContainer;
import com.sk89q.worldguard.protection.regions.RegionQuery;
import me.totalfreedom.totalfreedommod.FreedomService;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
public class WorldGuardBridge extends FreedomService
{
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
public boolean canEditCurrentWorld(Player player)
{
// If WorldGuard integration is enabled, do a check with it.
if (isEnabled())
{
LocalPlayer localPlayer = WorldGuardPlugin.inst().wrapPlayer(player);
RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer();
RegionQuery query = container.createQuery();
return query.testBuild(localPlayer.getLocation(), localPlayer);
}
// If the plugin isn't present, return true.
return true;
}
public boolean isEnabled()
{
Plugin plugin = server.getPluginManager().getPlugin("WorldGuard");
return plugin != null && plugin.isEnabled();
}
}

View File

@ -0,0 +1,288 @@
package me.totalfreedom.totalfreedommod.caging;
import java.util.ArrayList;
import java.util.List;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.Skull;
public class CageData
{
private static String input = null;
private final FPlayer fPlayer;
//
//
private final List<BlockData> cageHistory = new ArrayList<>();
private boolean caged = false;
private Location location;
private Material outerMaterial = Material.GLASS;
private Material innerMaterial = Material.AIR;
public CageData(FPlayer player)
{
this.fPlayer = player;
}
// Util methods
public static void generateCube(Location location, int length, Material material)
{
final Block center = location.getBlock();
for (int xOffset = -length; xOffset <= length; xOffset++)
{
for (int yOffset = -length; yOffset <= length; yOffset++)
{
for (int zOffset = -length; zOffset <= length; zOffset++)
{
final Block block = center.getRelative(xOffset, yOffset, zOffset);
if (block.getType() != material)
{
block.setType(material);
}
}
}
}
}
@SuppressWarnings("deprecation")
public static void generateHollowCube(Location location, int length, Material material)
{
final Block center = location.getBlock();
for (int xOffset = -length; xOffset <= length; xOffset++)
{
for (int yOffset = -length; yOffset <= length; yOffset++)
{
for (int zOffset = -length; zOffset <= length; zOffset++)
{
// Hollow
if (Math.abs(xOffset) != length && Math.abs(yOffset) != length && Math.abs(zOffset) != length)
{
continue;
}
final Block block = center.getRelative(xOffset, yOffset, zOffset);
if (material != Material.PLAYER_HEAD)
{
// Glowstone light
if (material != Material.GLASS && xOffset == 0 && yOffset == 2 && zOffset == 0)
{
block.setType(Material.GLOWSTONE);
continue;
}
block.setType(material);
}
else
{
if (Math.abs(xOffset) == length && Math.abs(yOffset) == length && Math.abs(zOffset) == length)
{
block.setType(Material.GLOWSTONE);
continue;
}
block.setType(Material.PLAYER_HEAD);
if (input != null)
{
try
{
Skull skull = (Skull)block.getState();
// This may or may not work in future versions of spigot
skull.setOwner(input);
skull.update();
}
catch (ClassCastException ignored)
{
}
}
}
}
}
}
}
public static String getInput()
{
return input;
}
public static void setInput(String input)
{
CageData.input = input;
}
public void cage(Location location, Material outer, Material inner)
{
if (isCaged())
{
setCaged(false);
}
this.caged = true;
this.location = location;
this.outerMaterial = outer;
this.innerMaterial = inner;
input = null;
buildHistory(location);
regenerate();
}
public void cage(Location location, Material outer, Material inner, String input)
{
if (isCaged())
{
setCaged(false);
}
this.caged = true;
this.location = location;
this.outerMaterial = outer;
this.innerMaterial = inner;
CageData.input = input;
buildHistory(location);
regenerate();
}
public void regenerate()
{
if (!caged
|| location == null
|| outerMaterial == null
|| innerMaterial == null)
{
return;
}
generateHollowCube(location, 2, outerMaterial);
generateCube(location, 1, innerMaterial);
}
// TODO: EventHandler this?
public void playerJoin()
{
if (!isCaged())
{
return;
}
cage(fPlayer.getPlayer().getLocation(), outerMaterial, innerMaterial, input);
}
public void playerQuit()
{
regenerateHistory();
clearHistory();
}
public void clearHistory()
{
cageHistory.clear();
}
private void insertHistoryBlock(Location location, Material material)
{
cageHistory.add(new BlockData(location, material));
}
private void regenerateHistory()
{
for (BlockData blockdata : this.cageHistory)
{
blockdata.location.getBlock().setType(blockdata.material);
}
}
private void buildHistory(Location location)
{
final Block center = location.getBlock();
for (int xOffset = -2; xOffset <= 2; xOffset++)
{
for (int yOffset = -2; yOffset <= 2; yOffset++)
{
for (int zOffset = -2; zOffset <= 2; zOffset++)
{
final Block block = center.getRelative(xOffset, yOffset, zOffset);
insertHistoryBlock(block.getLocation(), block.getType());
}
}
}
}
public FPlayer getfPlayer()
{
return fPlayer;
}
public List<BlockData> getCageHistory()
{
return cageHistory;
}
public boolean isCaged()
{
return caged;
}
public void setCaged(boolean cage)
{
if (cage)
{
cage(fPlayer.getPlayer().getLocation(), Material.GLASS, Material.GLASS);
}
else
{
this.caged = false;
regenerateHistory();
clearHistory();
}
}
public Location getLocation()
{
return location;
}
public void setLocation(Location location)
{
this.location = location;
}
public Material getOuterMaterial()
{
return outerMaterial;
}
public void setOuterMaterial(Material outerMaterial)
{
this.outerMaterial = outerMaterial;
}
public Material getInnerMaterial()
{
return innerMaterial;
}
public void setInnerMaterial(Material innerMaterial)
{
this.innerMaterial = innerMaterial;
}
private static class BlockData
{
public Material material;
public Location location;
private BlockData(Location location, Material material)
{
this.location = location;
this.material = material;
}
}
}

View File

@ -0,0 +1,116 @@
package me.totalfreedom.totalfreedommod.caging;
import io.papermc.lib.PaperLib;
import java.util.Objects;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerKickEvent;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerQuitEvent;
public class Cager extends FreedomService
{
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onBreakBlock(BlockBreakEvent event)
{
Player player = event.getPlayer();
if (plugin.al.isAdmin(player))
{
return;
}
FPlayer fPlayer = plugin.pl.getPlayer(event.getPlayer());
CageData cage = fPlayer.getCageData();
if (cage.isCaged())
{
event.setCancelled(true);
}
}
@EventHandler
public void onPlayerMove(PlayerMoveEvent event)
{
FPlayer player = plugin.pl.getPlayer(event.getPlayer());
CageData cage = player.getCageData();
if (!cage.isCaged())
{
return;
}
Location playerLoc = player.getPlayer().getLocation().add(0, 1, 0);
Location cageLoc = cage.getLocation();
final boolean outOfCage;
if (!Objects.equals(playerLoc.getWorld(), cageLoc.getWorld()))
{
outOfCage = true;
}
else
{
outOfCage = playerLoc.distanceSquared(cageLoc) > (2.5D * 2.5D);
}
if (outOfCage)
{
PaperLib.teleportAsync(player.getPlayer(), cageLoc.subtract(0, 0.1, 0));
FUtil.playerMsg(player.getPlayer(), "You may not leave your cage.", ChatColor.RED);
cage.regenerate();
}
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onPlayerQuit(PlayerQuitEvent event)
{
FPlayer player = plugin.pl.getPlayer(event.getPlayer());
CageData cage = player.getCageData();
if (cage.isCaged())
{
cage.playerQuit();
}
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onPlayerKick(PlayerKickEvent event)
{
FPlayer player = plugin.pl.getPlayer(event.getPlayer());
CageData cage = player.getCageData();
if (cage.isCaged())
{
cage.playerQuit();
}
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onPlayerJoin(PlayerJoinEvent event)
{
FPlayer player = plugin.pl.getPlayer(event.getPlayer());
CageData cage = player.getCageData();
if (cage.isCaged())
{
cage.playerJoin();
}
}
}

View File

@ -0,0 +1,13 @@
package me.totalfreedom.totalfreedommod.command;
public class CommandFailException extends RuntimeException
{
private static final long serialVersionUID = -92333791173123L;
public CommandFailException(String message)
{
super(message);
}
}

View File

@ -0,0 +1,85 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.util.FLog;
import org.reflections.Reflections;
public class CommandLoader extends FreedomService
{
private final List<FreedomCommand> commands;
public CommandLoader()
{
commands = new ArrayList<>();
}
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
public void add(FreedomCommand command)
{
commands.add(command);
command.register();
}
public FreedomCommand getByName(String name)
{
for (FreedomCommand command : commands)
{
if (name.equals(command.getName()))
{
return command;
}
}
return null;
}
public boolean isAlias(String alias)
{
for (FreedomCommand command : commands)
{
if (Arrays.asList(command.getAliases().split(",")).contains(alias))
{
return true;
}
}
return false;
}
public void loadCommands()
{
Reflections commandDir = new Reflections("me.totalfreedom.totalfreedommod.command");
Set<Class<? extends FreedomCommand>> commandClasses = commandDir.getSubTypesOf(FreedomCommand.class);
for (Class<? extends FreedomCommand> commandClass : commandClasses)
{
try
{
add(commandClass.newInstance());
}
catch (InstantiationException | IllegalAccessException | ExceptionInInitializerError ex)
{
FLog.warning("Failed to register command: /" + commandClass.getSimpleName().replace("Command_", ""));
}
}
FLog.info("Loaded " + commands.size() + " commands");
}
public List<FreedomCommand> getCommands()
{
return commands;
}
}

View File

@ -1,4 +1,4 @@
package me.StevenLawson.TotalFreedomMod.Commands;
package me.totalfreedom.totalfreedommod.command;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@ -6,6 +6,7 @@ import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME)
public @interface CommandParameters
{
String description();
String usage();

View File

@ -0,0 +1,18 @@
package me.totalfreedom.totalfreedommod.command;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import me.totalfreedom.totalfreedommod.rank.Rank;
@Retention(RetentionPolicy.RUNTIME)
public @interface CommandPermissions
{
Rank level() default Rank.NON_OP;
SourceType source() default SourceType.BOTH;
boolean blockHostConsole() default false;
int cooldown() default 0;
}

View File

@ -0,0 +1,36 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.rank.Rank;
import org.apache.commons.lang.StringUtils;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Talk privately with other admins on the server.", usage = "/<command> [message]", aliases = "o,sc,ac,staffchat")
public class Command_adminchat extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
if (args.length == 0)
{
if (senderIsConsole)
{
msg("You must be in-game to toggle admin chat, it cannot be toggled via CONSOLE or Telnet.");
return true;
}
FPlayer userinfo = plugin.pl.getPlayer(playerSender);
userinfo.setAdminChat(!userinfo.inAdminChat());
msg("Admin chat turned " + (userinfo.inAdminChat() ? "on" : "off") + ".");
}
else
{
plugin.cm.adminChat(sender, StringUtils.join(args, " "));
}
return true;
}
}

View File

@ -0,0 +1,33 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.List;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang.StringUtils;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
@CommandParameters(description = "Information on how to apply for admin.", usage = "/<command>", aliases = "si,ai,staffinfo")
public class Command_admininfo extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
List<String> adminInfo = ConfigEntry.ADMIN_INFO.getStringList();
if (adminInfo.isEmpty())
{
msg("The admin information section of the config.yml file has not been configured.", ChatColor.RED);
}
else
{
msg(FUtil.colorize(StringUtils.join(adminInfo, "\n")));
}
return true;
}
}

View File

@ -0,0 +1,55 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import net.kyori.adventure.text.Component;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Denies joining of operators and only allows admins to join.", usage = "/<command> [on | off]", aliases = "staffmode")
public class Command_adminmode extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
if (args.length != 1)
{
return false;
}
if (args[0].equalsIgnoreCase("off"))
{
ConfigEntry.ADMIN_ONLY_MODE.setBoolean(false);
FUtil.adminAction(sender.getName(), "Opening the server to all players", true);
return true;
}
else if (args[0].equalsIgnoreCase("on"))
{
ConfigEntry.ADMIN_ONLY_MODE.setBoolean(true);
FUtil.adminAction(sender.getName(), "Closing the server to non-admins", true);
server.getOnlinePlayers().stream().filter(player -> !isAdmin(player)).forEach(player ->
player.kick(Component.text("The server is now closed to non-admins.")));
return true;
}
return false;
}
@Override
public List<String> getTabCompleteOptions(CommandSender sender, Command command, String alias, String[] args)
{
if (args.length == 1 && plugin.al.isAdmin(sender) && !(sender instanceof Player))
{
return Arrays.asList("on", "off");
}
return Collections.emptyList();
}
}

View File

@ -0,0 +1,201 @@
package me.totalfreedom.totalfreedommod.command;
import io.papermc.lib.PaperLib;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.world.WorldTime;
import me.totalfreedom.totalfreedommod.world.WorldWeather;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
@CommandParameters(description = "Allows for admins to configure time, and weather of the AdminWorld, and allows for admins and ops to go to the AdminWorld.",
usage = "/<command> [time <morning | noon | evening | night> | weather <off | rain | storm>]",
aliases = "sw,aw,staffworld")
public class Command_adminworld extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
CommandMode commandMode = null;
if (args.length == 0)
{
commandMode = CommandMode.TELEPORT;
}
else if (args.length >= 2)
{
if ("time".equalsIgnoreCase(args[0]))
{
commandMode = CommandMode.TIME;
}
else if ("weather".equalsIgnoreCase(args[0]))
{
commandMode = CommandMode.WEATHER;
}
}
if (commandMode == null)
{
return false;
}
try
{
switch (commandMode)
{
case TELEPORT:
{
if (!(sender instanceof Player) || playerSender == null)
{
return false;
}
World adminWorld = null;
try
{
adminWorld = plugin.wm.adminworld.getWorld();
}
catch (Exception ignored)
{
}
if (adminWorld == null || playerSender.getWorld() == adminWorld)
{
msg("Going to the main world.");
PaperLib.teleportAsync(playerSender, server.getWorlds().get(0).getSpawnLocation());
}
else
{
msg("Going to the AdminWorld.");
plugin.wm.adminworld.sendToWorld(playerSender);
}
break;
}
case TIME:
{
assertCommandPerms(sender, playerSender);
if (args.length == 2)
{
WorldTime timeOfDay = WorldTime.getByAlias(args[1]);
if (timeOfDay != null)
{
plugin.wm.adminworld.setTimeOfDay(timeOfDay);
msg("AdminWorld time set to: " + timeOfDay.name());
}
else
{
msg("Invalid time of day. Can be: sunrise, noon, sunset, midnight");
}
}
else
{
return false;
}
break;
}
case WEATHER:
{
assertCommandPerms(sender, playerSender);
if (args.length == 2)
{
WorldWeather weatherMode = WorldWeather.getByAlias(args[1]);
if (weatherMode != null)
{
plugin.wm.adminworld.setWeatherMode(weatherMode);
msg("AdminWorld weather set to: " + weatherMode.name());
}
else
{
msg("Invalid weather mode. Can be: off, rain, storm");
}
}
else
{
return false;
}
break;
}
default:
{
return false;
}
}
}
catch (PermissionDeniedException ex)
{
if (ex.getMessage().isEmpty())
{
return noPerms();
}
msg(ex.getMessage());
return true;
}
return true;
}
// TODO: Redo this properly
private void assertCommandPerms(CommandSender sender, Player playerSender) throws PermissionDeniedException
{
if (!(sender instanceof Player) || playerSender == null || !isAdmin(sender))
{
throw new PermissionDeniedException();
}
}
@Override
public List<String> getTabCompleteOptions(CommandSender sender, Command command, String alias, String[] args)
{
if (!plugin.al.isAdmin(sender))
{
return Collections.emptyList();
}
if (args.length == 1)
{
return Arrays.asList("time", "weather");
}
else if (args.length == 2)
{
if (args[0].equals("time"))
{
return Arrays.asList("morning", "noon", "evening", "night");
}
else if (args[0].equals("weather"))
{
return Arrays.asList("off", "rain", "storm");
}
}
return Collections.emptyList();
}
private enum CommandMode
{
TELEPORT, TIME, WEATHER
}
private static class PermissionDeniedException extends Exception
{
private static final long serialVersionUID = 1L;
private PermissionDeniedException()
{
super("");
}
private PermissionDeniedException(String string)
{
super(string);
}
}
}

View File

@ -0,0 +1,58 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.GameMode;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
@CommandParameters(description = "Quickly change your own gamemode to adventure, define someone's username to change theirs, or change everyone's gamemode on the server.", usage = "/<command> <[partialname] | -a>", aliases = "gma")
public class Command_adventure extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
if (args.length == 0)
{
if (isConsole())
{
msg("When used from the console, you must define a target player.");
return true;
}
playerSender.setGameMode(GameMode.ADVENTURE);
msg("Your gamemode has been set to adventure.");
return true;
}
checkRank(Rank.ADMIN);
if (args[0].equals("-a"))
{
for (Player targetPlayer : server.getOnlinePlayers())
{
targetPlayer.setGameMode(GameMode.ADVENTURE);
}
FUtil.adminAction(sender.getName(), "Changing everyone's gamemode to adventure", false);
msg("Your gamemode has been set to adventure.");
return true;
}
Player player = getPlayer(args[0]);
if (player == null)
{
msg(PLAYER_NOT_FOUND);
return true;
}
msg("Setting " + player.getName() + " to game mode adventure.");
msg(player, sender.getName() + " set your game mode to adventure.");
player.setGameMode(GameMode.ADVENTURE);
return true;
}
}

View File

@ -0,0 +1,36 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.AreaEffectCloud;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Clears lingering potion area effect clouds.", usage = "/<command>", aliases = "aec")
public class Command_aeclear extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
FUtil.adminAction(sender.getName(), "Removing all area effect clouds", true);
int removed = 0;
for (World world : server.getWorlds())
{
for (Entity entity : world.getEntities())
{
if (entity instanceof AreaEffectCloud)
{
entity.remove();
removed++;
}
}
}
msg(removed + " area effect clouds removed.");
return true;
}
}

View File

@ -0,0 +1,25 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import org.apache.commons.lang.StringUtils;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Make an announcement anonymously to operators.", usage = "/<command> <message>")
public class Command_announce extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
if (args.length < 1)
{
return false;
}
plugin.an.announce(StringUtils.join(args, " "));
return true;
}
}

View File

@ -0,0 +1,21 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.attribute.Attribute;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.Arrays;
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
@CommandParameters(description = "Lists all possible attributes.", usage = "/<command>")
public class Command_attributelist extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
msg("All possible attributes: " + FUtil.listToString(Arrays.stream(Attribute.values()).map(Enum::name).toList()));
return true;
}
}

View File

@ -0,0 +1,36 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Toggle whether or not a player has their inventory automatically cleared when they join", usage = "/<command> <player>")
public class Command_autoclear extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
if (args.length == 0)
{
return false;
}
boolean enabled = plugin.lp.CLEAR_ON_JOIN.contains(args[0]);
if (enabled)
{
plugin.lp.CLEAR_ON_JOIN.remove(args[0]);
}
else
{
plugin.lp.CLEAR_ON_JOIN.add(args[0]);
}
msg(args[0] + " will " + (enabled ? "no longer" : "now") + " have their inventory cleared when they join.");
return true;
}
}

View File

@ -0,0 +1,36 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Toggle whether or not a player is automatically teleported when they join", usage = "/<command> <player>")
public class Command_autotp extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
if (args.length == 0)
{
return false;
}
boolean enabled = plugin.lp.TELEPORT_ON_JOIN.contains(args[0]);
if (enabled)
{
plugin.lp.TELEPORT_ON_JOIN.remove(args[0]);
}
else
{
plugin.lp.TELEPORT_ON_JOIN.add(args[0]);
}
msg(args[0] + " will " + (enabled ? "no longer" : "now") + " be automatically teleported when they join.");
return true;
}
}

View File

@ -0,0 +1,185 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.Objects;
import com.earth2me.essentials.User;
import me.totalfreedom.totalfreedommod.banning.Ban;
import me.totalfreedom.totalfreedommod.player.PlayerData;
import me.totalfreedom.totalfreedommod.punishments.Punishment;
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH, blockHostConsole = true)
@CommandParameters(description = "Bans the specified player.", usage = "/<command> <username> [reason] [-nrb | -q]", aliases = "gtfo")
public class Command_ban extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
if (args.length == 0)
{
return false;
}
String reason = null;
boolean silent = false;
boolean cancelRollback = false;
if (args.length >= 2)
{
if (args[args.length - 1].equalsIgnoreCase("-nrb") || args[args.length - 1].equalsIgnoreCase("-q"))
{
if (args[args.length - 1].equalsIgnoreCase("-nrb"))
{
cancelRollback = true;
}
if (args[args.length - 1].equalsIgnoreCase("-q"))
{
silent = true;
}
if (args.length >= 3)
{
reason = StringUtils.join(ArrayUtils.subarray(args, 1, args.length - 1), " ");
}
}
else
{
reason = StringUtils.join(ArrayUtils.subarray(args, 1, args.length), " ");
}
}
final String username;
final String ip;
final Player player = getPlayer(args[0]);
if (player == null)
{
// Gets the IP using Essentials data if available
if (plugin.esb.isEnabled() && plugin.esb.getEssentialsUser(args[0]) != null)
{
User essUser = plugin.esb.getEssentialsUser(args[0]);
//
username = essUser.getName();
ip = essUser.getLastLoginAddress();
}
// Last resort - Getting the first result from the username itself
else
{
PlayerData entry = plugin.pl.getData(args[0]);
if (entry == null)
{
msg(PLAYER_NOT_FOUND);
return true;
}
else
{
username = entry.getName();
ip = entry.getIps().get(0);
}
}
}
else
{
username = player.getName();
ip = FUtil.getIp(player);
// Deop
player.setOp(false);
// Gamemode survival
player.setGameMode(GameMode.SURVIVAL);
// Clear inventory
player.getInventory().clear();
if (!silent)
{
// Strike with lightning
final Location targetPos = player.getLocation();
for (int x = -1; x <= 1; x++)
{
for (int z = -1; z <= 1; z++)
{
final Location strike_pos = new Location(targetPos.getWorld(), targetPos.getBlockX() + x, targetPos.getBlockY(), targetPos.getBlockZ() + z);
Objects.requireNonNull(targetPos.getWorld()).strikeLightning(strike_pos);
}
}
}
else
{
msg("Banned " + player.getName() + " quietly.");
}
// Kill player
player.setHealth(0.0);
}
// Checks if CoreProtect is loaded and installed, and skips the rollback and uses CoreProtect directly
if (!cancelRollback)
{
plugin.cpb.rollback(username);
}
if (player != null && !silent)
{
FUtil.bcastMsg(player.getName() + " has been a VERY naughty, naughty boy.", ChatColor.RED);
}
// Ban player
Ban ban;
if (player != null)
{
ban = Ban.forPlayer(player, sender, null, reason);
}
else
{
ban = Ban.forPlayerName(username, sender, null, reason);
}
ban.addIp(ip);
plugin.bm.addBan(ban);
if (!silent)
{
// Broadcast
final StringBuilder bcast = new StringBuilder()
.append("Banning: ")
.append(username);
if (reason != null)
{
bcast.append(" - Reason: ").append(ChatColor.YELLOW).append(reason);
}
msg(sender, ChatColor.GRAY + username + " has been banned and IP is: " + ip);
FUtil.adminAction(sender.getName(), bcast.toString(), true);
}
// Kick player and handle others on IP
if (player != null)
{
player.kickPlayer(ban.bakeKickMessage());
for (Player p : Bukkit.getOnlinePlayers())
{
if (FUtil.getIp(p).equals(FUtil.getIp(player)))
{
p.kickPlayer(ChatColor.RED + "You've been kicked because someone on your IP has been banned.");
}
}
}
// Log ban
plugin.pul.logPunishment(new Punishment(username, ip, sender.getName(), PunishmentType.BAN, reason));
return true;
}
}

View File

@ -0,0 +1,82 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.banning.Ban;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH, blockHostConsole = true)
@CommandParameters(description = "Bans the specified ip.", usage = "/<command> <ip> [reason] [-q]")
public class Command_banip extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
if (args.length == 0)
{
return false;
}
boolean silent = false;
String reason = null;
String ip = args[0];
if (FUtil.isValidIPv4(ip))
{
msg(ip + " is not a valid IP address", ChatColor.RED);
return true;
}
if (plugin.bm.getByIp(ip) != null)
{
msg("The IP " + ip + " is already banned", ChatColor.RED);
return true;
}
if (args[args.length - 1].equalsIgnoreCase("-q"))
{
silent = true;
if (args.length >= 2)
{
reason = StringUtils.join(ArrayUtils.subarray(args, 1, args.length - 1), " ");
}
}
else if (args.length > 1)
{
reason = StringUtils.join(ArrayUtils.subarray(args, 1, args.length), " ");
}
// Ban player
Ban ban = Ban.forPlayerIp(ip, sender, null, reason);
plugin.bm.addBan(ban);
// Kick player and handle others on IP
for (Player player : server.getOnlinePlayers())
{
if (FUtil.getIp(player).equals(ip))
{
player.kickPlayer(ban.bakeKickMessage());
}
if (!silent)
{
// Broadcast
FLog.info(ChatColor.RED + sender.getName() + " - Banned the IP " + ip);
String message = sender.getName() + " - Banned " + (plugin.al.isAdmin(player) ? "the IP " + ip : "an IP");
msg(player, message, ChatColor.RED);
}
}
return true;
}
}

View File

@ -0,0 +1,36 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
@CommandParameters(description = "Shows all banned player names. Admins may optionally use 'purge' to clear the list.", usage = "/<command> [purge]")
public class Command_banlist extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
if (args.length > 0)
{
if (args[0].equalsIgnoreCase("purge"))
{
checkRank(Rank.SENIOR_ADMIN);
FUtil.adminAction(sender.getName(), "Purging the ban list", true);
int amount = plugin.bm.purge();
msg("Purged " + amount + " player bans.");
return true;
}
return false;
}
msg(plugin.bm.getAllBans().size() + " player bans ("
+ plugin.bm.getUsernameBans().size() + " usernames, "
+ plugin.bm.getIpBans().size() + " IPs)");
return true;
}
}

View File

@ -0,0 +1,68 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.banning.Ban;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH, blockHostConsole = true)
@CommandParameters(description = "Bans the specified name.", usage = "/<command> <name> [reason] [-q]")
public class Command_banname extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
if (args.length == 0)
{
return false;
}
boolean silent = false;
String reason = null;
String name = args[0];
if (plugin.bm.getByUsername(name) != null)
{
msg("The name " + name + " is already banned", ChatColor.RED);
return true;
}
if (args[args.length - 1].equalsIgnoreCase("-q"))
{
silent = true;
if (args.length >= 2)
{
reason = StringUtils.join(ArrayUtils.subarray(args, 1, args.length - 1), " ");
}
}
else if (args.length > 1)
{
reason = StringUtils.join(ArrayUtils.subarray(args, 1, args.length), " ");
}
// Ban player
Ban ban = Ban.forPlayerName(name, sender, null, reason);
plugin.bm.addBan(ban);
if (!silent)
{
FUtil.adminAction(sender.getName(), "Banned the name " + name, true);
}
Player player = getPlayer(name);
if (player != null)
{
player.kickPlayer(ban.bakeKickMessage());
}
return true;
}
}

View File

@ -0,0 +1,33 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.Arrays;
import java.util.List;
import java.util.SplittableRandom;
import me.totalfreedom.totalfreedommod.rank.Rank;
import org.bukkit.Location;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Spawns a random type of fish at your location.", usage = "/<command>")
public class Command_bird extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
Location location = playerSender.getTargetBlock(null, 15).getLocation().add(0, 1, 0);
playerSender.getWorld().spawnEntity(location, getRandomFish());
msg(":goodbird:");
return true;
}
public EntityType getRandomFish()
{
List<EntityType> fishTypes = Arrays.asList(EntityType.COD, EntityType.SALMON, EntityType.PUFFERFISH, EntityType.TROPICAL_FISH);
SplittableRandom random = new SplittableRandom();
return fishTypes.get(random.nextInt(fishTypes.size()));
}
}

View File

@ -0,0 +1,92 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.punishments.Punishment;
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Block all commands for everyone on the server, or a specific player.", usage = "/<command> <-a | purge | <player>>", aliases = "blockcommands,blockcommand,bc,bcmd")
public class Command_blockcmd extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
if (args.length != 1)
{
return false;
}
if (args[0].equals("purge"))
{
FUtil.adminAction(sender.getName(), "Unblocking commands for all players", true);
int counter = 0;
for (Player player : server.getOnlinePlayers())
{
FPlayer playerdata = plugin.pl.getPlayer(player);
if (playerdata.allCommandsBlocked())
{
counter += 1;
playerdata.setCommandsBlocked(false);
}
}
msg("Unblocked commands for " + counter + " players.");
return true;
}
if (args[0].equals("-a"))
{
FUtil.adminAction(sender.getName(), "Blocking commands for all non-admins", true);
int counter = 0;
for (Player player : server.getOnlinePlayers())
{
if (isAdmin(player))
{
continue;
}
counter += 1;
plugin.pl.getPlayer(player).setCommandsBlocked(true);
msg(player, "Your commands have been blocked by an admin.", ChatColor.RED);
}
msg("Blocked commands for " + counter + " players.");
return true;
}
final Player player = getPlayer(args[0]);
if (player == null)
{
msg(FreedomCommand.PLAYER_NOT_FOUND);
return true;
}
if (isAdmin(player))
{
msg(player.getName() + " is an admin, and cannot have their commands blocked.");
return true;
}
FPlayer playerdata = plugin.pl.getPlayer(player);
if (!playerdata.allCommandsBlocked())
{
FUtil.adminAction(sender.getName(), "Blocking all commands for " + player.getName(), true);
playerdata.setCommandsBlocked(true);
msg("Blocked commands for " + player.getName() + ".");
plugin.pul.logPunishment(new Punishment(player.getName(), FUtil.getIp(player), sender.getName(), PunishmentType.BLOCKCMD, null));
}
else
{
msg("That players commands are already blocked.", ChatColor.RED);
}
return true;
}
}

View File

@ -0,0 +1,110 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.punishments.Punishment;
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.List;
import java.util.Optional;
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Restricts/restores block modification abilities for everyone on the server or a certain player.", usage = "/<command> [<player> [reason] | list | purge | all]")
public class Command_blockedit extends FreedomCommand
{
@Override
public boolean run(final CommandSender sender, final Player playerSender, final Command cmd, final String commandLabel, String[] args, final boolean senderIsConsole)
{
if (args.length > 0)
{
switch (args[0].toLowerCase())
{
case "list" ->
{
List<? extends Player> list = server.getOnlinePlayers().stream().filter(player ->
plugin.pl.getPlayer(player).isEditBlocked()).sorted().toList();
// Oh dear god, why do I have to do it like this?
msg("There " + (list.size() != 1 ? "are " : "is ") + list.size() + " player"
+ (list.size() != 1 ? "s" : "") + " online with restricted block modification abilities"
+ (list.size() > 0 ? ":" : "."));
list.forEach(player -> msg("- " + player.getName()));
}
case "purge" ->
{
FUtil.adminAction(sender.getName(), "Restoring block modification abilities for all players", true);
List<? extends Player> list = server.getOnlinePlayers().stream().filter(player ->
plugin.pl.getPlayer(player).isEditBlocked()).toList();
list.forEach(player ->
{
plugin.pl.getPlayer(player).setEditBlocked(false);
msg(player, "Your block modification abilities have been restored.", ChatColor.GREEN);
});
msg("Restored block modification abilities for " + list.size() + " player"
+ (list.size() != 1 ? "s" : "") + ".");
}
case "all", "-a" ->
{
FUtil.adminAction(sender.getName(), "Restricting block modification abilities for all non-admins", true);
List<? extends Player> list = server.getOnlinePlayers().stream().filter(player ->
!plugin.al.isAdmin(player)).toList();
list.forEach(player ->
{
plugin.pl.getPlayer(player).setEditBlocked(true);
msg(player, "Your block modification abilities have been restricted.", ChatColor.RED);
});
msg("Restricted block modification abilities for " + list.size() + " player"
+ (list.size() != 1 ? "s" : "") + ".");
}
default -> Optional.ofNullable(getPlayer(args[0])).ifPresentOrElse(player ->
{
FPlayer fPlayer = plugin.pl.getPlayer(player);
if (fPlayer.isEditBlocked())
{
FUtil.adminAction(sender.getName(), "Restoring block modification abilities for " + player.getName(), true);
fPlayer.setEditBlocked(false);
msg("Restored block modification abilities for " + player.getName() + ".");
msg(player, "Your block modification abilities have been restored.", ChatColor.GREEN);
}
else
{
if (plugin.al.isAdmin(player))
{
msg(player.getName() + " is an admin, and as such cannot have their block modification abilities restricted.", ChatColor.RED);
}
else
{
FUtil.adminAction(sender.getName(), "Restricting block modification abilities for " + player.getName(), true);
fPlayer.setEditBlocked(true);
msg("Restricted block modification abilities for " + player.getName() + ".");
msg(player, "Your block modification abilities have been restricted.", ChatColor.RED);
plugin.pul.logPunishment(new Punishment(player.getName(), FUtil.getIp(player),
sender.getName(), PunishmentType.BLOCKEDIT, null));
}
}
}, () -> msg(PLAYER_NOT_FOUND));
}
return true;
}
else
{
return false;
}
}
}

View File

@ -0,0 +1,137 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.punishments.Punishment;
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Toggle PVP mode for everyone or a certain player.", usage = "/<command> [[-s] <player> [reason] | list | purge | all]", aliases = "pvpblock,pvpmode")
public class Command_blockpvp extends FreedomCommand
{
@Override
public boolean run(final CommandSender sender, final Player playerSender, final Command cmd, final String commandLabel, String[] args, final boolean senderIsConsole)
{
if (args.length == 0)
{
return false;
}
if (args[0].equals("list"))
{
msg("PVP is blocked for players:");
int count = 0;
for (Player player : server.getOnlinePlayers())
{
final FPlayer info = plugin.pl.getPlayer(player);
if (info.isPvpBlocked())
{
msg(" - " + player.getName());
++count;
}
}
if (count == 0)
{
msg(" - none");
}
return true;
}
if (args[0].equals("purge"))
{
FUtil.adminAction(sender.getName(), "Enabling PVP for all players.", true);
int count = 0;
for (Player player : server.getOnlinePlayers())
{
final FPlayer info = plugin.pl.getPlayer(player);
if (info.isPvpBlocked())
{
info.setPvpBlocked(false);
++count;
}
}
msg("Enabled PVP for " + count + " players.");
return true;
}
if (args[0].equals("all"))
{
FUtil.adminAction(sender.getName(), "Disabling PVP for all non-admins", true);
int counter = 0;
for (Player player : server.getOnlinePlayers())
{
if (!plugin.al.isAdmin(player))
{
final FPlayer playerdata = plugin.pl.getPlayer(player);
playerdata.setPvpBlocked(true);
++counter;
}
}
msg("Disabling PVP for " + counter + " players.");
return true;
}
final boolean smite = args[0].equals("-s");
if (smite)
{
args = ArrayUtils.subarray(args, 1, args.length);
if (args.length < 1)
{
return false;
}
}
final Player p = getPlayer(args[0]);
if (p == null)
{
msg(PLAYER_NOT_FOUND);
return true;
}
String reason = null;
if (args.length > 1)
{
reason = StringUtils.join(args, " ", 1, args.length);
}
final FPlayer pd = plugin.pl.getPlayer(p);
if (pd.isPvpBlocked())
{
FUtil.adminAction(sender.getName(), "Enabling PVP for " + p.getName(), true);
pd.setPvpBlocked(false);
msg("Enabling PVP for " + p.getName());
msg(p, "Your PVP have been enabled.", ChatColor.GREEN);
}
else
{
if (plugin.al.isAdmin(p))
{
msg(p.getName() + " is an admin, and cannot have their PVP disabled.");
return true;
}
FUtil.adminAction(sender.getName(), "Disabling PVP for " + p.getName(), true);
pd.setPvpBlocked(true);
if (smite)
{
Command_smite.smite(sender, p, reason);
}
plugin.pul.logPunishment(new Punishment(p.getName(), FUtil.getIp(p), sender.getName(), PunishmentType.BLOCKPVP, null));
msg(p, "Your PVP has been disabled.", ChatColor.RED);
msg("Disabled PVP for " + p.getName());
}
return true;
}
}

View File

@ -0,0 +1,41 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Blocks redstone on the server.", usage = "/<command>", aliases = "bre")
public class Command_blockredstone extends FreedomCommand
{
public boolean run(final CommandSender sender, final Player playerSender, final Command cmd, final String commandLabel, final String[] args, final boolean senderIsConsole)
{
if (ConfigEntry.ALLOW_REDSTONE.getBoolean())
{
ConfigEntry.ALLOW_REDSTONE.setBoolean(false);
FUtil.adminAction(sender.getName(), "Blocking all redstone", true);
new BukkitRunnable()
{
public void run()
{
if (!ConfigEntry.ALLOW_REDSTONE.getBoolean())
{
FUtil.adminAction("TotalFreedom", "Unblocking all redstone", false);
ConfigEntry.ALLOW_REDSTONE.setBoolean(true);
}
}
}.runTaskLater(plugin, 6000L);
}
else
{
ConfigEntry.ALLOW_REDSTONE.setBoolean(true);
FUtil.adminAction(sender.getName(), "Unblocking all redstone", true);
}
return true;
}
}

View File

@ -0,0 +1,164 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.punishments.Punishment;
import me.totalfreedom.totalfreedommod.punishments.PunishmentType;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.ChatColor;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Place a cage around someone with certain blocks, or someone's player head.", usage = "/<command> <purge | <partialname> [head | block] [playername | blockname]")
public class Command_cage extends FreedomCommand
{
@Override
public boolean run(final CommandSender sender, final Player playerSender, final Command cmd, final String commandLabel, final String[] args, final boolean senderIsConsole)
{
if (args.length == 0)
{
return false;
}
String skullName = null;
if (args[0].equalsIgnoreCase("purge"))
{
FUtil.adminAction(sender.getName(), "Uncaging all players", true);
server.getOnlinePlayers().stream().map(player -> plugin.pl.getPlayer(player)).forEach(fPlayer ->
fPlayer.getCageData().setCaged(false));
return true;
}
Player player = getPlayer(args[0]);
if (player == null)
{
msg(PLAYER_NOT_FOUND);
return true;
}
final FPlayer fPlayer = plugin.pl.getPlayer(player);
if (fPlayer.getCageData().isCaged())
{
msg("That player is already caged.", ChatColor.RED);
return true;
}
Material outerMaterial = Material.GLASS;
Material innerMaterial = Material.AIR;
if (args.length >= 2 && args[1] != null)
{
final String s = args[1];
switch (s)
{
case "head" ->
{
outerMaterial = Material.PLAYER_HEAD;
if (args.length >= 3)
{
skullName = args[2];
}
else
{
outerMaterial = Material.SKELETON_SKULL;
}
}
case "block" ->
{
if (args.length >= 3)
{
// Checks the validity of the Material and checks if it's a block.
// This is incredibly inefficient, as Spigot's isBlock() method in Material is an actual
// nightmare of switch-cases.
if (Material.matchMaterial(args[2]) != null && Material.matchMaterial(args[2]).isBlock())
{
outerMaterial = Material.matchMaterial(args[2]);
}
else
{
msg("Invalid block!", ChatColor.RED);
return true;
}
}
else
{
return false;
}
}
default ->
{
return false;
}
}
}
if (outerMaterial == Material.PLAYER_HEAD)
{
FUtil.adminAction(sender.getName(), "Caging " + player.getName() + " in " + skullName, true);
}
else
{
FUtil.adminAction(sender.getName(), "Caging " + player.getName(), true);
}
Location location = player.getLocation().clone().add(0.0, 1.0, 0.0);
if (skullName != null)
{
fPlayer.getCageData().cage(location, outerMaterial, innerMaterial, skullName);
}
else
{
fPlayer.getCageData().cage(location, outerMaterial, innerMaterial);
}
player.setGameMode(GameMode.SURVIVAL);
plugin.pul.logPunishment(new Punishment(player.getName(), FUtil.getIp(player), sender.getName(), PunishmentType.CAGE, null));
return true;
}
@Override
public List<String> getTabCompleteOptions(CommandSender sender, Command command, String alias, String[] args)
{
if (!plugin.al.isAdmin(sender))
{
return null;
}
if (args.length == 1)
{
List<String> arguments = new ArrayList<>();
arguments.add("purge");
arguments.addAll(FUtil.getPlayerList());
return arguments;
}
else if (args.length == 2)
{
if (!args[0].equals("purge"))
{
return Arrays.asList("head", "block");
}
}
else if (args.length == 3)
{
if (args[1].equals("block"))
{
return Arrays.stream(Material.values()).map(Enum::name).toList();
}
else if (args[1].equals("head"))
{
return FUtil.getPlayerList();
}
}
return Collections.emptyList();
}
}

View File

@ -0,0 +1,48 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "For the people that are still alive - gives a cake to everyone on the server.", usage = "/<command>")
public class Command_cake extends FreedomCommand
{
public static final String CAKE_LYRICS = "But there's no sense crying over every mistake. You just keep on trying till you run out of cake.";
@Override
public boolean run(final CommandSender sender, final Player playerSender, final Command cmd, final String commandLabel, final String[] args, final boolean senderIsConsole)
{
final StringBuilder output = new StringBuilder();
for (final String word : CAKE_LYRICS.split(" "))
{
output.append(FUtil.randomChatColor()).append(word).append(" ");
}
final ItemStack heldItem = new ItemStack(Material.CAKE);
final ItemMeta heldItemMeta = heldItem.getItemMeta();
assert heldItemMeta != null;
heldItemMeta.setDisplayName(ChatColor.WHITE + "The " + ChatColor.DARK_GRAY + "Lie");
heldItem.setItemMeta(heldItemMeta);
for (Player player : server.getOnlinePlayers())
{
final int firstEmpty = player.getInventory().firstEmpty();
if (firstEmpty >= 0)
{
player.getInventory().setItem(firstEmpty, heldItem);
}
}
FUtil.bcastMsg(output.toString());
return true;
}
}

View File

@ -1,29 +1,29 @@
package me.StevenLawson.TotalFreedomMod.Commands;
package me.totalfreedom.totalfreedommod.command;
import me.StevenLawson.TotalFreedomMod.TFM_AdminList;
import java.util.Objects;
import me.totalfreedom.totalfreedommod.rank.Rank;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Minecart;
import org.bukkit.entity.Player;
@CommandPermissions(level = AdminLevel.ALL, source = SourceType.BOTH)
@CommandPermissions(level = Rank.NON_OP, source = SourceType.BOTH)
@CommandParameters(description = "Sit in nearest minecart. If target is in a minecart already, they will disembark.", usage = "/<command> [partialname]")
public class Command_cartsit extends TFM_Command
public class Command_cartsit extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
Player targetPlayer = sender_p;
if (args.length == 1)
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
try
Player targetPlayer = playerSender;
if (args.length == 1 && plugin.al.isAdmin(sender))
{
targetPlayer = getPlayer(args[0]);
}
catch (PlayerNotFoundException ex)
if (targetPlayer == null)
{
sender.sendMessage(ex.getMessage());
msg(PLAYER_NOT_FOUND);
return true;
}
}
@ -32,19 +32,14 @@ public class Command_cartsit extends TFM_Command
{
if (targetPlayer == null)
{
sender.sendMessage("When used from the console, you must define a target player: /cartsit <player>");
msg("When used from the console, you must define a target player: /cartsit <player>");
return true;
}
}
else if (targetPlayer != sender_p && !TFM_AdminList.isSuperAdmin(sender))
{
sender.sendMessage("Only superadmins can select another player as a /cartsit target.");
return true;
}
if (targetPlayer.isInsideVehicle())
{
targetPlayer.getVehicle().eject();
Objects.requireNonNull(targetPlayer.getVehicle()).eject();
}
else
{
@ -69,11 +64,11 @@ public class Command_cartsit extends TFM_Command
if (nearest_cart != null)
{
nearest_cart.setPassenger(targetPlayer);
nearest_cart.addPassenger(targetPlayer);
}
else
{
sender.sendMessage("There are no empty minecarts in the target world.");
msg("There are no empty minecarts in the target world.");
}
}

View File

@ -0,0 +1,27 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Clears the chat.", usage = "/<command>", aliases = "cc")
public class Command_cleanchat extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
server.getOnlinePlayers().stream().filter(player -> !plugin.al.isAdmin(player)).forEach(player ->
{
for (int i = 0; i < 100; i++)
{
msg(player, "");
}
});
FUtil.adminAction(sender.getName(), "Cleared chat", true);
return true;
}
}

View File

@ -0,0 +1,20 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_CONSOLE)
@CommandParameters(description = "Clear the discord message queue.", usage = "/<command>")
public class Command_cleardiscordqueue extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
plugin.dc.clearQueue();
msg("Cleared the discord message queue.");
return true;
}
}

View File

@ -0,0 +1,79 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.Collections;
import java.util.List;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
@CommandParameters(description = "Clear your inventory.", usage = "/<command> [player]", aliases = "ci,clear")
public class Command_clearinventory extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
if (args.length < 1)
{
if (senderIsConsole)
{
return false;
}
playerSender.getInventory().clear();
msg("Your inventory has been cleared.");
}
else
{
if (plugin.al.isAdmin(sender))
{
if (args[0].equals("-a"))
{
FUtil.adminAction(sender.getName(), "Clearing everyone's inventory", true);
for (Player player : server.getOnlinePlayers())
{
player.getInventory().clear();
}
msg("Sucessfully cleared everyone's inventory.");
}
else
{
Player player = getPlayer(args[0]);
if (player == null)
{
msg(PLAYER_NOT_FOUND);
return true;
}
player.getInventory().clear();
msg("Cleared " + player.getName() + "'s inventory.");
msg(player, sender.getName() + " has cleared your inventory.");
}
}
else
{
return noPerms();
}
}
return true;
}
@Override
public List<String> getTabCompleteOptions(CommandSender sender, Command command, String alias, String[] args)
{
if (args.length == 1 && plugin.al.isAdmin(sender))
{
List<String> players = FUtil.getPlayerList();
players.add("-a");
return players;
}
return Collections.emptyList();
}
}

View File

@ -0,0 +1,29 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.shop.ShopItem;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Obtain a clown fish", usage = "/<command>")
public class Command_clownfish extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
if (plugin.pl.getData(playerSender).hasItem(ShopItem.CLOWN_FISH) && (!plugin.lp.CLOWNFISH_TOGGLE.contains(playerSender.getName())))
{
playerSender.getInventory().addItem(plugin.sh.getClownFish());
msg("You have been given a Clown Fish", ChatColor.GREEN);
}
else
{
msg("You do not own a Clown Fish or an admin has toggled your ability to use it. Purchase one from the shop.", ChatColor.RED);
}
return true;
}
}

View File

@ -0,0 +1,24 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.admin.Admin;
import me.totalfreedom.totalfreedommod.rank.Rank;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Spy on commands", usage = "/<command>", aliases = "commandspy")
public class Command_cmdspy extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
Admin admin = plugin.al.getAdmin(playerSender);
admin.setCommandSpy(!admin.getCommandSpy());
msg("CommandSpy " + (admin.getCommandSpy() ? "enabled." : "disabled."));
plugin.al.save(admin);
plugin.al.updateTables();
return true;
}
}

Some files were not shown because too many files have changed in this diff Show More