Skip to content

Commit

Permalink
Add suggested changes
Browse files Browse the repository at this point in the history
Co-authored-by: VytskaLT <[email protected]>
  • Loading branch information
MWHunter and vytskalt committed Jan 27, 2022
1 parent 065f3f7 commit 9dffbc0
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 45 deletions.
68 changes: 68 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# https://gist.github.com/dedunumax/54e82214715e35439227
##############################
## Java
##############################
.mtj.tmp/
*.class
*.jar
*.war
*.ear
*.nar
hs_err_pid*

##############################
## Gradle
##############################
bin/
build/
.gradle
.gradletasknamecache
gradle-app.setting
!gradle-wrapper.jar

##############################
## IntelliJ
##############################
out/
.idea/
.idea_modules/
*.iml
*.ipr
*.iws

##############################
## Eclipse
##############################
.settings/
tmp/
.metadata
.classpath
.project
*.tmp
*.bak
*.swp
*~.nib
local.properties
.loadpath
.factorypath

##############################
## NetBeans
##############################
nbproject/private/
nbbuild/
dist/
nbdist/
nbactions.xml
nb-configuration.xml

##############################
## Visual Studio Code
##############################
.vscode/
.code-workspace

##############################
## OS X
##############################
.DS_Store
58 changes: 17 additions & 41 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,60 +1,36 @@
plugins {
id 'java'
id 'maven-publish'
id "com.github.johnrengelman.shadow" version "7.0.0"
id "com.github.johnrengelman.shadow" version "7.1.2"
}

repositories {
mavenLocal()
maven {
url = uri('https://hub.spigotmc.org/nexus/content/repositories/snapshots/')
}

maven {
url = uri('https://jitpack.io/')
}

maven {
url = uri('https://repo.dmulloy2.net/repository/public/')
}

maven {
url = uri('https://repo.opencollab.dev/maven-snapshots/')
}

maven {
url = uri('https://repo.maven.apache.org/maven2/')
}

maven {
url = uri('https://repo.viaversion.com')
}

maven {
url = "https://repo.aikar.co/content/groups/aikar/"
}

maven {
url = "https://repo.essentialsx.net/releases/"
}

maven { url = uri('https://hub.spigotmc.org/nexus/content/repositories/snapshots/') }
maven { url = uri('https://jitpack.io/') }
maven { url = uri('https://repo.dmulloy2.net/repository/public/') }
maven { url = uri('https://repo.opencollab.dev/maven-snapshots/') }
maven { url = uri('https://repo.maven.apache.org/maven2/') }
maven { url = uri('https://repo.viaversion.com') }
maven { url = "https://repo.aikar.co/content/groups/aikar/" }
maven { url = "https://repo.essentialsx.net/releases/" }
mavenCentral()
}

dependencies {
implementation 'com.github.retrooper.packetevents:spigot:f0128e0f5d'
implementation 'com.github.steveice10:packetlib:2.0'
implementation 'co.aikar:acf-paper:0.5.0-SNAPSHOT'
implementation 'com.github.steveice10:packetlib:2.1'
implementation 'co.aikar:acf-paper:0.5.1-SNAPSHOT'
implementation 'org.bstats:bstats-bukkit:2.2.1'
implementation 'club.minnced:discord-webhooks:0.7.4'
implementation 'club.minnced:discord-webhooks:0.7.5'
implementation 'it.unimi.dsi:fastutil:8.5.6'
implementation "io.papermc:paperlib:1.0.6"
implementation 'com.github.Steveice10:MCProtocolLib:6970991'
implementation "io.papermc:paperlib:1.0.7"
implementation 'com.github.Steveice10:MCProtocolLib:15df12a'

compileOnly 'org.spigotmc:spigot-api:1.18-R0.1-SNAPSHOT'
compileOnly 'com.viaversion:viaversion-api:4.0.0'
compileOnly group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.14.1'
compileOnly group: 'net.essentialsx', name: 'EssentialsX', version: '2.19.0'
compileOnly 'com.viaversion:viaversion-api:4.1.1'
compileOnly group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.17.1'
compileOnly group: 'net.essentialsx', name: 'EssentialsX', version: '2.19.2'

compileOnly 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
Expand Down
12 changes: 9 additions & 3 deletions src/main/java/ac/grim/grimac/utils/anticheat/LogUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,23 @@
import ac.grim.grimac.GrimAPI;
import lombok.experimental.UtilityClass;

import java.util.logging.Logger;

@UtilityClass
public class LogUtil {
public void info(final String info) {
GrimAPI.INSTANCE.getPlugin().getLogger().info(info);
getLogger().info(info);
}

public void warn(final String warn) {
GrimAPI.INSTANCE.getPlugin().getLogger().info(warn);
getLogger().info(warn);
}

public void error(final String error) {
GrimAPI.INSTANCE.getPlugin().getLogger().info(error);
getLogger().info(error);
}

public Logger getLogger() {
return GrimAPI.INSTANCE.getPlugin().getLogger();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// Accept that the server can change the player's packets without an update response from the player
// Accept that the player's flying status lies when landing on the ground (Worked around in GrimPlayer.specialFlying)
//
// This isn't perfect but it's damn close and should be the best public open source flight lag compensation system
// This isn't perfect, but it's damn close and should be the best public open source flight lag compensation system
public class CompensatedFlying {
private final ConcurrentHashMap<Integer, Boolean> lagCompensatedCanFlyMap = new ConcurrentHashMap<>();
private final GrimPlayer player;
Expand Down

0 comments on commit 9dffbc0

Please sign in to comment.