Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AFKKick
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bukkit Plugin Requests
AFKKick
Commits
3de980e4
There was a problem fetching the pipeline summary.
Commit
3de980e4
authored
9 years ago
by
Zandor Smith
Browse files
Options
Downloads
Patches
Plain Diff
Added permission to bypass it.
parent
a8c01564
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/nl/zandorsmith/afkkick/AFKKick.java
+10
-9
10 additions, 9 deletions
src/main/java/nl/zandorsmith/afkkick/AFKKick.java
with
10 additions
and
9 deletions
src/main/java/nl/zandorsmith/afkkick/AFKKick.java
+
10
−
9
View file @
3de980e4
...
...
@@ -30,15 +30,16 @@ public class AFKKick extends JavaPlugin {
Bukkit
.
getScheduler
().
runTaskTimer
(
this
,
new
Runnable
()
{
@Override
public
void
run
()
{
for
(
Player
player
:
Bukkit
.
getOnlinePlayers
())
{
if
(
times
.
get
(
player
.
getName
())
==
null
)
times
.
put
(
player
.
getName
(),
0
);
else
times
.
put
(
player
.
getName
(),
times
.
get
(
player
.
getName
())
+
1
);
if
(
times
.
get
(
player
.
getName
())
>=
time
)
player
.
kickPlayer
(
message
);
}
for
(
Player
player
:
Bukkit
.
getOnlinePlayers
())
if
(!
player
.
hasPermission
(
"afkkick.bypass"
))
{
if
(
times
.
get
(
player
.
getName
())
==
null
)
times
.
put
(
player
.
getName
(),
0
);
else
times
.
put
(
player
.
getName
(),
times
.
get
(
player
.
getName
())
+
1
);
if
(
times
.
get
(
player
.
getName
())
>=
time
)
player
.
kickPlayer
(
message
);
}
}
},
20
l
,
20
l
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment